tbx
0.7.6
|
Class to show a toolbox ColourDbox object which allows a user to pick a colour using a variety of colour models. More...
#include <colourdbox.h>
Public Types | |
enum | { TOOLBOX_CLASS = 0x829C0 } |
enum | ColourModel { RGB, CYMK, HSV } |
Enumeration for the colour models. | |
Public Member Functions | |
ColourDbox () | |
Construct creates an unassigned ColourDbox. More... | |
ColourDbox (const ColourDbox &other) | |
Construct a ColourDbox from another ColourDbox. More... | |
ColourDbox (const Object &other) | |
Construct a ColourDbox from an Object that refers to a ColourDbox. More... | |
ColourDbox (const std::string &template_name) | |
Create a ColourDbox from the named template. More... | |
ColourDbox (const res::ResColourDbox &object_template) | |
Create a ColourDbox from an in memory template resource. More... | |
ColourDbox & | operator= (const ColourDbox &other) |
Assign this ColourDbox from another. More... | |
ColourDbox & | operator= (const Object &other) |
Assign this ColourDbox from an Object that refers to a ColourDbox. More... | |
bool | operator== (const Object &other) const |
Check if this ColourDbox refers to the same underlying toolbox object as another. More... | |
bool | operator!= (const Object &other) const |
Check if this ColourDbox does not refers to the same underlying toolbox object as another. More... | |
WindowHandle | wimp_handle () const |
Return the underlying wimp window used by the ColourPicker module. | |
int | dialog_handle () const |
Return the underlying dialogue handle used by the ColourPicker module. | |
void | none_available (bool available) |
Set if an option for no colour is included. | |
bool | none_available () const |
Return true if a no colour option is included on the dialog box. | |
void | add_about_to_be_shown_listener (AboutToBeShownListener *listener) |
This event is raised just before the ColourDbox underlying window is about to be shown. More... | |
void | remove_about_to_be_shown_listener (AboutToBeShownListener *listener) |
Remove about to be shown listener. More... | |
void | add_dialogue_completed_listener (ColourDboxDialogueCompletedListener *listener) |
Add listener to be called when the dialogue has been completed. More... | |
void | remove_dialogue_completed_listener (ColourDboxDialogueCompletedListener *listener) |
Remove listener to be called when the dialogue has been completed. More... | |
void | add_colour_selected_listener (ColourSelectedListener *listener) |
Add listener to report colour select when dialog is finished with OK. More... | |
void | remove_colour_selected_listener (ColourSelectedListener *listener) |
Remove the colour selected listener. More... | |
![]() | |
ShowPointObject () | |
Constructor with no reference to a Toolbox object. More... | |
ShowPointObject (ObjectId handle) | |
Construct from a Toolbox object id. More... | |
ShowPointObject (const Object &other) | |
Construct as reference to another Toolbox object. More... | |
ShowPointObject (const std::string &template_name) | |
Create a Toolbox object and make this object a reference to it. More... | |
ShowPointObject (const res::ResObject &object_template) | |
Create Toolbox object from a memory template and make this object a reference to it. More... | |
void | show (const Object &parent) |
Show object with given parent object. | |
void | show (const Component &parent) |
Show object with given parent component. | |
void | show (const Point &pos) |
Show object with top left at the given position. | |
void | show (const Point &pos, const Object &parent) |
Show object with top left at the given position. | |
void | show (const Point &pos, const Component &parent) |
Show object with top left at the given position. | |
void | show_as_menu () |
Show object as a menu at default position. | |
void | show_as_menu (const Object &parent) |
Show object as a menu with the given parent. | |
void | show_as_menu (const Component &parent) |
Show object as a menu with the given parent. | |
void | show_as_menu (const Point &pos) |
Show object as a menu at the given point with the given parent. | |
void | show_as_menu (const Point &pos, const Object &parent) |
Show object as a menu at the given point with the given parent. | |
void | show_as_menu (const Point &pos, const Component &parent) |
Show object as a menu at the given point with the given parent. | |
void | show_as_submenu (const MenuItem &parent) |
Show object as a sub menu from the given menu item. | |
void | show_as_submenu (const Point &pos, const MenuItem &parent) |
Show object as a sub menu at the given point from the given menu item. | |
void | show () |
Show the object at the default place. 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 | show_centred () |
Show the object in the centre of the screen. More... | |
void | show_at_pointer () |
Show the object at the current mouse position. 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 show a toolbox ColourDbox object which allows a user to pick a colour using a variety of colour models.
The ColourDbox object uses the system ColourPicker module to implement the Colour dialogue.
|
inline |
Construct creates an unassigned ColourDbox.
It must be assigned to a value before the other methods can be used.
|
inline |
Construct a ColourDbox from another ColourDbox.
This class then refers to the same underlying toolbox object as the other ColourDbox
other | ColourDbox to copy. |
|
inline |
Construct a ColourDbox from an Object that refers to a ColourDbox.
This class then refers to the same underlying toolbox object as the other object
other | Object to copy. |
ObjectNullException | if the other object refers to a null object handle |
ObjectClassException | if the other object is not a ColourDbox |
|
inline |
Create a ColourDbox from the named template.
template_name | The name of the template to create the object from |
OsError | if an object cannot be created from the named template |
ObjectClassException | if the template is not for a ColourDbox |
tbx::ColourDbox::ColourDbox | ( | const res::ResColourDbox & | object_template | ) |
Create a ColourDbox from an in memory template resource.
object_template | The template to create the object from |
OsError | if an object cannot be created from the template |
void tbx::ColourDbox::add_about_to_be_shown_listener | ( | AboutToBeShownListener * | listener | ) |
This event is raised just before the ColourDbox underlying window is about to be shown.
listener | listener for about to be shown events |
void tbx::ColourDbox::add_colour_selected_listener | ( | ColourSelectedListener * | listener | ) |
Add listener to report colour select when dialog is finished with OK.
listener | listener for colour selected events |
void tbx::ColourDbox::add_dialogue_completed_listener | ( | ColourDboxDialogueCompletedListener * | listener | ) |
Add listener to be called when the dialogue has been completed.
listener | listener for dialogue completed events |
|
inline |
Check if this ColourDbox does not refers to the same underlying toolbox object as another.
other | Object to compare to |
|
inline |
Assign this ColourDbox from another.
Both objects will then refer to the same underlying toolbox object
other | ColourDbox to copy |
|
inline |
Assign this ColourDbox from an Object that refers to a ColourDbox.
This class then refers to the same underlying toolbox object as the other object
other | Object to copy. |
ObjectNullException | if the other object refers to a null object handle |
ObjectClassException | if the other object is not a ColourDbox |
|
inline |
Check if this ColourDbox refers to the same underlying toolbox object as another.
other | Object to compare to |
void tbx::ColourDbox::remove_about_to_be_shown_listener | ( | AboutToBeShownListener * | listener | ) |
Remove about to be shown listener.
listener | listener for about to be shown events |
void tbx::ColourDbox::remove_colour_selected_listener | ( | ColourSelectedListener * | listener | ) |
Remove the colour selected listener.
listener | listener for colour selected events |
void tbx::ColourDbox::remove_dialogue_completed_listener | ( | ColourDboxDialogueCompletedListener * | listener | ) |
Remove listener to be called when the dialogue has been completed.
listener | listener for dialogue completed events |