Editor API
UnigineEditor public API
Editor::Selection Class Reference

#include <Selection.h>

Inheritance diagram for Editor::Selection:

Signals

void changed ()
 This signal is emitted when the current selection has changed. More...
 

Static Public Member Functions

static Selectioninstance ()
 Returns the instance of the Selection class. This method is used to subscribe to the changed signal. More...
 
static void clear ()
 Clears the current selection. If current selection was not empty the changed signal is emitted. More...
 
static SelectorgetSelector ()
 Returns the current selection. More...
 
static void setSelector (Selector *selector)
 Sets the specified selection as the current one. If current selection has changed the changed signal is emitted. More...
 
static SelectorcopySelector ()
 Copies the current selection. Current selection obtained via the getSelector() method is not managed by the user, so it can change at any time. You can use this method to store a copy of the current selection in order to perform undo/redo operations. More...
 
static SelectorNodesgetSelectorNodes ()
 Tries to filter out nodes from the current selection as a nodes selector (SelectorType). The result shall combine only selected nodes (if any). More...
 
static SelectorGUIDsgetSelectorRuntimes ()
 Tries to filter out runtimes from the current selection as a runtimes selector (SelectorType). The result shall combine only selected runtimes (if any). More...
 
static SelectorGUIDsgetSelectorMaterials ()
 Tries to filter out materials from the current selection as a materials selector (SelectorType). The result shall combine only selected materials (if any). More...
 
static SelectorGUIDsgetSelectorProperties ()
 Tries to filter out properties from the current selection as a properties selector (SelectorType). The result shall combine only selected properties (if any). More...
 
static SelectorNodescopySelectorNodes ()
 Copies all currently selected nodes to a separate list. More...
 
static SelectorGUIDscopySelectorRuntimes ()
 Copies all runtimes for all currently selected nodes to a separate list. More...
 
static SelectorGUIDscopySelectorMaterials ()
 Copies all currently selected materials to a separate list. More...
 
static SelectorGUIDscopySelectorProperties ()
 Copies all currently selected properties to a separate list. More...
 

Friends

class Editor::Presenter
 

Member Function Documentation

◆ changed

void Editor::Selection::changed ( )
signal

This signal is emitted when the current selection has changed.

◆ clear()

static void Editor::Selection::clear ( )
static

Clears the current selection. If current selection was not empty the changed signal is emitted.

◆ copySelector()

static Selector* Editor::Selection::copySelector ( )
static

Copies the current selection. Current selection obtained via the getSelector() method is not managed by the user, so it can change at any time. You can use this method to store a copy of the current selection in order to perform undo/redo operations.

◆ copySelectorMaterials()

static SelectorGUIDs* Editor::Selection::copySelectorMaterials ( )
static

Copies all currently selected materials to a separate list.

Returns
Pointer to the Selector containing copies of currently selected materials.

◆ copySelectorNodes()

static SelectorNodes* Editor::Selection::copySelectorNodes ( )
static

Copies all currently selected nodes to a separate list.

Returns
Pointer to the Selector containing copies of currently selected nodes.

◆ copySelectorProperties()

static SelectorGUIDs* Editor::Selection::copySelectorProperties ( )
static

Copies all currently selected properties to a separate list.

Returns
Pointer to the Selector containing copies of currently selected properties.

◆ copySelectorRuntimes()

static SelectorGUIDs* Editor::Selection::copySelectorRuntimes ( )
static

Copies all runtimes for all currently selected nodes to a separate list.

Returns
Pointer to the Selector containing copies of all runtimes for all currently selected nodes.

◆ getSelector()

static Selector* Editor::Selection::getSelector ( )
static

Returns the current selection.

◆ getSelectorMaterials()

static SelectorGUIDs* Editor::Selection::getSelectorMaterials ( )
static

Tries to filter out materials from the current selection as a materials selector (SelectorType). The result shall combine only selected materials (if any).

Returns
Selector of the materials type for currently selected materials, or nullptr if there are no materials currently selected.

◆ getSelectorNodes()

static SelectorNodes* Editor::Selection::getSelectorNodes ( )
static

Tries to filter out nodes from the current selection as a nodes selector (SelectorType). The result shall combine only selected nodes (if any).

Returns
Selector of the nodes type for currently selected nodes, or nullptr if there are no nodes currently selected.

◆ getSelectorProperties()

static SelectorGUIDs* Editor::Selection::getSelectorProperties ( )
static

Tries to filter out properties from the current selection as a properties selector (SelectorType). The result shall combine only selected properties (if any).

Returns
Selector of the properties type for currently selected properties, or nullptr if there are no properties currently selected.

◆ getSelectorRuntimes()

static SelectorGUIDs* Editor::Selection::getSelectorRuntimes ( )
static

Tries to filter out runtimes from the current selection as a runtimes selector (SelectorType). The result shall combine only selected runtimes (if any).

Returns
Selector of the runtimes type for currently selected runtimes, or nullptr if there are no runtimes currently selected.

◆ instance()

static Selection* Editor::Selection::instance ( )
static

Returns the instance of the Selection class. This method is used to subscribe to the changed signal.

Returns
Selection class instance.

Example:

, this, &ParametersWindow::selection_changed);

◆ setSelector()

static void Editor::Selection::setSelector ( Selector selector)
static

Sets the specified selection as the current one. If current selection has changed the changed signal is emitted.

Friends And Related Function Documentation

◆ Editor::Presenter

friend class Editor::Presenter
friend