3#include <NDEVR/DesignCommand.h>
4#include <NDEVR/DesignObjectLookup.h>
5#include <NDEVR/TranslatedString.h>
6#include <NDEVR/Translator.h>
100 return _t(
"Invisible");
The equivelent of std::vector but with a bit more control.
DesignCommand()
Default constructor.
bool is_undo
Whether this command represents an undo operation.
A core class where all Design Objects including models, materials, and geometries are stored.
Model modelOrLayer(const UUID &id, bool allow_deleted=false) const
Retrieves a model or layer by its UUID, checking both stores.
const void * lockPtr() const
Returns a raw pointer to the internal lock primitive.
constexpr decltype(auto) get(t_property_type property) const
Retrieves a property value from the database, cast to the requested type.
bool isValid() const
Checks whether this design object has a valid index into the database.
bool update(t_property_type property, const t_type &value, const void *lock=nullptr)
Updates a property only if the new value differs from the current value.
A core class that represents a node on model hierarchy.
Model getLayer() const
Returns the layer model assigned to this model (direct or inherited).
Model getParent() const
Returns the parent model of this model.
bool isVisible() const
Checks whether this model is visible (accounting for inherited visibility).
bool hasDirectLayer() const
Checks whether this model has a directly assigned layer (not inherited).
The core String View class for the NDEVR API.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
bool m_make_visible
Whether this command makes objects visible (true) or invisible (false).
TranslatedString name() const override
Returns the translated display name for this command.
virtual bool addTarget(UUID target_id) override
Adds a target object UUID to the list of objects this command will affect.
Buffer< UUID > targets
The list of target object UUIDs whose visibility will be changed.
virtual void execute(DesignObjectLookup *lookup) override
Executes the visibility command on the given design lookup.
VisibleCommand(bool make_visible)
Constructs a VisibleCommand that will either show or hide target objects.
Buffer< UUID > m_models_to_toggle
Tracks UUIDs of all models actually toggled during execution, used for undo.
StringView icon() const override
Returns the icon name representing the current visibility state.
Used to lock a particular variable for writing.
The primary namespace for the NDEVR SDK.
@ guid
A 128-bit globally unique identifier for the object.
@ spacial_visible
Whether the object is visible in the 3D spatial view.