![]() |
ezEngine Release 25.08
|
Public Member Functions | |
ezSelectionContext (ezQtEngineDocumentWindow *pOwnerWindow, ezQtEngineViewWidget *pOwnerView, const ezCamera *pCamera) | |
void | SetWindowConfig (const ezVec2I32 &vViewport) |
void | SetPickObjectOverride (ezDelegate< void(const ezDocumentObject *)> pickOverride) |
Adds a delegate that gets called whenever an object is picked, as long as the override is active. | |
void | ResetPickObjectOverride () |
![]() | |
void | FocusLost (bool bCancel) |
ezEditorInput | KeyPressEvent (QKeyEvent *e) |
ezEditorInput | KeyReleaseEvent (QKeyEvent *e) |
ezEditorInput | MousePressEvent (QMouseEvent *e) |
ezEditorInput | MouseReleaseEvent (QMouseEvent *e) |
ezEditorInput | MouseMoveEvent (QMouseEvent *e) |
ezEditorInput | WheelEvent (QWheelEvent *e) |
void | MakeActiveInputContext (bool bActive=true) |
bool | IsActiveInputContext () const |
void | SetOwner (ezQtEngineDocumentWindow *pOwnerWindow, ezQtEngineViewWidget *pOwnerView) |
ezQtEngineDocumentWindow * | GetOwnerWindow () const |
ezQtEngineViewWidget * | GetOwnerView () const |
bool | GetShortcutsDisabled () const |
void | SetShortcutsDisabled (bool bDisabled) |
If set to true, the surrounding window will ensure to block all shortcuts and instead send keypress events to the input context. | |
virtual bool | IsPickingSelectedAllowed () const |
ezVec2I32 | SetMouseMode (MouseMode mode) |
Sets how the mouse will act when it reaches the screen border. UpdateMouseMode() must be called on every mouseMoveEvent to update the state. | |
ezVec2I32 | UpdateMouseMode (QMouseEvent *e) |
Updates the mouse position. Can always be called but will only have an effect if SetMouseMode() was called with one of the wrap modes. | |
virtual void | UpdateStatusBarText (ezQtEngineDocumentWindow *pWindow) |
![]() | |
virtual const ezRTTI * | GetDynamicRTTI () const |
bool | IsInstanceOf (const ezRTTI *pType) const |
Returns whether the type of this instance is of the given type or derived from it. | |
template<typename T > | |
EZ_ALWAYS_INLINE bool | IsInstanceOf () const |
Returns whether the type of this instance is of the given type or derived from it. | |
Protected Types | |
enum class | Mode { None , Single , MarqueeAdd , MarqueeRemove } |
Protected Member Functions | |
virtual ezEditorInput | DoMousePressEvent (QMouseEvent *e) override |
virtual ezEditorInput | DoMouseReleaseEvent (QMouseEvent *e) override |
virtual ezEditorInput | DoMouseMoveEvent (QMouseEvent *e) override |
virtual ezEditorInput | DoKeyPressEvent (QKeyEvent *e) override |
virtual ezEditorInput | DoKeyReleaseEvent (QKeyEvent *e) override |
virtual void | OnSetOwner (ezQtEngineDocumentWindow *pOwnerWindow, ezQtEngineViewWidget *pOwnerView) override |
const ezDocumentObject * | determineObjectToSelect (const ezDocumentObject *pickedObject, bool bToggle, bool bDirect) const |
virtual void | DoFocusLost (bool bCancel) override |
virtual void | OpenDocumentForPickedObject (const ezObjectPickingResult &res) const |
virtual void | SelectPickedObject (const ezObjectPickingResult &res, bool bToggle, bool bDirect) const |
void | SendMarqueeMsg (QMouseEvent *e, ezUInt8 uiWhatToDo) |
![]() | |
virtual void | OnActivated () |
virtual void | OnDeactivated () |
virtual ezEditorInput | DoWheelEvent (QWheelEvent *e) |
Protected Attributes | |
ezDelegate< void(const ezDocumentObject *)> | m_PickObjectOverride |
const ezCamera * | m_pCamera |
ezVec2I32 | m_vViewport |
ezEngineGizmoHandle | m_hMarqueeGizmo |
ezVec3 | m_vMarqueeStartPos |
ezUInt32 | m_uiMarqueeID |
bool | m_bPressedSpace = false |
Mode | m_Mode = Mode::None |
Additional Inherited Members | |
![]() | |
enum class | MouseMode { Normal , WrapAtScreenBorders , HideAndWrapAtScreenBorders } |
How the mouse position is updated when the mouse cursor reaches the screen borders. More... | |
![]() | |
static void | SetActiveInputContext (ezEditorInputContext *pContext) |
static bool | IsAnyInputContextActive () |
static ezEditorInputContext * | GetActiveInputContext () |
static void | UpdateActiveInputContext () |
![]() | |
static const ezRTTI * | GetStaticRTTI () |
|
overrideprotectedvirtual |
Reimplemented from ezEditorInputContext.
|
overrideprotectedvirtual |
Reimplemented from ezEditorInputContext.
|
overrideprotectedvirtual |
Reimplemented from ezEditorInputContext.
|
overrideprotectedvirtual |
Reimplemented from ezEditorInputContext.
|
overrideprotectedvirtual |
Reimplemented from ezEditorInputContext.
|
overrideprotectedvirtual |
Reimplemented from ezEditorInputContext.
|
inlineoverrideprotectedvirtual |
Implements ezEditorInputContext.
void ezSelectionContext::SetPickObjectOverride | ( | ezDelegate< void(const ezDocumentObject *)> | pickOverride | ) |
Adds a delegate that gets called whenever an object is picked, as long as the override is active.
It also changes the owner view's cursor to a cross-hair. If something gets picked, the override is called with a non-null object. In case the user presses ESC or the view gets destroyed while the override is active, the delegate is called with nullptr. This indicates that all picking should be stopped and the registered user should clean up.