class GUIDropButton

GUI element that accepts a drag and drop operation of a specified type.

Public

Methods

staticGetGuiTypeName

static const String &GetGuiTypeName()

Returns type name of the GUI element used for finding GUI element styles.

staticCreate

static GUIElementType *Create(const ContentType &contents, const String &styleClass, const TInlineArray<GUIOption, 4> &options)

Creates a new GUI element.

contents
Structure describing the contents of the GUI element to create.
styleClass
Style class that will be used for determining GUI element visuals from the current style sheet. If no class is provided, default style is determined based on GUI element type.
options
Additional options that control GUI element size and position. This will override options set in the style sheet.

Fields

OnDataDropped

Event<void (const SPtr<DragAndDropData> &)> OnDataDropped

Triggered when drag and drop operation finishes while over the button and is of the correct type.

Internal

Constructors

GUIDropButton

GUIDropButton(PrivatelyConstruct, const GUIDropButtonContent &content, const String &styleName, const GUISizeConstraints &sizeConstraints)

Protected

Methods

~GUIDropButton

virtual ~GUIDropButton() noexcept = default

DoOnMouseEvent

bool DoOnMouseEvent(const GUIMouseEvent &ev) override

Called when a mouse event is received on any GUI element the mouse is interacting with.

Return true if you have processed the event and don't want other elements to process it.

AcceptDragAndDrop

bool AcceptDragAndDrop(const GUIPhysicalPoint &position, u32 typeId) const override

Checks if the GUI element accepts a drag and drop operation of the specified type.

Fields

mDragType

u32 mDragType