![]() |
XII Release 0.1.0
|
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 xiiDocumentObject * | GetCurrentObject () 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 xiiDocument * | GetDocument () const |
xiiSharedPtr< xiiSelectionManager::Storage > | SwapStorage (xiiSharedPtr< xiiSelectionManager::Storage > pNewStorage) |
xiiSharedPtr< xiiSelectionManager::Storage > | GetStorage () |
Public Attributes | |
xiiCopyOnBroadcastEvent< const xiiSelectionManagerEvent & > | m_Events |
Friends | |
class | xiiDocument |
Selection Manager stores a set of selected document objects.
|
inline |
Returns the current runtime override selection.
Valid, if the selection is non-empty. See SetRuntimeOverrideSelection() for details.
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.
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.