25 #ifndef TBX_RES_RESGADGET_H 26 #define TBX_RES_RESGADGET_H 29 #include "../handles.h" 51 void *header()
const {
return _impl->header();}
88 ResImpl *new_impl =
new ResImpl(*
_impl);
170 static int gadget_size(
unsigned int type_and_size);
266 #endif // TBX_RES_RESGADGET_H A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
Base class for gadget memory resources.
Definition: resgadget.h:42
bool faded() const
Check if the gadget is faded.
Definition: resgadget.h:132
Base class for objects, gadgets and menu items from ressources.
Definition: resbase.h:252
void flags(unsigned int value)
Set all flags as a word.
Definition: resgadget.h:112
unsigned int flags() const
Get all flags as a word raw access.
Definition: resgadget.h:102
void help_message(const std::string &msg, int max_length=-1)
Set the help message for the gadget.
Definition: resgadget.h:255
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
bool flag(int offset, int mask) const
Check if any of the bits in a mask are set.
Definition: resbase.h:352
int ComponentId
Type for underlying toolbox component id.
Definition: handles.h:33
unsigned short type() const
Get the gadget type.
Definition: resgadget.h:145
int ymin() const
Get the minimum y coordinate of the gadget's bounding box.
Definition: resgadget.h:189
unsigned int uint_value(int offset) const
Get an unsigned integer value.
Definition: resbase.h:324
Classes to use/edit toolbox resources in memory.
ResGadget(const ResGadget &other)
Construct a resource gadget as a copy of another.
Definition: resgadget.h:59
Window resource object.
Definition: reswindow.h:48
void component_id(ComponentId value)
Set the Component ID.
Definition: resgadget.h:232
void xmax(int x)
Set the maximum x coordinate of the gadget's bounding box.
Definition: resgadget.h:207
int xmin() const
Get the minimum x coordinate of the gadget's bounding box.
Definition: resgadget.h:177
int int_value(int offset) const
Get an integer value.
Definition: resbase.h:316
unsigned short stored_size() const
Get the size stored in template.
Definition: resgadget.h:155
static int gadget_size(unsigned int type_and_size)
Get gadget size given its type and size value.
Definition: reswindow.cc:36
void back(bool value)
Set if gadget should be at the back.
Definition: resgadget.h:125
ComponentId component_id() const
Get the Component ID.
Definition: resgadget.h:226
int xmax() const
Get the maximum x coordinate of the gadget's bounding box.
Definition: resgadget.h:201
const char * message(int offset) const
Get the message string at the given offset.
Definition: resbase.cc:1602
The Window object represents a toolbox window.
Definition: window.h:69
ResGadget & operator=(const ResGadget &other)
Assign a resource gadget as a copy of another.
Definition: resgadget.h:70
unsigned short ushort_value(int offset) const
Get a unsigned short value.
Definition: resbase.h:342
void help_message(const char *msg, int max_length=-1)
Set the help message for the gadget.
Definition: resgadget.h:247
ResBase & operator=(const ResBase &other)
Assignment.
Definition: resbase.cc:1534
int max_help() const
Max size of message.
Definition: resgadget.h:260
void xmin(int x)
Set the minimum x coordinate of the gadget's bounding box.
Definition: resgadget.h:183
bool back() const
Check if gadget is at the back (created first)
Definition: resgadget.h:119
int ymax() const
Get the maximum y coordinate of the gadget's bounding box.
Definition: resgadget.h:213
void make_writeable()
Make item writeable.
Definition: resgadget.h:84
void faded(bool value)
Set if the gadget is faded.
Definition: resgadget.h:138
void ymin(int y)
Set the minimum y coordinate of the gadget's bounding box.
Definition: resgadget.h:195
void check_type(int type) const
Check if this gadgets type is as specified.
Definition: reswindow.cc:97
const char * help_message() const
Get the help message for the gadget.
Definition: resgadget.h:239
int size() const
Size of gadget (including header).
Definition: resgadget.h:163
void ymax(int y)
Set the maximum y coordinate of the gadget's bounding box.
Definition: resgadget.h:219
ResImpl * _impl
Internal Resource implementation.
Definition: resbase.h:255