tbx
0.7.3
|
Class for ActionButton gadget template. More...
#include <resactionbutton.h>
Public Types | |
enum | { TYPE_ID = 128 } |
Public Member Functions | |
ResActionButton (const ResGadget &other) | |
Construct an action button gadget resource. More... | |
ResActionButton (const ResActionButton &other) | |
Construct an action button gadget resource. More... | |
ResActionButton & | operator= (const ResGadget &other) |
Assign from a ResGadget. More... | |
ResActionButton & | operator= (const ResActionButton &other) |
Assign from another action button gadget resource. More... | |
ResActionButton () | |
Construct a action button gadget resource. More... | |
bool | is_default () const |
Check if this is the default button. More... | |
void | is_default (bool value) |
Set if this is a default button. More... | |
bool | cancel () const |
Check if this is the cancel button. More... | |
void | cancel (bool value) |
Set if this is the cancel button. More... | |
bool | local () const |
Check if this is a local button. More... | |
void | local (bool value) |
Set if this is a local button. More... | |
bool | click_show_transient () const |
Check if the object shown on a click is transient. More... | |
void | click_show_transient (bool value) |
Set if the object shown on a click is transient. More... | |
const char * | text () const |
Get the text for the button. More... | |
void | text (const char *value, int max_length=-1) |
Set the text for the button. More... | |
void | text (const std::string &value, int max_length=-1) |
Set the text for the button. More... | |
int | max_text_len () const |
Get the maximum length for the text. More... | |
const char * | click_show () const |
Get the name of object to show on click. More... | |
void | click_show (const char *value) |
Set the name of the object to show on click. More... | |
void | click_show (const std::string &value) |
Set the name of the object to show on click. More... | |
int | event () const |
Get the event number generated by this button. More... | |
void | event (int value) |
Set the event number to be generated by this button. More... | |
![]() | |
ResGadget (const ResGadget &other) | |
Construct a resource gadget as a copy of another. More... | |
ResGadget & | operator= (const ResGadget &other) |
Assign a resource gadget as a copy of another. More... | |
ResGadget (int type, int size) | |
Construct an empty gadget of the given type and size. More... | |
void | check_type (int type) const |
Check if this gadgets type is as specified. More... | |
unsigned int | flags () const |
Get all flags as a word raw access. More... | |
void | flags (unsigned int value) |
Set all flags as a word. More... | |
bool | back () const |
Check if gadget is at the back (created first) More... | |
void | back (bool value) |
Set if gadget should be at the back. More... | |
bool | faded () const |
Check if the gadget is faded. More... | |
void | faded (bool value) |
Set if the gadget is faded. More... | |
unsigned short | type () const |
Get the gadget type. More... | |
unsigned short | stored_size () const |
Get the size stored in template. More... | |
int | size () const |
Size of gadget (including header). More... | |
int | xmin () const |
Get the minimum x coordinate of the gadget's bounding box. More... | |
void | xmin (int x) |
Set the minimum x coordinate of the gadget's bounding box. More... | |
int | ymin () const |
Get the minimum y coordinate of the gadget's bounding box. More... | |
void | ymin (int y) |
Set the minimum y coordinate of the gadget's bounding box. More... | |
int | xmax () const |
Get the maximum x coordinate of the gadget's bounding box. More... | |
void | xmax (int x) |
Set the maximum x coordinate of the gadget's bounding box. More... | |
int | ymax () const |
Get the maximum y coordinate of the gadget's bounding box. More... | |
void | ymax (int y) |
Set the maximum y coordinate of the gadget's bounding box. More... | |
ComponentId | component_id () const |
Get the Component ID. More... | |
void | component_id (ComponentId value) |
Set the Component ID. More... | |
const char * | help_message () const |
Get the help message for the gadget. More... | |
void | help_message (const char *msg, int max_length=-1) |
Set the help message for the gadget. More... | |
void | help_message (const std::string &msg, int max_length=-1) |
Set the help message for the gadget. More... | |
int | max_help () const |
Max size of message. | |
![]() | |
ResBase (const ResBase &other) | |
Copy constructor. More... | |
virtual | ~ResBase () |
Destructor. | |
ResBase & | operator= (const ResBase &other) |
Assignment. More... | |
Additional Inherited Members | |
![]() | |
static int | gadget_size (unsigned int type_and_size) |
Get gadget size given its type and size value. More... | |
![]() | |
void | make_writeable () |
Make item writeable. | |
![]() | |
ResBase (ResImpl *impl) | |
Create from internal resource implementation. More... | |
const char * | string (int offset) const |
Return a string at the given offset. More... | |
void | string (int offset, const char *value) |
Set a string at the given offset. More... | |
void | string (int offset, std::string value) |
Set a string at the given offset. More... | |
void | string_with_length (int offset, const char *value, int length=-1) |
Assign a string where the length is at offset+4. More... | |
void | string_with_length (int offset, const std::string &value, int length=-1) |
Assign a string where the length is at offset+4. More... | |
const char * | message (int offset) const |
Get the message string at the given offset. More... | |
void | message (int offset, const char *value) |
Set a message at the given offset. More... | |
void | message (int offset, std::string value) |
Set a message at the given offset. More... | |
void | message_with_length (int offset, const char *value, int length=-1) |
Assign a message where the length is at offset+4. More... | |
void | message_with_length (int offset, const std::string &value, int length=-1) |
Assign a message where the length is at offset+4. More... | |
int | int_value (int offset) const |
Get an integer value. More... | |
void | int_value (int offset, int value) |
Set a number at the specified offset. More... | |
unsigned int | uint_value (int offset) const |
Get an unsigned integer value. More... | |
void | uint_value (int offset, unsigned int value) |
Set an unsigned number at the specified offset. More... | |
unsigned char | byte_value (int offset) const |
Get a byte value. More... | |
void | byte_value (int offset, unsigned char value) |
Set an unsigned byte (8 bit value) at the specified offset. More... | |
unsigned short | ushort_value (int offset) const |
Get a unsigned short value. More... | |
void | ushort_value (int offset, unsigned short value) |
Set an unsigned short (16 bit value) at the specified offset. More... | |
bool | flag (int offset, int mask) const |
Check if any of the bits in a mask are set. More... | |
void | flag (int offset, int mask, bool on) |
Set/clear the bits in mask. More... | |
int | flag_value (int offset, int mask) const |
Get the bits for the given mask. More... | |
void | flag_value (int offset, int mask, int value) |
Set bits in given mask clearing others. More... | |
void | init_string (int offset, const char *value) |
Initialise a string in a constructor helper. More... | |
void | init_message (int offset, const char *value) |
Initialise a message in a constructor helper. More... | |
void | init_sprite_area_ref (int offset) |
Initialise a sprite area reference. More... | |
void | init_object_ref (int offset) |
Initialise an object reference. More... | |
![]() | |
ResImpl * | _impl |
Internal Resource implementation. | |
Class for ActionButton gadget template.
|
inline |
Construct an action button gadget resource.
other | ResGadget to copy resource from |
ResGadgetTypeMismatch | if the ResGadget is not an action button |
|
inline |
Construct an action button gadget resource.
other | action button to copy resource from |
|
inline |
Construct a action button gadget resource.
All options are false, events unset and messages are null.
|
inline |
Check if this is the cancel button.
The cancel button is also activated by pressing escape in the window.
|
inline |
Set if this is the cancel button.
The cancel button is also activated by pressing escape in the window.
value | true to make this the cancel button |
|
inline |
Get the name of object to show on click.
|
inline |
Set the name of the object to show on click.
value | name of object to show or 0 for no object |
|
inline |
Set the name of the object to show on click.
value | name of object to show |
|
inline |
Check if the object shown on a click is transient.
|
inline |
Set if the object shown on a click is transient.
value | true to make the shown object is transient. |
|
inline |
Get the event number generated by this button.
|
inline |
Set the event number to be generated by this button.
value | event number or 0 to generate the default event |
|
inline |
Check if this is the default button.
The default button is displayed slightly differently and is activated when return is pressed.
|
inline |
Set if this is a default button.
The default button is displayed slightly differently and is activated when return is pressed in the window.
value | true to make this button the default button |
|
inline |
Check if this is a local button.
A local button does not close the window when it is selected, whereas a non-local button will close the window when selected.
|
inline |
Set if this is a local button.
A local button does not close the window when it is selected, whereas a non-local button will close the window when selected.
value | true to make this a local button |
|
inline |
Get the maximum length for the text.
|
inline |
Assign from a ResGadget.
other | ResGadget to copy |
ResGadgetTypeMismatch | if the ResGadget is not an action button |
|
inline |
Assign from another action button gadget resource.
other | action button gadget resource to copy |
|
inline |
Get the text for the button.
|
inline |
Set the text for the button.
value | the text for the button |
max_length | the maximum length the text will be changed to after the gadget is created. The default (-1) will use the length of value |
|
inline |
Set the text for the button.
value | the text for the button |
max_length | the maximum length the text will be changed to when the gadget is created. The default (-1) will use the length of value |