Editor API
UnigineEditor public API
UnigineEditor::ChangeNodeFlagsAction Class Reference

This class is used to represent any user's action changing node's flags. More...

Inheritance diagram for UnigineEditor::ChangeNodeFlagsAction:
UnigineEditor::Action

Public Member Functions

 ChangeNodeFlagsAction (const Unigine::NodePtr &node, int flag, bool enabled)
 Creates a new change node flag action for the specified node. More...
 
 ChangeNodeFlagsAction (const Unigine::Vector< Unigine::NodePtr > &nodes, int flag, bool enabled)
 Creates a new change node flag action for the specified nodes. More...
 
void apply () override
 Applies the change node flag action. More...
 
void undo () override
 Reverts the change node flag action. More...
 
void redo () override
 Redoes the previously undone change node flag action (reverses the undo method). More...
 
bool validate () override
 This method allows action to do some internal cleanup. Return value indicates whether the action is still sane. Whenever it returns false undo system will delete invalid action for good. More...
 
- Public Member Functions inherited from UnigineEditor::Action
virtual bool modifiesWorld () const
 Indicates whether the action brings any changes to the scene. Actions like selection, for example, change nothing and shouldn't set world‘s "dirty state". For such actions this method would return 'false’. More...
 

Detailed Description

This class is used to represent any user's action changing node's flags.

Constructor & Destructor Documentation

◆ ChangeNodeFlagsAction() [1/2]

UnigineEditor::ChangeNodeFlagsAction::ChangeNodeFlagsAction ( const Unigine::NodePtr &  node,
int  flag,
bool  enabled 
)
explicit

Creates a new change node flag action for the specified node.

Parameters
nodeNode affected by the action.
flagFlag affected by the action.
enabledtrue if the action enables the specified flag; otherwise, false.

◆ ChangeNodeFlagsAction() [2/2]

UnigineEditor::ChangeNodeFlagsAction::ChangeNodeFlagsAction ( const Unigine::Vector< Unigine::NodePtr > &  nodes,
int  flag,
bool  enabled 
)
explicit

Creates a new change node flag action for the specified nodes.

Parameters
nodesNodes affected by the action.
flagFlag affected by the action.
enabledtrue if the action enables the specified flag; otherwise, false.

Member Function Documentation

◆ apply()

void UnigineEditor::ChangeNodeFlagsAction::apply ( )
overridevirtual

Applies the change node flag action.

Implements UnigineEditor::Action.

◆ redo()

void UnigineEditor::ChangeNodeFlagsAction::redo ( )
overridevirtual

Redoes the previously undone change node flag action (reverses the undo method).

Implements UnigineEditor::Action.

◆ undo()

void UnigineEditor::ChangeNodeFlagsAction::undo ( )
overridevirtual

Reverts the change node flag action.

Implements UnigineEditor::Action.

◆ validate()

bool UnigineEditor::ChangeNodeFlagsAction::validate ( )
overridevirtual

This method allows action to do some internal cleanup. Return value indicates whether the action is still sane. Whenever it returns false undo system will delete invalid action for good.

Reimplemented from UnigineEditor::Action.