Editor API
UnigineEditor public API
UnigineEditor::RemoveNodesAction Class Reference

This class is used to represent any user's action removing nodes. More...

Inheritance diagram for UnigineEditor::RemoveNodesAction:
UnigineEditor::Action

Public Member Functions

 RemoveNodesAction (const Unigine::NodePtr &node)
 Creates a new remove action for the specified node. More...
 
 RemoveNodesAction (const Unigine::Vector< Unigine::NodePtr > &nodes)
 Creates a new remove action for the specified node. More...
 
void apply () override
 Applies the remove nodes action. More...
 
void undo () override
 Reverts the remove nodes action. More...
 
void redo () override
 Redoes the previously undone remove nodes 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...
 
Unigine::Vector< Unigine::NodePtr > getNodes () const
 Returns the list of nodes affected by the action. 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 removing nodes.

Constructor & Destructor Documentation

◆ RemoveNodesAction() [1/2]

UnigineEditor::RemoveNodesAction::RemoveNodesAction ( const Unigine::NodePtr &  node)
explicit

Creates a new remove action for the specified node.

Parameters
nodeNode to be removed.

◆ RemoveNodesAction() [2/2]

UnigineEditor::RemoveNodesAction::RemoveNodesAction ( const Unigine::Vector< Unigine::NodePtr > &  nodes)
explicit

Creates a new remove action for the specified node.

Parameters
nodesNodes to be removed.

Member Function Documentation

◆ apply()

void UnigineEditor::RemoveNodesAction::apply ( )
overridevirtual

Applies the remove nodes action.

Implements UnigineEditor::Action.

◆ getNodes()

Unigine::Vector<Unigine::NodePtr> UnigineEditor::RemoveNodesAction::getNodes ( ) const

Returns the list of nodes affected by the action.

◆ redo()

void UnigineEditor::RemoveNodesAction::redo ( )
inlineoverridevirtual

Redoes the previously undone remove nodes action (reverses the undo method).

Implements UnigineEditor::Action.

◆ undo()

void UnigineEditor::RemoveNodesAction::undo ( )
overridevirtual

Reverts the remove nodes action.

Implements UnigineEditor::Action.

◆ validate()

bool UnigineEditor::RemoveNodesAction::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.