ezEngine  Release 25.03
ezPrefabComponentDragDropHandler Class Reference
Inheritance diagram for ezPrefabComponentDragDropHandler:

Protected Member Functions

virtual float CanHandle (const ezDragDropInfo *pInfo) const override
 Used to ask a handler whether it knows how to handle a certain drag & drop situation. More...
 
virtual void OnDragBegin (const ezDragDropInfo *pInfo) override
 Called shortly after CanHandle returned true to begin handling a drag operation.
 
virtual void OnDragUpdate (const ezDragDropInfo *pInfo) override
 Called to update the drag operation with the latest state.
 
- Protected Member Functions inherited from ezComponentDragDropHandler
void CreateDropObject (const ezVec3 &vPosition, const char *szType, const char *szProperty, const ezVariant &value, ezUuid parent, ezInt32 iInsertChildIndex)
 
void AttachComponentToObject (const char *szType, const char *szProperty, const ezVariant &value, ezUuid ObjectGuid)
 
void MoveObjectToPosition (const ezUuid &guid, const ezVec3 &vPosition, const ezQuat &qRotation)
 
void MoveDraggedObjectsToPosition (ezVec3 vPosition, bool bAllowSnap, const ezVec3 &normal)
 
void SelectCreatedObjects ()
 
void BeginTemporaryCommands ()
 
void EndTemporaryCommands ()
 
void CancelTemporaryCommands ()
 
virtual void OnDragCancel () override
 Called when the drag operation leaves the designated area. The handler will be destroyed after this. It should clean up all temporary objects that it created before.
 
virtual void OnDrop (const ezDragDropInfo *pInfo) override
 Final call to finish the drag & drop operation. Handler is destroyed after this.
 
- Protected Member Functions inherited from ezAssetDragDropHandler
bool IsAssetType (const ezDragDropInfo *pInfo) const
 
ezString GetAssetGuidString (const ezDragDropInfo *pInfo) const
 
ezUuid GetAssetGuid (const ezDragDropInfo *pInfo) const
 
ezString GetAssetsDocumentTypeName (const ezUuid &assetTypeGuid) const
 
bool IsSpecificAssetType (const ezDragDropInfo *pInfo, const char *szType) const
 
- Protected Member Functions inherited from ezDragDropHandler
virtual void RequestConfiguration (ezDragDropConfig *pConfigToFillOut)
 Potentially called by the drag drop target to request information about how to determine the ezDragDropInfo data.
 

Additional Inherited Members

- Public Member Functions inherited from ezReflectedClass
virtual const ezRTTIGetDynamicRTTI () 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.
 
- Static Public Member Functions inherited from ezDragDropHandler
static bool IsHandlerActive ()
 Returns whether the last call to BeginDragDropOperation() was successful and a handler is now in effect.
 
static bool BeginDragDropOperation (const ezDragDropInfo *pInfo, ezDragDropConfig *pConfigToFillOut=nullptr)
 Call this when a drag enter event occurs. Return value indicates whether a ezDragDropHandler was found to handle the operation. If not, subsequent drag & drop updates are ignored.
 
static void UpdateDragDropOperation (const ezDragDropInfo *pInfo)
 Call this when a drag event occurs. Ignored if BeginDragDropOperation() was not successful.
 
static void FinishDragDrop (const ezDragDropInfo *pInfo)
 Call this when a drop event occurs. Ignored if BeginDragDropOperation() was not successful.
 
static void CancelDragDrop ()
 Call this when a drag leave event occurs. Ignored if BeginDragDropOperation() was not successful.
 
static bool CanDropOnly (const ezDragDropInfo *pInfo)
 For targets that do not support full dragging, but only dropping on a single target, this allows to query whether there is a handler for the given target. See also DropOnly().
 
static bool DropOnly (const ezDragDropInfo *pInfo)
 Executes a complete drop action on a target that does not support continuous dragging. See also CanDropOnly().
 
- Static Public Member Functions inherited from ezNoBase
static const ezRTTIGetStaticRTTI ()
 
- Protected Attributes inherited from ezComponentDragDropHandler
ezDocumentm_pDocument
 
ezHybridArray< ezUuid, 16 > m_DraggedObjects
 
ezVec3 m_vAlignAxisWithNormal = ezVec3::MakeZero()
 
bool m_bSelectionAsRuntimeOverride = true
 
- Protected Attributes inherited from ezAssetDragDropHandler
ezDocumentm_pDocument
 

Member Function Documentation

◆ CanHandle()

float ezPrefabComponentDragDropHandler::CanHandle ( const ezDragDropInfo pInfo) const
overrideprotectedvirtual

Used to ask a handler whether it knows how to handle a certain drag & drop situation.

The return value is a priority. By default CanHandle should return 0 or 1. To override an existing handler, values larger than 1 may be returned to take precedence.

Reimplemented from ezComponentDragDropHandler.


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