XII Release 0.1.0
Loading...
Searching...
No Matches
xiiSelectionManager Class Reference

Selection Manager stores a set of selected document objects. More...

#include <SelectionManager.h>

Classes

class  Storage
 

Public Member Functions

 xiiSelectionManager (const xiiDocumentObjectManager *pObjectManager)
 
void Clear ()
 
void AddObject (const xiiDocumentObject *pObject)
 
void RemoveObject (const xiiDocumentObject *pObject, bool bRecurseChildren=false)
 
void SetSelection (const xiiDocumentObject *pSingleObject)
 
void SetSelection (const xiiDeque< const xiiDocumentObject * > &selection)
 
void ToggleObject (const xiiDocumentObject *pObject)
 
void SetRuntimeOverrideSelection (const xiiDeque< const xiiDocumentObject * > &selection)
 Sets a separate selection (temporarily), which is sent to the engine but not propagated to the editor.
 
const xiiDeque< const xiiDocumentObject * > & GetRuntimeOverrideSelection () const
 Returns the current runtime override selection.
 
const xiiDocumentObjectGetCurrentObject () const
 Returns the last selected object in the selection or null if empty.
 
const xiiDeque< const xiiDocumentObject * > & GetSelection () const
 Returns the selection in the same order the objects were added to the list.
 
bool IsSelectionEmpty () const
 
void GetTopLevelSelection (xiiDynamicArray< xiiSelectionEntry > &out_entries) const
 Returns the subset of selected items which have no parent selected.
 
void GetTopLevelSelectionOfType (const xiiRTTI *pBase, xiiDynamicArray< xiiSelectionEntry > &out_entries) const
 Same as GetTopLevelSelection() but additionally requires that all objects are derived from type pBase.
 
bool IsSelected (const xiiDocumentObject *pObject) const
 
bool IsParentSelected (const xiiDocumentObject *pObject) const
 
const xiiDocumentGetDocument () const
 
xiiSharedPtr< xiiSelectionManager::StorageSwapStorage (xiiSharedPtr< xiiSelectionManager::Storage > pNewStorage)
 
xiiSharedPtr< xiiSelectionManager::StorageGetStorage ()
 

Public Attributes

xiiCopyOnBroadcastEvent< const xiiSelectionManagerEvent & > m_Events
 

Friends

class xiiDocument
 

Detailed Description

Selection Manager stores a set of selected document objects.

Member Function Documentation

◆ GetRuntimeOverrideSelection()

const xiiDeque< const xiiDocumentObject * > & xiiSelectionManager::GetRuntimeOverrideSelection ( ) const
inline

Returns the current runtime override selection.

Valid, if the selection is non-empty. See SetRuntimeOverrideSelection() for details.

◆ GetTopLevelSelection()

void xiiSelectionManager::GetTopLevelSelection ( xiiDynamicArray< xiiSelectionEntry > & out_entries) const

Returns the subset of selected items which have no parent selected.

I.e. if an object is selected and one of its ancestors is selected, it is culled from the list. Items are returned in the order of appearance in an expanded scene tree. Their order in the selection is returned through xiiSelectionEntry.

◆ SetRuntimeOverrideSelection()

void xiiSelectionManager::SetRuntimeOverrideSelection ( const xiiDeque< const xiiDocumentObject * > & selection)

Sets a separate selection (temporarily), which is sent to the engine but not propagated to the editor.

This is used for cases where temporarily the engine should use a different selection than the editor. Currently this is used during drag-and-drop, to already show the dragged object as selected and especially to exclude it from picking, but not yet show the new object as selected in the property grids, such that users can interact with the previously selected object.

To clear a runtime override selection, simply set an empty selection.


The documentation for this class was generated from the following files: