32 #ifndef TBX_COLOURDBOX_H_ 33 #define TBX_COLOURDBOX_H_ 35 #include "showpointobject.h" 42 class AboutToBeShownListener;
43 class HasBeenHiddenListener;
44 class ColourSelectedListener;
45 class ColourDboxDialogueCompletedListener;
62 enum { TOOLBOX_CLASS = 0x829C0 };
195 virtual void colourdbox_dialogue_completed(
ColourDbox colour_dbox,
bool colour_selected) = 0;
205 unsigned char *_block;
220 bool none()
const {
return _none;}
225 unsigned char blue()
const {
return _block[1];}
229 unsigned char green()
const {
return _block[2];}
233 unsigned char red()
const {
return _block[3];}
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
ColourDbox & operator=(const Object &other)
Assign this ColourDbox from an Object that refers to a ColourDbox.
Definition: colourdbox.h:127
int dialog_handle() const
Return the underlying dialogue handle used by the ColourPicker module.
Definition: colourdbox.h:155
ColourDbox(const std::string &template_name)
Create a ColourDbox from the named template.
Definition: colourdbox.h:97
ColourModel
Enumeration for the colour models.
Definition: colourdbox.h:160
Listener for when the Colour dialogue box has been closed.
Definition: colourdbox.h:184
Listener for about to be shown event.
Definition: abouttobeshownlistener.h:76
bool operator!=(const Object &other) const
Check if this ColourDbox does not refers to the same underlying toolbox object as another...
Definition: colourdbox.h:144
bool operator==(const Object &other) const
Check if this ColourDbox refers to the same underlying toolbox object as another. ...
Definition: colourdbox.h:136
Classes to use/edit toolbox resources in memory.
ColourDbox::ColourModel model() const
Colour model selected.
Definition: colourdbox.h:237
unsigned char blue() const
Blue amount selected.
Definition: colourdbox.h:225
int WindowHandle
Type for WIMP windows handle.
Definition: handles.h:35
Event data for colour selected event.
Definition: colourdbox.h:201
ColourDbox(const ColourDbox &other)
Construct a ColourDbox from another ColourDbox.
Definition: colourdbox.h:78
ColourDbox(const Object &other)
Construct a ColourDbox from an Object that refers to a ColourDbox.
Definition: colourdbox.h:89
unsigned char green() const
Green amount selected.
Definition: colourdbox.h:229
ColourDbox()
Construct creates an unassigned ColourDbox.
Definition: colourdbox.h:69
void none_available(bool available)
Set if an option for no colour is included.
Definition: colourdbox.h:165
Event listener for colour selected event.
Definition: colourdbox.h:243
ColourDbox & operator=(const ColourDbox &other)
Assign this ColourDbox from another.
Definition: colourdbox.h:114
Class to show a toolbox ColourDbox object which allows a user to pick a colour using a variety of col...
Definition: colourdbox.h:59
Base class for all toolbox event listeners.
Definition: listener.h:33
Object that can be shown at a specific position as well as its default place.
Definition: showpointobject.h:42
bool none_available() const
Return true if a no colour option is included on the dialog box.
Definition: colourdbox.h:169
ColourDbox colour_dbox() const
Return colour dbox that generated this event.
Definition: colourdbox.h:215
unsigned char red() const
Red amount selected.
Definition: colourdbox.h:233
WindowHandle wimp_handle() const
Return the underlying wimp window used by the ColourPicker module.
Definition: colourdbox.h:150
bool none() const
None colour was selected.
Definition: colourdbox.h:220
Class to manipulate a toolbox object.
Definition: object.h:50
Class for ColourDbox object template.
Definition: rescolourdbox.h:36
ObjectId handle() const
Return the underlying toolbox object id this object references.
Definition: object.h:93