tbx
0.7.3
|
Class for ToolAction gadget template. More...
#include <restoolaction.h>
Public Types | |
enum | { TYPE_ID = 0x4014 } |
Public Member Functions | |
ResToolAction (const ResGadget &other) | |
Construct an tool action gadget resource. More... | |
ResToolAction (const ResToolAction &other) | |
Construct an tool action gadget resource. More... | |
ResToolAction & | operator= (const ResGadget &other) |
Assign from a ResGadget. More... | |
ResToolAction & | operator= (const ResToolAction &other) |
Assign from another tool action gadget resource. More... | |
ResToolAction () | |
Construct a tool action gadget resource. More... | |
bool | generate_select () const |
Check if the select event will be generated. More... | |
void | generate_select (bool value) |
Set if the select event will be generated. More... | |
bool | has_text () const |
Check if tool action shows text. More... | |
void | has_text (bool value) |
Set if tool action shows text. More... | |
bool | on () const |
Check if the tool action starts off in the on state. More... | |
void | on (bool value) |
Set if the tool action starts off in the on state. More... | |
bool | auto_toggle () const |
Check if the tool action should automatically toggle between states. More... | |
void | auto_toggle (bool value) |
Set if the tool action should automatically toggle between states. More... | |
bool | no_pressed_sprite () const |
Check if there is no sprite for the pressed state. More... | |
void | no_pressed_sprite (bool value) |
Set if there is no sprite for the pressed state. More... | |
bool | auto_repeat () const |
Check if button presses auto repeat. More... | |
void | auto_repeat (bool value) |
Set if button presses auto repeat. More... | |
bool | show_transient () const |
Check if the select show object will be shown transiently. More... | |
void | show_transient (bool value) |
Set if the select show object will be shown transiently. More... | |
bool | show_as_pop_up () const |
Check if the select show object will be shown as a pop up. More... | |
void | show_as_pop_up (bool value) |
Set if the select show object will be shown pop up. More... | |
bool | has_fade_sprite () const |
Check if the tool action has a faded sprite provided. More... | |
void | has_fade_sprite (bool value) |
Set if the tool action has a faded sprite provided. More... | |
const char * | off_ident () const |
Get the text or sprite name shown when the tool action is off. More... | |
void | off_ident (const char *value, int max_length=-1) |
Set the text or sprite name shown when the tool action is off. More... | |
void | off_ident (const std::string &value, int max_length=-1) |
Set the text or sprite name shown when the tool action is off. More... | |
int | max_off_ident () const |
Get the maximum length of the off identifier. | |
const char * | on_ident () const |
Get the text or sprite name shown when the tool action is on. More... | |
void | on_ident (const char *value, int max_length=-1) |
Set the text or sprite name shown when the tool action is on. More... | |
void | on_ident (const std::string &value, int max_length=-1) |
Set the text or sprite name shown when the tool action is on. More... | |
int | max_on_ident () const |
Get the maximum length of the on identifier. | |
int | click_event () const |
Get the event that will generated when the tool action is clicked. More... | |
void | click_event (int value) |
Set the event that will generated when the tool action is clicked. More... | |
const char * | select_show () const |
Get the name of the object shown when select is clicked. More... | |
void | select_show (const char *value) |
Set the name of the object shown when select is clicked. More... | |
void | select_show (const std::string &value) |
Set the name of the object shown when select is clicked. More... | |
int | adjust_event () const |
Get the event that will generated when the tool action is clicked with adjust. More... | |
void | adjust_event (int value) |
Set the event that will generated when the tool action is clicked with adjust. More... | |
const char * | adjust_show () const |
Get the name of the object shown when adjust is clicked. More... | |
void | adjust_show (const char *value) |
Set the name of the object shown when adjust is clicked. More... | |
void | adjust_show (const std::string &value) |
Set the name of the object shown when adjust is clicked. More... | |
const char * | fade_ident () const |
Get the text or sprite name for the faded tool action. More... | |
void | fade_ident (const char *value, int max_length=-1) |
Set the text or sprite name shown when the tool action is faded. More... | |
void | fade_ident (const std::string &value, int max_length=-1) |
Set the text or sprite name shown when the tool action is faded. More... | |
int | max_fade () const |
Get the maximum length of the faded identifier. | |
![]() | |
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 ToolAction gadget template.
|
inline |
Construct an tool action gadget resource.
other | ResGadget to copy resource from |
ResGadgetTypeMismatch | if the ResGadget is not an tool action |
|
inline |
Construct an tool action gadget resource.
other | tool action to copy resource from |
|
inline |
Construct a tool action gadget resource.
All options are false, events unset and messages are null.
|
inline |
Get the event that will generated when the tool action is clicked with adjust.
|
inline |
Set the event that will generated when the tool action is clicked with adjust.
value | event ID of event generated or 0 for the default |
|
inline |
Get the name of the object shown when adjust is clicked.
|
inline |
Set the name of the object shown when adjust is clicked.
value | pointer to zero terminate object name or 0 if none |
|
inline |
Set the name of the object shown when adjust is clicked.
value | object name |
|
inline |
Check if button presses auto repeat.
|
inline |
Set if button presses auto repeat.
value | set to true to make button presses auto repeat |
|
inline |
Check if the tool action should automatically toggle between states.
|
inline |
Set if the tool action should automatically toggle between states.
value | set to true to turn auto toggle on |
|
inline |
Get the event that will generated when the tool action is clicked.
|
inline |
Set the event that will generated when the tool action is clicked.
value | event ID of event generated or 0 for the default |
|
inline |
Get the text or sprite name for the faded tool action.
The has_text() method determines if this refers to text or a sprite
|
inline |
Set the text or sprite name shown when the tool action is faded.
The has_text() method determines if this refers to text or a sprite
value | pointer to zero terminated text/sprite name or 0 if none |
max_length | The maximum length the faded text will be changed to when the tool action is shown or -1 (the default) for the length of value. |
|
inline |
Set the text or sprite name shown when the tool action is faded.
The has_text() method determines if this refers to text or a sprite
value | text/sprite name |
max_length | The maximum length the faded text will be changed to when the tool action is shown or -1 (the default) for the length of value. |
|
inline |
Check if the select event will be generated.
|
inline |
Set if the select event will be generated.
value | set to true if the select event will be generated |
|
inline |
Check if the tool action has a faded sprite provided.
|
inline |
Set if the tool action has a faded sprite provided.
value | set to true if a faded sprite is provided |
|
inline |
Check if tool action shows text.
|
inline |
Set if tool action shows text.
value | set to true if the tool action shows text |
|
inline |
Check if there is no sprite for the pressed state.
|
inline |
Set if there is no sprite for the pressed state.
value | set to true if there is no pressed sprite |
|
inline |
Get the text or sprite name shown when the tool action is off.
The has_text() method determines if this refers to text or a sprite
|
inline |
Set the text or sprite name shown when the tool action is off.
The has_text() method determines if this refers to text or a sprite
value | pointer to zero terminated text/sprite name or 0 if none |
max_length | The maximum length the off text will be changed to when the tool action is shown or -1 (the default) for the length of value. |
|
inline |
Set the text or sprite name shown when the tool action is off.
The has_text() method determines if this refers to text or a sprite
value | text/sprite name |
max_length | The maximum length the off text will be changed to when the tool action is shown or -1 (the default) for the length of value. |
|
inline |
Check if the tool action starts off in the on state.
|
inline |
Set if the tool action starts off in the on state.
value | set to true to set the tool action on |
|
inline |
Get the text or sprite name shown when the tool action is on.
The has_text() method determines if this refers to text or a sprite
|
inline |
Set the text or sprite name shown when the tool action is on.
The has_text() method determines if this refers to text or a sprite
value | pointer to zero terminated text/sprite name or 0 if none |
max_length | The maximum length the on text will be changed to when the tool action is shown or -1 (the default) for the length of value. |
|
inline |
Set the text or sprite name shown when the tool action is on.
The has_text() method determines if this refers to text or a sprite
value | text/sprite name |
max_length | The maximum length the on text will be changed to when the tool action is shown or -1 (the default) for the length of value. |
|
inline |
Assign from a ResGadget.
other | ResGadget to copy |
ResGadgetTypeMismatch | if the ResGadget is not an tool action |
|
inline |
Assign from another tool action gadget resource.
other | tool action gadget resource to copy |
|
inline |
Get the name of the object shown when select is clicked.
|
inline |
Set the name of the object shown when select is clicked.
value | pointer to zero terminate object name or 0 if none |
|
inline |
Set the name of the object shown when select is clicked.
value | object name |
|
inline |
Check if the select show object will be shown as a pop up.
|
inline |
Set if the select show object will be shown pop up.
value | set to true if the select show object should be shown pop up |
|
inline |
Check if the select show object will be shown transiently.
|
inline |
Set if the select show object will be shown transiently.
value | set to true if the select show object should be shown transiently |