ezEngine Release 26.9
Loading...
Searching...
No Matches
ezManipulatorManager Class Reference

#include <ManipulatorManager.h>

Public Member Functions

const ezManipulatorAttributeGetActiveManipulator (const ezDocument *pDoc, const ezHybridArray< ezPropertySelection, 8 > *&out_pSelection) const
 
void SetActiveManipulator (const ezDocument *pDoc, const ezManipulatorAttribute *pManipulator, const ezArrayPtr< ezPropertySelection > &selection)
 
void ClearActiveManipulator (const ezDocument *pDoc)
 Deactivates the manipulator for the given document and broadcasts the change.
 
void HideActiveManipulator (const ezDocument *pDoc, bool bHide)
 Sets the hidden flag without deactivating the manipulator. Gizmos are hidden when bHide is true.
 
void ToggleHideActiveManipulator (const ezDocument *pDoc)
 Toggles the hidden flag for the active manipulator of the given document.
 
void CycleActiveManipulator (const ezDocument *pDoc)
 

Public Attributes

ezCopyOnBroadcastEvent< const ezManipulatorManagerEvent & > m_Events
 Fired whenever the active manipulator, its selection, or the hidden state changes for any document.
 

Detailed Description

Singleton that tracks which manipulator is active per document.

A manipulator becomes active when the property grid detects a focused property that carries an ezManipulatorAttribute. The manager stores one active attribute and a corresponding object selection per document and broadcasts m_Events whenever the state changes.

On selection changes the manager automatically re-evaluates which objects in the current selection carry the same attribute and updates the stored selection accordingly. The document type controls whether the manager looks at selected objects directly or at their children via GetManipulatorSearchStrategy().

Hiding a manipulator (HideActiveManipulator / ToggleHideActiveManipulator) suppresses the gizmo without clearing the active attribute, so it can be restored when un-hidden.

Member Function Documentation

◆ CycleActiveManipulator()

void ezManipulatorManager::CycleActiveManipulator ( const ezDocument pDoc)

Cycles through the manipulators available on the last selected object.

If no manipulator is active, activates the first available one. If the currently active manipulator is not the last in the list, activates the next one. If it is the last, clears the active manipulator.

◆ GetActiveManipulator()

const ezManipulatorAttribute * ezManipulatorManager::GetActiveManipulator ( const ezDocument pDoc,
const ezHybridArray< ezPropertySelection, 8 > *&  out_pSelection 
) const

Returns the currently active manipulator attribute and the associated selection for the given document. Returns nullptr and sets out_pSelection to nullptr when no manipulator is active.

◆ SetActiveManipulator()

void ezManipulatorManager::SetActiveManipulator ( const ezDocument pDoc,
const ezManipulatorAttribute pManipulator,
const ezArrayPtr< ezPropertySelection > &  selection 
)

Sets the active manipulator for a document and broadcasts the change. Also resets the hidden flag so the gizmo becomes visible.


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