Editor API
UnigineEditor public API
UnigineEditor::Action Class Referenceabstract

This basic class is used to represent any possible user action. More...

#include <UnigineUndo.h>

Inheritance diagram for UnigineEditor::Action:
UnigineEditor::CreateNodesAction UnigineEditor::EnableNodeAction UnigineEditor::RemoveNodesAction UnigineEditor::RenameNodeAction UnigineEditor::ReparentNodesAction UnigineEditor::SelectionAction UnigineEditor::SetNodeTransformAction

Public Member Functions

virtual void apply ()=0
 Applies the action. More...
 
virtual void undo ()=0
 Reverts the action. More...
 
virtual void redo ()=0
 Redoes the previously undone action (reverses the undo method). More...
 
virtual bool validate ()
 This method allows action to do some internal cleanup. Return value indicates whether the action is still sane. Whenever it returns false asset system will delete invalid action for good. More...
 
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 basic class is used to represent any possible user action.

Member Function Documentation

◆ apply()

◆ modifiesWorld()

virtual bool UnigineEditor::Action::modifiesWorld ( ) const
inlinevirtual

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’.

Reimplemented in UnigineEditor::SelectionAction.

◆ redo()

virtual void UnigineEditor::Action::redo ( )
pure virtual

◆ undo()

◆ validate()

virtual bool UnigineEditor::Action::validate ( )
inlinevirtual

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

Reimplemented in UnigineEditor::EnableNodeAction, UnigineEditor::RenameNodeAction, UnigineEditor::SetNodeTransformAction, UnigineEditor::RemoveNodesAction, and UnigineEditor::SelectionAction.