tbx
0.7.3
|
Class to represent toolbox iconbar icon. More...
#include <iconbar.h>
Public Types | |
enum | { TOOLBOX_CLASS = 0x82900 } |
Public Member Functions | |
Iconbar () | |
Construct an uninitiased Iconbar. More... | |
Iconbar (const Iconbar &other) | |
Construct a Iconbar from another Iconbar. More... | |
Iconbar (const Object &other) | |
Construct a Iconbar from another toolbox object. More... | |
Iconbar (const char *template_name) | |
Construct a iconbar creating a toolbox iconbar object. More... | |
Iconbar (const res::ResIconbar &object_template) | |
Construct an iconbar creating a toolbox iconbar object. More... | |
Iconbar & | operator= (const Iconbar &other) |
Assign a Iconbar to an existing Iconbar. More... | |
Iconbar & | operator= (const Object &other) |
Assign a Iconbar to an existing object. More... | |
bool | operator== (const Object &other) const |
Checks if this Iconbar refers to the same underlying toolbox object as the given object. More... | |
bool | operator!= (const Object &other) const |
Checks if this Iconbar refers to the same underlying toolbox object as the given object. More... | |
int | icon_handle () const |
Return the underling WIMP icon handle of the icon bar. | |
void | menu (Menu m) |
Set the menu for the icon bar. More... | |
Menu | menu () const |
Get the menu from the icon bar. More... | |
void | help_message (const std::string &value) |
Set the help message of the icon bar. More... | |
std::string | help_message () const |
Get the current help message for the icon bar. More... | |
int | help_message_length () const |
Return the length of the current help message. More... | |
void | text (std::string value) |
Set the text for a text & sprite icon bar. More... | |
std::string | text () const |
Get the current text of the icon bar for a text & sprite icon bar. More... | |
int | text_length () const |
Get the length of the icon bar text. More... | |
void | sprite (const std::string &value) |
Set the sprite to use for the icon bar. More... | |
std::string | sprite () const |
Get the sprite used by the icon bar. More... | |
int | sprite_length () const |
Get sprite name length. | |
void | select_show (Object show_object) |
Set object to show when the icon bar is clicked with select. More... | |
Object | select_show () |
Get object shown when the icon bar is clicked with select. More... | |
void | adjust_show (Object show_object) |
Set the object to show when the icon bar is clicked with adjust. More... | |
Object | adjust_show () |
Get object shown when the icon bar is clicked with adjust. More... | |
void | add_click_listener (IconbarClickListener *listener) |
Add listener for button click with the select or adjust mouse buttons. More... | |
void | remove_click_listener (IconbarClickListener *listener) |
Remove listener for button click with the select or adjust mouse buttons. More... | |
void | add_click_command (Command *command) |
Add command to be run if the iconbar is clicked with the select or adjust mouse buttons. More... | |
void | remove_click_command (Command *command) |
Remove command to be run if the iconbar is clicked with the select or adjust mouse buttons. More... | |
void | add_select_command (Command *command) |
Add command to be run if the button is selected with the select mouse button. More... | |
void | remove_select_command (Command *command) |
Remove command to be run if the button is selected with the select mouse button. More... | |
void | add_adjust_command (Command *command) |
Add command to be run if the button is selected with the adjust mouse button only. More... | |
void | remove_adjust_command (Command *command) |
Remove command to be run if the button is selected with the adjust mouse button only. More... | |
void | add_loader (Loader *loader, int file_type=-2) |
Add a file loader. More... | |
void | remove_loader (Loader *loader, int file_type=-2) |
Remove a file loader. More... | |
![]() | |
Object () | |
Constructs an object unattached to a toolbox object. More... | |
Object (ObjectId handle) | |
Construct an object referencing the given toolbox object. More... | |
Object (const Object &other) | |
Construct an object referencing the same toolbox object as another. | |
Object (const std::string &template_name) | |
Create a toolbox object with the given name in the application resources and assign a reference to it in this object. More... | |
void | delete_object () |
Delete the underlying toolbox object. More... | |
bool | null () const |
Check if object has been initialised. More... | |
ObjectId | handle () const |
Return the underlying toolbox object id this object references. More... | |
Object & | operator= (const Object &other) |
Assign this object to reference the same toolbox object as another. More... | |
bool | operator== (const Object &other) const |
Check if this object references the same toolbox object as another. More... | |
bool | operator!= (const Object &other) const |
Check if this object does not reference the same toolbox object as another. More... | |
operator bool () const | |
Operator to check if an object has been initialised. More... | |
int | toolbox_class () const |
Get the toolbox class of this object. More... | |
void | check_toolbox_class (int class_id) const |
Check if this objects toolbox class is as specified. More... | |
void * | client_handle () const |
Return user defined handle stored against this object. More... | |
void | client_handle (void *client_handle) |
Set a user defined handle for this object. More... | |
Object | parent_object () const |
Get parent object. More... | |
Component | parent_component () const |
Get parent component. More... | |
Object | ancestor_object () const |
Get ancestor object. More... | |
Component | ancestor_component () const |
Get ancestor component. More... | |
void | show () |
Show the object at the default place. More... | |
void | hide () |
Hide the object. More... | |
bool | showing () const |
Check if an object is currently showing. | |
void | add_command (int command_id, Command *command) |
Add a command to this Object. More... | |
void | remove_command (int command_id, Command *command) |
Remove a command from this object. More... | |
void | add_user_event_listener (int event_id, UserEventListener *listener) |
Add a user event listener. More... | |
void | remove_user_event_listener (int event_id, UserEventListener *listener) |
Remove a user event listener from this object. More... | |
void | add_object_deleted_listener (ObjectDeletedListener *listener) |
Add listener for when the toolbox object referenced by this object has been deleted. More... | |
void | remove_object_deleted_listener (ObjectDeletedListener *listener) |
Remove listener for when the toolbox object referenced by this object has been deleted. More... | |
void | remove_all_listeners () |
Remove all listeners and commands from this object. More... | |
Additional Inherited Members | |
![]() | |
Object (const res::ResObject &object_template) | |
Protected constructor to create an object. | |
void | add_listener (int action, Listener *listener, RawToolboxEventHandler handler) |
Add a listener for the given toolbox event. More... | |
void | remove_listener (int action, Listener *listener) |
Remove listener for toolbox event. More... | |
void | set_handler (int action, Listener *listener, RawToolboxEventHandler handler) |
Set handler for an event that should not have more than one listener. More... | |
int | int_property (int property_id) const |
Return the value of a property that returns an integer. More... | |
void | int_property (int property_id, int value) |
Set the value of a property that requires an integer. More... | |
std::string | string_property (int property_id) const |
Return the value of a property that returns text. More... | |
void | string_property (int property_id, const std::string &value) |
Set the value of a property that requires a string. More... | |
int | string_property_length (int property_id) const |
Gets the size of a string properties buffer. More... | |
bool | bool_property (int property_id) const |
Get a boolean property from the toolbox Cobject. More... | |
void | bool_property (int property_id, bool value) |
Set a boolean property from the toolbox object. More... | |
![]() | |
ObjectId | _handle |
Handle for toolbox object. | |
Class to represent toolbox iconbar icon.
|
inline |
|
inline |
|
inline |
Construct a Iconbar from another toolbox object.
The Iconbar and the object will refer to the same underlying toolbox Iconbar
ObjectClassError | The object assigned to does not refer to a toolbox Iconbar |
|
inline |
Construct a iconbar creating a toolbox iconbar object.
template_name | name of icon bar template to use |
tbx::Iconbar::Iconbar | ( | const res::ResIconbar & | object_template | ) |
Construct an iconbar creating a toolbox iconbar object.
object_template | in memory template used to create the toolbox iconbar |
void tbx::Iconbar::add_adjust_command | ( | Command * | command | ) |
Add command to be run if the button is selected with the adjust mouse button only.
command | command to add |
void tbx::Iconbar::add_click_command | ( | Command * | command | ) |
Add command to be run if the iconbar is clicked with the select or adjust mouse buttons.
command | command to add |
void tbx::Iconbar::add_click_listener | ( | IconbarClickListener * | listener | ) |
Add listener for button click with the select or adjust mouse buttons.
Requires the icon bar to generate the default clicked event.
listener | listener to add |
void tbx::Iconbar::add_loader | ( | Loader * | loader, |
int | file_type = -2 |
||
) |
Add a file loader.
loader | the loader to add |
file_type | the file type for the loader or -2 (the default) for any type. |
void tbx::Iconbar::add_select_command | ( | Command * | command | ) |
Add command to be run if the button is selected with the select mouse button.
command | command to add |
void tbx::Iconbar::adjust_show | ( | Object | show_object | ) |
Set the object to show when the icon bar is clicked with adjust.
show_object | object to show |
Object tbx::Iconbar::adjust_show | ( | ) |
Get object shown when the icon bar is clicked with adjust.
void tbx::Iconbar::help_message | ( | const std::string & | value | ) |
Set the help message of the icon bar.
value | new help message |
std::string tbx::Iconbar::help_message | ( | ) | const |
Get the current help message for the icon bar.
int tbx::Iconbar::help_message_length | ( | ) | const |
Return the length of the current help message.
void tbx::Iconbar::menu | ( | Menu | m | ) |
Set the menu for the icon bar.
m | new menu for icon bar |
Menu tbx::Iconbar::menu | ( | ) | const |
Get the menu from the icon bar.
|
inline |
Assign a Iconbar to an existing object.
The Iconbar and the object will refer to the same underlying toolbox Iconbar
ObjectClassError | The object assigned to does not refer to a toolbox Iconbar |
|
inline |
void tbx::Iconbar::remove_adjust_command | ( | Command * | command | ) |
Remove command to be run if the button is selected with the adjust mouse button only.
command | command to remove |
void tbx::Iconbar::remove_click_command | ( | Command * | command | ) |
Remove command to be run if the iconbar is clicked with the select or adjust mouse buttons.
command | command to remove |
void tbx::Iconbar::remove_click_listener | ( | IconbarClickListener * | listener | ) |
Remove listener for button click with the select or adjust mouse buttons.
listener | listener to remove |
void tbx::Iconbar::remove_loader | ( | Loader * | loader, |
int | file_type = -2 |
||
) |
Remove a file loader.
loader | the loader to remove |
file_type | the file type for the loader or -2 (the default) for any type. |
void tbx::Iconbar::remove_select_command | ( | Command * | command | ) |
Remove command to be run if the button is selected with the select mouse button.
command | command to remove |
void tbx::Iconbar::select_show | ( | Object | show_object | ) |
Set object to show when the icon bar is clicked with select.
show_object | object to show |
Object tbx::Iconbar::select_show | ( | ) |
Get object shown when the icon bar is clicked with select.
void tbx::Iconbar::sprite | ( | const std::string & | value | ) |
Set the sprite to use for the icon bar.
value | new sprite name |
std::string tbx::Iconbar::sprite | ( | ) | const |
Get the sprite used by the icon bar.
void tbx::Iconbar::text | ( | std::string | value | ) |
Set the text for a text & sprite icon bar.
value | new value of text |
OsError | if the text is longer than the maximum size specified when the Icon bar icon was created |
std::string tbx::Iconbar::text | ( | ) | const |
Get the current text of the icon bar for a text & sprite icon bar.
int tbx::Iconbar::text_length | ( | ) | const |
Get the length of the icon bar text.