Plasma Engine  2.0
Loading...
Searching...
No Matches
plSceneSelectionContext Class Reference

Custom selection context for the scene to allow switching the active layer if an object is clicked that is in a different layer then the active one. More...

#include <SceneSelectionContext.h>

Inheritance diagram for plSceneSelectionContext:

Public Member Functions

 plSceneSelectionContext (plQtEngineDocumentWindow *pOwnerWindow, plQtEngineViewWidget *pOwnerView, const plCamera *pCamera)
 
- Public Member Functions inherited from plSelectionContext
 plSelectionContext (plQtEngineDocumentWindow *pOwnerWindow, plQtEngineViewWidget *pOwnerView, const plCamera *pCamera)
 
void SetWindowConfig (const plVec2I32 &vViewport)
 
void SetPickObjectOverride (plDelegate< void(const plDocumentObject *)> pickOverride)
 Adds a delegate that gets called whenever an object is picked, as long as the override is active.
 
void ResetPickObjectOverride ()
 
- Public Member Functions inherited from plEditorInputContext
void FocusLost (bool bCancel)
 
plEditorInput KeyPressEvent (QKeyEvent *e)
 
plEditorInput KeyReleaseEvent (QKeyEvent *e)
 
plEditorInput MousePressEvent (QMouseEvent *e)
 
plEditorInput MouseReleaseEvent (QMouseEvent *e)
 
plEditorInput MouseMoveEvent (QMouseEvent *e)
 
plEditorInput WheelEvent (QWheelEvent *e)
 
void MakeActiveInputContext (bool bActive=true)
 
bool IsActiveInputContext () const
 
void SetOwner (plQtEngineDocumentWindow *pOwnerWindow, plQtEngineViewWidget *pOwnerView)
 
plQtEngineDocumentWindowGetOwnerWindow () const
 
plQtEngineViewWidgetGetOwnerView () 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
 
plVec2I32 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.
 
plVec2I32 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 (plQtEngineDocumentWindow *pWindow)
 
- Public Member Functions inherited from plReflectedClass
virtual const plRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const plRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
PL_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Protected Member Functions

virtual void OpenDocumentForPickedObject (const plObjectPickingResult &res) const override
 
virtual void SelectPickedObject (const plObjectPickingResult &res, bool bToggle, bool bDirect) const override
 
plUuid FindLayerByObject (plUuid objectGuid, const plDocumentObject *&out_pObject) const
 
- Protected Member Functions inherited from plSelectionContext
virtual plEditorInput DoMousePressEvent (QMouseEvent *e) override
 
virtual plEditorInput DoMouseReleaseEvent (QMouseEvent *e) override
 
virtual plEditorInput DoMouseMoveEvent (QMouseEvent *e) override
 
virtual plEditorInput DoKeyPressEvent (QKeyEvent *e) override
 
virtual plEditorInput DoKeyReleaseEvent (QKeyEvent *e) override
 
virtual void OnSetOwner (plQtEngineDocumentWindow *pOwnerWindow, plQtEngineViewWidget *pOwnerView) override
 
const plDocumentObjectdetermineObjectToSelect (const plDocumentObject *pickedObject, bool bToggle, bool bDirect) const
 
virtual void DoFocusLost (bool bCancel) override
 
void SendMarqueeMsg (QMouseEvent *e, plUInt8 uiWhatToDo)
 
- Protected Member Functions inherited from plEditorInputContext
virtual plEditorInput DoWheelEvent (QWheelEvent *e)
 

Additional Inherited Members

- Public Types inherited from plEditorInputContext
enum class  MouseMode { Normal , WrapAtScreenBorders , HideAndWrapAtScreenBorders }
 How the mouse position is updated when the mouse cursor reaches the screen borders. More...
 
- Static Public Member Functions inherited from plEditorInputContext
static void SetActiveInputContext (plEditorInputContext *pContext)
 
static bool IsAnyInputContextActive ()
 
static plEditorInputContextGetActiveInputContext ()
 
static void UpdateActiveInputContext ()
 
- Static Public Member Functions inherited from plNoBase
static const plRTTIGetStaticRTTI ()
 
- Protected Types inherited from plSelectionContext
enum class  Mode { None , Single , MarqueeAdd , MarqueeRemove }
 
- Protected Attributes inherited from plSelectionContext
plDelegate< void(const plDocumentObject *)> m_PickObjectOverride
 
const plCameram_pCamera
 
plVec2I32 m_vViewport
 
plEngineGizmoHandle m_hMarqueeGizmo
 
plVec3 m_vMarqueeStartPos
 
plUInt32 m_uiMarqueeID
 
bool m_bPressedSpace = false
 
Mode m_Mode = Mode::None
 

Detailed Description

Custom selection context for the scene to allow switching the active layer if an object is clicked that is in a different layer then the active one.

Member Function Documentation

◆ OpenDocumentForPickedObject()

void plSceneSelectionContext::OpenDocumentForPickedObject ( const plObjectPickingResult & res) const
overrideprotectedvirtual

Reimplemented from plSelectionContext.

◆ SelectPickedObject()

void plSceneSelectionContext::SelectPickedObject ( const plObjectPickingResult & res,
bool bToggle,
bool bDirect ) const
overrideprotectedvirtual

Reimplemented from plSelectionContext.


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