25 #ifndef TBX_RES_RESDRAGGABLE_H
26 #define TBX_RES_RESDRAGGABLE_H
28 #include "resgadget.h"
40 enum {TYPE_ID = 640 };
268 #endif // TBX_RES_RESDRAGGABLE_H
void generate_drag_started(bool value)
Set if the draggable should generate an event when the drag has started.
Definition: resdraggable.h:112
void string_with_length(int offset, const char *value, int length=-1)
Assign a string where the length is at offset+4.
Definition: resbase.cc:1591
bool deliver_toolbox_ids() const
Check if the draggable will deliver Toolbox IDs on drag completion.
Definition: resdraggable.h:169
void message_with_length(int offset, const char *value, int length=-1)
Assign a message where the length is at offset+4.
Definition: resbase.cc:1639
ResBase & operator=(const ResBase &other)
Assignment.
Definition: resbase.cc:1534
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
void has_text(bool value)
Set if the draggable includes text.
Definition: resdraggable.h:140
Base class for gadget memory resources.
Definition: resgadget.h:43
int int_value(int offset) const
Get an integer value.
Definition: resbase.h:316
const char * sprite() const
Get the sprite name for the draggable.
Definition: resdraggable.h:238
ResDraggable(const ResGadget &other)
Construct an draggable gadget resource.
Definition: resdraggable.h:48
bool has_text() const
Check if the draggable includes text.
Definition: resdraggable.h:132
void draggable_type(DraggableType value)
Set the interaction with the mouse for this draggable.
Definition: resdraggable.h:162
void sprite(const char *value, int max_length=-1)
Set the sprite name for the draggable.
Definition: resdraggable.h:248
void sprite(const std::string &value, int max_length=-1)
Set the sprite name for the draggable.
Definition: resdraggable.h:258
void drop_shadow(bool value)
Set if the draggable will show a drop shadow when dragged.
Definition: resdraggable.h:187
int max_text_len() const
Get the maximum length for the text.
Definition: resdraggable.h:232
ResDraggable & operator=(const ResGadget &other)
Assign from a ResGadget.
Definition: resdraggable.h:70
void init_message(int offset, const char *value)
Initialise a message in a constructor helper.
Definition: resbase.cc:1736
int flag_value(int offset, int mask) const
Get the bits for the given mask.
Definition: resbase.h:362
bool not_dithered() const
Check if the draggable will be dithered when dragged.
Definition: resdraggable.h:193
ResDraggable(const ResDraggable &other)
Construct an draggable gadget resource.
Definition: resdraggable.h:58
Class for Draggable gadget template.
Definition: resdraggable.h:37
bool flag(int offset, int mask) const
Check if any of the bits in a mask are set.
Definition: resbase.h:352
int max_sprite_len() const
Get the maximum length of the sprite name for the draggable.
Definition: resdraggable.h:262
DraggableType
Enumerations for mouse actions allowed on the draggable.
Definition: resdraggable.h:146
void not_dithered(bool value)
Set if the draggable will be dithered when dragged.
Definition: resdraggable.h:199
@ DRAG_CLICK_DOUBLECLICK
click, drag and double click allowed
Definition: resdraggable.h:148
void text(const std::string &value, int max_length=-1)
Set the text for the draggable.
Definition: resdraggable.h:226
@ DRAG_ONLY
only allows a drag
Definition: resdraggable.h:147
void deliver_toolbox_ids(bool value)
Set if the draggable will deliver Toolbox IDs on drag completion.
Definition: resdraggable.h:175
void text(const char *value, int max_length=-1)
Set the text for the draggable.
Definition: resdraggable.h:216
bool generate_drag_started() const
Check if draggable should generate an event when the drag has started.
Definition: resdraggable.h:106
ResDraggable & operator=(const ResDraggable &other)
Assign from another draggable gadget resource.
Definition: resdraggable.h:82
bool has_sprite() const
Check if the draggable includes a sprite.
Definition: resdraggable.h:118
DraggableType draggable_type() const
Get the interaction with the mouse for this draggable.
Definition: resdraggable.h:156
const char * string(int offset) const
Return a string at the given offset.
Definition: resbase.cc:1555
void init_string(int offset, const char *value)
Initialise a string in a constructor helper.
Definition: resbase.cc:1725
void has_sprite(bool value)
Set if the draggable includes a sprite.
Definition: resdraggable.h:126
const char * text() const
Get the text for the draggable.
Definition: resdraggable.h:206
ResDraggable()
Construct a draggable gadget resource.
Definition: resdraggable.h:93
void check_type(int type) const
Check if this gadgets type is as specified.
Definition: reswindow.cc:97
@ DRAG_SELECT_DOUBLECLICK
click selects, double click and drag allowed
Definition: resdraggable.h:149
bool drop_shadow() const
Check if the draggable will show a drop shadow when dragged.
Definition: resdraggable.h:181
const char * message(int offset) const
Get the message string at the given offset.
Definition: resbase.cc:1602