26 #ifndef TBX_DISPLAYFIELD_H_
27 #define TBX_DISPLAYFIELD_H_
40 enum {TOOLBOX_CLASS = 448};
134 void font(
const std::string &name,
int width,
int height);
std::string string_property(int property_id) const
Get a string property from the toolbox object.
Definition: component.cc:261
DisplayField(const Component &other)
Construct a display field from a gadget.
Definition: displayfield.h:74
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
~DisplayField()
Destroy a Display Field gadget.
Definition: displayfield.h:48
DisplayField & operator=(const Component &other)
Assign a display field to refer to the same underlying toolbox component as an existing Gadget.
Definition: displayfield.h:97
ObjectId handle() const
Return the object handle for his component.
Definition: component.h:95
std::string text() const
Get the the text this is being displayed.
Definition: displayfield.h:125
The Window object represents a toolbox window.
Definition: window.h:70
DisplayField()
Construct an uninitialised display field.
Definition: displayfield.h:42
Base class for components in an object.
Definition: component.h:42
ObjectId _handle
Underlying toolbox handle.
Definition: component.h:45
bool operator==(const Gadget &other) const
Check if this display field refers to the same underlying toolbox gadget as another gadget.
Definition: displayfield.h:104
ComponentId id() const
Get the component ID of this component.
Definition: component.h:103
void system_font(int width, int height)
Set the display field to use the system font to display the text.
Definition: displayfield.cc:65
DisplayField(const DisplayField &other)
Construct a display field from another display field.
Definition: displayfield.h:55
int text_length() const
Get the length of the text property.
Definition: displayfield.h:132
void text(const std::string &value)
Set the the text to display.
Definition: displayfield.h:118
DisplayField & operator=(const DisplayField &other)
Assign a display field to refer to the same underlying toolbox gadget as another.
Definition: displayfield.h:80
void font(const std::string &name, int width, int height)
Set the font used for the display field.
Definition: displayfield.cc:45
int _id
Underlying toolbox component id.
Definition: component.h:46
DisplayField wrapper for an underlying toolbox DisplayField gadget.
Definition: displayfield.h:38
int string_property_length(int property_id) const
Get a the length of a string property from the toolbox object.
Definition: component.cc:302
This is the base class for all Gadgets.
Definition: gadget.h:49
DisplayField(const Gadget &other)
Construct a display field from another gadget.
Definition: displayfield.h:66
DisplayField & operator=(const Gadget &other)
Assign a display field to refer to the same underlying toolbox gadget as an existing Gadget.
Definition: displayfield.h:88
void check_toolbox_class(int class_id) const
Check the underlying gadget class for this object has the given class id.
Definition: gadget.cc:47
bool operator!=(const Gadget &other) const
Check if this display field refers to the same underlying toolbox gadget as another gadget.
Definition: displayfield.h:111