Editor API
UnigineEditor public API
Editor::SelectionAction Class Reference

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

#include <Actions.h>

Inheritance diagram for Editor::SelectionAction:
Editor::Action

Public Member Functions

 SelectionAction (Selector *s)
 Creates a new selection action for the specified selector. More...
 
 ~SelectionAction () override
 
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 asset system will delete invalid action for good. More...
 
- Public Member Functions inherited from Editor::Action
 Action ()
 
virtual ~Action ()
 

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

Public Attributes

SelectionActionPrivate * d
 

Detailed Description

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

Constructor & Destructor Documentation

◆ SelectionAction()

Editor::SelectionAction::SelectionAction ( Selector s)
explicit

Creates a new selection action for the specified selector.

Parameters
sSelector defining a new selection.

◆ ~SelectionAction()

Editor::SelectionAction::~SelectionAction ( )
override

Member Function Documentation

◆ apply()

void Editor::SelectionAction::apply ( )
overridevirtual

Applies the selection action.

Implements Editor::Action.

◆ applySelection()

static void Editor::SelectionAction::applySelection ( Selector selector)
static

Applies a new selection defined by the specified selector.

Parameters
selectorNew selection to be applied.

◆ modifiesWorld()

bool Editor::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 Editor::Action.

◆ redo()

void Editor::SelectionAction::redo ( )
inlineoverridevirtual

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

Implements Editor::Action.

◆ refreshSelection()

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

Refreshes the current selection.

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

◆ undo()

void Editor::SelectionAction::undo ( )
overridevirtual

Reverts the selection action.

Implements Editor::Action.

◆ validate()

bool Editor::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 asset system will delete invalid action for good.

Reimplemented from Editor::Action.

Member Data Documentation

◆ d

SelectionActionPrivate* Editor::SelectionAction::d