Cogs.Core
Public Member Functions | Public Attributes | Private Attributes | List of all members
Cogs::Core::SelectCommand Class Reference
Inheritance diagram for Cogs::Core::SelectCommand:
Cogs::Core::EditorCommand

Public Member Functions

 SelectCommand (EditorState *state, const EntityIds &selectedIds, SelectMode mode=SelectMode::Exclusive, int pickId=-1)
 
 SelectCommand (EditorState *state, const EntityId &selectedId, SelectMode mode=SelectMode::Exclusive, int pickId=-1)
 
void apply () override
 Run the command.
 
void undo () override
 
- Public Member Functions inherited from Cogs::Core::EditorCommand
 EditorCommand (EditorState *state, Context *context)
 
virtual void apply ()=0
 Run the command.
 
virtual void undo ()=0
 
virtual void redo ()
 
virtual bool mergeWith (const EditorCommand *)
 
virtual MeshHandle applyMesh (MeshHandle)
 Workaround for having extendable mesh processing available without linking (e.g command -> RR).
 
virtual void close ()
 Close command, i.e. prevent merging with another command.
 
bool isClosed () const
 
bool merge (const EditorCommand *command)
 Merge into this if not this is closed.
 

Public Attributes

int pickId = -1
 Pick id of last Picked entity.
 
- Public Attributes inherited from Cogs::Core::EditorCommand
std::vector< ParsedValueoptions
 Options passed to the command when running in batch mode.
 
bool permanentUndo = false
 True if cannot Redo after Undo.
 

Private Attributes

EntityIds selectedIds
 
SelectMode mode = SelectMode::Exclusive
 
EntityIds previousSelection
 

Additional Inherited Members

- Protected Attributes inherited from Cogs::Core::EditorCommand
EditorStatestate = nullptr
 
Contextcontext = nullptr
 

Detailed Description

Definition at line 113 of file EditorCommand.h.

Constructor & Destructor Documentation

◆ SelectCommand() [1/2]

Cogs::Core::SelectCommand::SelectCommand ( EditorState state,
const EntityIds &  selectedIds,
SelectMode  mode = SelectMode::Exclusive,
int  pickId = -1 
)
inline

Definition at line 116 of file EditorCommand.h.

◆ SelectCommand() [2/2]

Cogs::Core::SelectCommand::SelectCommand ( EditorState state,
const EntityId &  selectedId,
SelectMode  mode = SelectMode::Exclusive,
int  pickId = -1 
)
inline

Definition at line 121 of file EditorCommand.h.

Member Function Documentation

◆ apply()

void Cogs::Core::SelectCommand::apply ( )
overridevirtual

Run the command.

In batch scripts this method is called for all type of commands. In interactive mode this method is not called for model commands (subclasses of ModalEditorCommand)

Implements Cogs::Core::EditorCommand.

Definition at line 122 of file EditorCommand.cpp.

◆ undo()

void Cogs::Core::SelectCommand::undo ( )
overridevirtual

Implements Cogs::Core::EditorCommand.

Definition at line 168 of file EditorCommand.cpp.

Member Data Documentation

◆ mode

SelectMode Cogs::Core::SelectCommand::mode = SelectMode::Exclusive
private

Definition at line 133 of file EditorCommand.h.

◆ pickId

int Cogs::Core::SelectCommand::pickId = -1

Pick id of last Picked entity.

Definition at line 130 of file EditorCommand.h.

◆ previousSelection

EntityIds Cogs::Core::SelectCommand::previousSelection
private

Definition at line 135 of file EditorCommand.h.

◆ selectedIds

EntityIds Cogs::Core::SelectCommand::selectedIds
private

Definition at line 132 of file EditorCommand.h.


The documentation for this class was generated from the following files: