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 };
95 FontDbox(
const std::string &template_name) :
ShowFullObject(template_name) {check_toolbox_class(FontDbox::TOOLBOX_CLASS);}
154 void font(std::string value) {string_property(1, value);}
164 std::string
font()
const {
return string_property(2);}
174 void height(
int size);
184 void aspect_ratio(
int value);
189 int aspect_ratio()
const;
194 void try_string(std::string value) {string_property(5, value);}
209 void title(std::string value) {string_property(7, value);}
214 std::string
title()
const {
return string_property(8);}
249 int height()
const {
return _data.word[4];}
260 const std::string
name()
const {
return reinterpret_cast<const char *
>(&_data.word[6]);}
std::string title() const
Get title.
Definition: fontdbox.h:214
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
Class for FontDbox object template.
Definition: resfontdbox.h:36
void no_font()
Set dialog to no font selected.
Definition: fontdbox.h:159
std::string font() const
Return selected font.
Definition: fontdbox.h:164
std::string try_string() const
Get string to shown in try box.
Definition: fontdbox.h:199
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
FontDbox()
Construct creates an unassigned FontDbox.
Definition: fontdbox.h:67
Structure holding the raw data from a call to Wimp_Poll.
Definition: pollinfo.h:71
int height() const
Height selected.
Definition: fontdbox.h:249
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
int font_length() const
Return selected font name length.
Definition: fontdbox.h:169
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
Classes to use/edit toolbox resources in memory.
int try_string_length() const
Get length of string shown in try box.
Definition: fontdbox.h:204
bool operator==(const Object &other) const
Check if this FontDbox refers to the same underlying toolbox object as another.
Definition: fontdbox.h:132
Class to show a toolbox FontDbox object.
Definition: fontdbox.h:57
const std::string name() const
Name of font selected.
Definition: fontdbox.h:260
FontDbox & operator=(const FontDbox &other)
Assign this FontDbox from another.
Definition: fontdbox.h:112
unsigned int ObjectId
Type for underlying toolbox object id.
Definition: handles.h:31
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
int title_length() const
Get length of title.
Definition: fontdbox.h:219
Event information for FontDboxApplyListener.
Definition: fontdbox.h:234
FontDbox & operator=(const Object &other)
Assign this FontDbox from an Object that refers to a FontDbox.
Definition: fontdbox.h:124
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
Listener for FontDbox Apply events.
Definition: fontdbox.h:266
int aspect_ratio() const
Aspect ratio selected.
Definition: fontdbox.h:254
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
Window window() const
Return the underlying toolbox window used to implement the FontDbox object.
Definition: fontdbox.h:147
Listener for an object has been hidden event.
Definition: hasbeenhiddenlistener.h:36
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
ObjectId handle() const
Return the underlying toolbox object id this object references.
Definition: object.h:93