|
| Button () |
| Construct an uninitialised button.
|
|
| ~Button () |
| Destroy a button gadget. More...
|
|
| Button (const Button &other) |
| Construct a button from another button. More...
|
|
| Button (const Gadget &other) |
| Construct a button from another gadget. More...
|
|
| Button (const Component &other) |
| Construct a button from a component. More...
|
|
Button & | operator= (const Button &other) |
| Assign a button to refer to the same underlying toolbox gadget as another.
|
|
Button & | operator= (const Gadget &other) |
| Assign a button to refer to the same underlying toolbox gadget as an existing Gadget. More...
|
|
Button & | operator= (const Component &other) |
| Assign a button to refer to the same underlying toolbox component as an existing Gadget. More...
|
|
bool | operator== (const Gadget &other) const |
| Check if this button refers to the same underlying toolbox gadget as another gadget. More...
|
|
bool | operator!= (const Gadget &other) const |
| Check if this button refers to the same underlying toolbox gadget as another gadget. More...
|
|
int | flags () const |
| Returns the flags for the button, these are the same as for a wimp icon. More...
|
|
void | flags (int clear, int eor) |
| Set the button flags. More...
|
|
bool | has_text () const |
| Check if the button shows text. More...
|
|
void | has_text (bool value) |
| Set if the button shows text. More...
|
|
bool | is_sprite () const |
| Check if the button shows a sprite. More...
|
|
void | is_sprite (bool value) |
| Set if the button shows a sprite. More...
|
|
bool | has_border () const |
| Check if the button has a border. More...
|
|
void | has_border (bool value) |
| Set if the button has a border. More...
|
|
bool | hcentred () const |
| Check if the contents of the button are horizontally centred. More...
|
|
void | hcentred (bool value) |
| Set if the contents of the button are horizontally centred. More...
|
|
bool | vcentred () const |
| Check if the contents of the button are vertically centred. More...
|
|
void | vcentred (bool value) |
| Set if the contents of the button are vertically centred. More...
|
|
bool | filled () const |
| Check if the button background is filled. More...
|
|
void | filled (bool value) |
| Set if the button background is filled. More...
|
|
bool | anti_aliased_font () const |
| Check if the button uses an anti aliased font. More...
|
|
void | anti_aliased_font (bool value) |
| Set if the button uses an anti aliased font. More...
|
|
bool | redraw_needs_help () const |
| Check if the button need help from the user application to be redrawn. More...
|
|
void | redraw_needs_help (bool value) |
| Set if the button need help from the user application to be redrawn. More...
|
|
bool | text_right_justified () const |
| Check if the text on the button is right justified. More...
|
|
void | text_right_justified (bool value) |
| Set if the text on the button is right justified. More...
|
|
bool | adjust_does_not_cancel () const |
| Check if the adjust does not cancel other selections in the same ESG group. More...
|
|
void | adjust_does_not_cancel (bool value) |
| Set if the adjust does not cancel other selections in the same ESG group. More...
|
|
bool | half_size_sprite () const |
| Check if the button display the sprite half size. More...
|
|
void | half_size_sprite (bool value) |
| Set if the button shows the sprite half size. More...
|
|
ButtonType | button_type () const |
| Get how the button processes mouse clicks. More...
|
|
void | button_type (ButtonType type) |
| Set how the button processes mouse clicks. More...
|
|
int | esg () const |
| Return the exclusive selection group (ESG) for the button. More...
|
|
void | esg (int value) |
| Set the exclusive selection group (ESG) for the button. More...
|
|
WimpColour | foreground () const |
| Return the foreground WIMP colour. More...
|
|
void | foreground (WimpColour value) |
| Set the foreground WIMP colour. More...
|
|
WimpColour | background () const |
| Return the background WIMP colour. More...
|
|
void | background (WimpColour value) |
| Set the background WIMP colour. More...
|
|
int | font_handle () const |
| Get the WIMP font handle for drawing text. More...
|
|
void | font_handle (int value) |
| Set the WIMP font handle for drawing text. More...
|
|
void | value (std::string v) |
| Set the button value. More...
|
|
std::string | value () const |
| Get the button value.
|
|
int | value_length () const |
| Return the length of the button value.
|
|
void | validation (std::string v) |
| Set the button validation.
|
|
std::string | validation () const |
| Get the button validation.
|
|
int | validation_length () const |
| Return the length of the button validation.
|
|
void | font (const std::string &name, int width, int height) |
| Set the font used for the button. More...
|
|
void | system_font (int width, int height) |
| Set the button to use the system font to display the text. More...
|
|
void | add_mouse_click_listener (MouseClickListener *listener) |
| Add listener for mouse click on the button.
|
|
void | remove_mouse_click_listener (MouseClickListener *listener) |
| Remove listener for mouse click on the button.
|
|
| Gadget () |
| Construct an uninitialised gadget. More...
|
|
| Gadget (const Gadget &other) |
| Construct a gadget as a copy of another gadget object. More...
|
|
| Gadget (const Component &other) |
| Construct a gadget as a copy of another component object. More...
|
|
Window | window () |
| Get the window that contains this gadget.
|
|
Window | window () const |
| Get the window that contains this gadget.
|
|
Gadget & | operator= (const Gadget &other) |
| Assign this gadget to refer to the same underlying toolbox gadget as another gadget.
|
|
Gadget & | operator= (const Component &other) |
| Assign this gadget to refer to the same underlying toolbox gadget as the specified Component. More...
|
|
bool | operator== (const Component &other) const |
| Check if this gadget refers to the same underlying toolbox component as the given Component. More...
|
|
bool | operator!= (const Component &other) const |
| Check if this gadget refers to the same underlying toolbox component as the given Component. More...
|
|
bool | operator== (const Gadget &other) const |
| Check if this gadget refers to the same underlying toolbox component as the given Gadget. More...
|
|
bool | operator!= (const Gadget &other) const |
| Check if this gadget refers to the same underlying toolbox component as the given Gadget. More...
|
|
void | check_toolbox_class (int class_id) const |
| Check the underlying gadget class for this object has the given class id. More...
|
|
int | toolbox_class () const |
| Get the toolbox class for a gadget. More...
|
|
int | toolbox_class_and_size () const |
| Get the toolbox class and size for a gadget. More...
|
|
unsigned int | flags () const |
| Return the gadget flags. More...
|
|
void | set_flag (unsigned int set) |
| Sets bits in the gadgets flags. More...
|
|
void | clear_flag (unsigned int clear) |
| Clear bits in the gadget flags. More...
|
|
void | fade () |
| Fade the gadget.
|
|
void | unfade () |
| Clear the gadgets fade state.
|
|
void | fade (bool fade) |
| Fade/unfade the gadget. More...
|
|
bool | faded () const |
| Check if the gadget is faded. More...
|
|
void | focus () |
| Set input focus to the gadget. More...
|
|
std::vector< IconHandle > | icon_list () |
| Get list of icons used in this gadget. More...
|
|
BBox | bounds () const |
| Get the bounding box of the gadget.
|
|
void | bounds (const BBox &bounds) |
| Set the bounds of the gadget. More...
|
|
Point | bottom_left () const |
| Get the bottom left location of gadget. More...
|
|
Point | top_left () const |
| Get the top left location of gadget. More...
|
|
void | move_to (const Point &pos) |
| Move gadget (without resizing) More...
|
|
void | move_to (int x, int y) |
| Move gadget without resizing. More...
|
|
void | move_by (int bx, int by) |
| Move gadget relative to it's current position without resizing. More...
|
|
Size | size () const |
| Return the size of the gadget. More...
|
|
void | size (const Size &sz) |
| Set size of gadget without moving it. 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...
|
|
| Component () |
| Construct an uninitialised component. More...
|
|
| Component (Object obj, ComponentId id) |
| Construct a component from an object and component id. More...
|
|
| Component (ObjectId handle, ComponentId id) |
| Construct a component from an object handle and component id. More...
|
|
bool | null () const |
| Check if this component is in an uninitialised state. More...
|
|
Object | object () |
| Return the object his component belongs to.
|
|
Object | object () const |
| Return the object his component belongs to.
|
|
ObjectId | handle () const |
| Return the object handle for his component.
|
|
ComponentId | id () const |
| Get the component ID of this component. More...
|
|
Component & | operator= (const Component &other) |
| Assign the Component to refer to the same underlying toolbox component.
|
|
bool | operator== (const Component &other) const |
| Check if this component refers to the same underlying toolbox component. More...
|
|
bool | operator!= (const Component &other) const |
| Check if this component refers to the same underlying toolbox gadget. More...
|
|
| operator bool () const |
| Operator to check if this component has been initialised. More...
|
|
void | add_command (int command_id, Command *command) |
| Add a command to this Component. More...
|
|
void | remove_command (int command_id, Command *command) |
| Remove a command from this component. 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 component. More...
|
|
void | remove_all_listeners () |
| Remove all the listeners on this component. More...
|
|
|
void | add_listener (int action, Listener *listener, RawToolboxEventHandler handler) |
| Helper function to add listeners to this component. More...
|
|
void | remove_listener (int action, Listener *listener) |
| Helper function to remove listeners from this component.
|
|
void | add_window_listener (int event_code, Listener *listener) |
| Helper function to add a listener for a WIMP window event.
|
|
void | remove_window_listener (int event_code, Listener *listener) |
| Helper function to remove a listener for a WIMP window event.
|
|
int | int_property (int property_id) const |
| Get an integer property from the toolbox Component. More...
|
|
void | int_property (int property_id, int value) |
| Set an integer property from the toolbox object. More...
|
|
bool | bool_property (int property_id) const |
| Get a boolean property from the toolbox Component. More...
|
|
void | bool_property (int property_id, bool value) |
| Set a boolean property from the toolbox object. More...
|
|
std::string | string_property (int property_id) const |
| Get a string property from the toolbox object. More...
|
|
int | string_property_length (int property_id) const |
| Get a the length of a string property from the toolbox object. More...
|
|
void | string_property (int property_id, const std::string &value) |
| Set a string property in the toolbox object. More...
|
|
bool | flag_property (int property_id, int flag) const |
| Check if a particular flag is set in a property. More...
|
|
void | flag_property (int property_id, int flag, bool value) |
| Set a particular flag in a property. More...
|
|
ObjectId | _handle |
| Underlying toolbox handle.
|
|
int | _id |
| Underlying toolbox component id.
|
|
A Button is a gadget that show a sprite or some text in the window.
It is similar to a Wimp icon, but has the following restrictions. A Button created as sprite only cannot be made into any sort of text Button. A Button created as text only cannot be made into a sprite only Button. A sprite only Button can only refer to sprites by name and these must be in the Wimp sprite pool or the task's sprite area.