Editor API
UnigineEditor public API
UnigineEditor::SelectionAction Class Reference

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

#include <UnigineActions.h>

Inheritance diagram for UnigineEditor::SelectionAction:
UnigineEditor::Action

Public Member Functions

 SelectionAction (Selector *s)
 Creates a new selection action for the specified selector. More...
 
void apply () override
 Applies the selection action. More...
 
void undo () override
 Reverts the selection action. More...
 
void redo () override
 Redoes the previously undone selection action (reverses the undo method). More...
 
bool modifiesWorld () const override
 Indicates whether the action brings any changes to the scene. Selection actions change nothing and shouldn't set world‘s "dirty state", so 'false’ is returned. 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...
 

Static Public Member Functions

static void applySelection (Selector *selector)
 Applies a new selection defined by the specified selector. More...
 
static void refreshSelection (bool expand=false)
 Refreshes the current selection. More...
 

Detailed Description

This class is used to represent any user's selection action.

Constructor & Destructor Documentation

◆ SelectionAction()

UnigineEditor::SelectionAction::SelectionAction ( Selector *  s)
explicit

Creates a new selection action for the specified selector.

Parameters
sSelector defining a new selection.

Member Function Documentation

◆ apply()

void UnigineEditor::SelectionAction::apply ( )
overridevirtual

Applies the selection action.

Implements UnigineEditor::Action.

◆ applySelection()

static void UnigineEditor::SelectionAction::applySelection ( Selector *  selector)
static

Applies a new selection defined by the specified selector.

Parameters
selectorNew selection to be applied.

◆ modifiesWorld()

bool UnigineEditor::SelectionAction::modifiesWorld ( ) const
inlineoverridevirtual

Indicates whether the action brings any changes to the scene. Selection actions change nothing and shouldn't set world‘s "dirty state", so 'false’ is returned.

Reimplemented from UnigineEditor::Action.

◆ redo()

void UnigineEditor::SelectionAction::redo ( )
inlineoverridevirtual

Redoes the previously undone selection action (reverses the undo method).

Implements UnigineEditor::Action.

◆ refreshSelection()

static void UnigineEditor::SelectionAction::refreshSelection ( bool  expand = false)
static

Refreshes the current selection.

Parameters
expandSet true to expand the hierarchy after refreshing selection; false.

◆ undo()

void UnigineEditor::SelectionAction::undo ( )
overridevirtual

Reverts the selection action.

Implements UnigineEditor::Action.

◆ validate()

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