32 #ifndef TBX_FONTDBOX_H_
33 #define TBX_FONTDBOX_H_
35 #include "showfullobject.h"
37 #include "eventinfo.h"
43 class AboutToBeShownListener;
44 class HasBeenHiddenListener;
45 class FontDboxApplyListener;
60 enum { TOOLBOX_CLASS = 0x82a00 };
260 const std::string
name()
const {
return reinterpret_cast<const char *
>(&
_data.
word[6]);}
ObjectId _handle
Handle for toolbox object.
Definition: object.h:173
Class for FontDbox object template.
Definition: resfontdbox.h:36
void no_font()
Set dialog to no font selected.
Definition: fontdbox.h:159
FontDbox(const FontDbox &other)
Construct a FontDbox from another FontDbox.
Definition: fontdbox.h:76
Listener for about to be shown event.
Definition: abouttobeshownlistener.h:76
void check_toolbox_class(int class_id) const
Check if this objects toolbox class is as specified.
Definition: object.cc:122
int aspect_ratio() const
Aspect ratio selected.
Definition: fontdbox.h:254
FontDbox()
Construct creates an unassigned FontDbox.
Definition: fontdbox.h:67
PollBlock & _data
raw data from the event
Definition: eventinfo.h:53
Structure holding the raw data from a call to Wimp_Poll.
Definition: pollinfo.h:71
int string_property_length(int property_id) const
Gets the size of a string properties buffer.
Definition: object.cc:530
std::string try_string() const
Get string to shown in try box.
Definition: fontdbox.h:199
void title(std::string value)
Set title.
Definition: fontdbox.h:209
FontDboxApplyEvent(const IdBlock &id_block, PollBlock &data)
Construct the event from the details return by the toolbox.
Definition: fontdbox.h:243
void add_apply_listener(FontDboxApplyListener *listener)
Add listener for when a font is chosen.
Definition: fontdbox.cc:140
std::string title() const
Get title.
Definition: fontdbox.h:214
Class to show a toolbox FontDbox object.
Definition: fontdbox.h:57
const std::string name() const
Name of font selected.
Definition: fontdbox.h:260
int int_property(int property_id) const
Return the value of a property that returns an integer.
Definition: object.cc:435
int try_string_length() const
Get length of string shown in try box.
Definition: fontdbox.h:204
int title_length() const
Get length of title.
Definition: fontdbox.h:219
std::string string_property(int property_id) const
Return the value of a property that returns text.
Definition: object.cc:477
FontDbox & operator=(const FontDbox &other)
Assign this FontDbox from another.
Definition: fontdbox.h:112
void remove_has_been_hidden_listener(HasBeenHiddenListener *listener)
Remove has been hidden listener.
Definition: fontdbox.cc:126
unsigned int ObjectId
Type for underlying toolbox object id.
Definition: handles.h:31
bool operator!=(const Object &other) const
Check if this FontDbox does not refers to the same underlying toolbox object as another.
Definition: fontdbox.h:140
virtual void fontdbox_apply(const FontDboxApplyEvent &apply_event)=0
Method called when apply button is clicked on the FontDbox.
Window window() const
Return the underlying toolbox window used to implement the FontDbox object.
Definition: fontdbox.h:147
FontDbox(const Object &other)
Construct a FontDbox from an Object that refers to a FontDbox.
Definition: fontdbox.h:87
void font(std::string value)
Set font to select.
Definition: fontdbox.h:154
void remove_apply_listener(FontDboxApplyListener *listener)
Remove listener for when a font is chosen.
Definition: fontdbox.cc:148
ObjectId handle() const
Return the underlying toolbox object id this object references.
Definition: object.h:93
int height() const
Get height of font.
Definition: fontdbox.cc:60
Event information for FontDboxApplyListener.
Definition: fontdbox.h:234
int height() const
Height selected.
Definition: fontdbox.h:249
FontDbox & operator=(const Object &other)
Assign this FontDbox from an Object that refers to a FontDbox.
Definition: fontdbox.h:124
int font_length() const
Return selected font name length.
Definition: fontdbox.h:169
void add_has_been_hidden_listener(HasBeenHiddenListener *listener)
This event is raised after the FontDbox dialog has been completed.
Definition: fontdbox.cc:118
The Window object represents a toolbox window.
Definition: window.h:69
Class to provide information on a toolbox event.
Definition: eventinfo.h:48
FontDbox(const std::string &template_name)
Create a FontDbox from the named template.
Definition: fontdbox.h:95
void remove_about_to_be_shown_listener(AboutToBeShownListener *listener)
Remove about to be shown listener.
Definition: fontdbox.cc:110
Listener for FontDbox Apply events.
Definition: fontdbox.h:266
void try_string(std::string value)
Set string to show in try box.
Definition: fontdbox.h:194
Base class for all toolbox event listeners.
Definition: listener.h:33
int word[64]
Array containing information return from Wimp_Poll.
Definition: pollinfo.h:76
bool operator==(const Object &other) const
Check if this FontDbox refers to the same underlying toolbox object as another.
Definition: fontdbox.h:132
void add_about_to_be_shown_listener(AboutToBeShownListener *listener)
This event is raised just before the FontDbox underlying window is about to be shown.
Definition: fontdbox.cc:102
Listener for an object has been hidden event.
Definition: hasbeenhiddenlistener.h:36
std::string font() const
Return selected font.
Definition: fontdbox.h:164
const IdBlock & id_block() const
IdBlock for the current event.
Definition: eventinfo.h:71
int aspect_ratio() const
Get aspect ration of font.
Definition: fontdbox.cc:86
Objects derived from this class can be shown with there full location and size specified as well as t...
Definition: showfullobject.h:40
Information passed back by the Toolbox with each toolbox event providing information on where the eve...
Definition: pollinfo.h:41
Class to manipulate a toolbox object.
Definition: object.h:50