Payload#

Fully qualified name: carb::simplegui::Payload

Defined in carb/simplegui/SimpleGuiTypes.h

struct Payload#

Data payload for Drag and Drop operations: acceptDragDropPayload(), getDragDropPayload()

Public Functions

inline Payload()#

Constructor.

inline void clear()#

Resets the state to cleared.

inline bool isDataType(const char *type) const#

Checks if the Payload matches the given type.

Parameters:

type – The type that should be checked against the dataType member.

Returns:

true if the type matches dataType; false otherwise.

inline bool isPreview() const#

Returns the state of the preview member.

Returns:

The state of the preview member.

inline bool isDelivery() const#

Returns the state of the delivery member.

Returns:

The state of the delivery member.

Public Members

void *data#

Data (copied and owned by simplegui)

int dataSize#

Data size.

uint32_t sourceId#

Source item id.

uint32_t sourceParentId#

Source parent id (if available)

int dataFrameCount#

Data timestamp.

char dataType[32 + 1]#

Data type tag (short user-supplied string, 32 characters max)

bool preview#

Set when AcceptDragDropPayload() was called and mouse has been hovering the target item (nb: handle overlapping drag targets)

bool delivery#

Set when AcceptDragDropPayload() was called and mouse button is released over the target item.