32 #ifndef TBX_WRITEABLEFIELD_H_ 33 #define TBX_WRITEABLEFIELD_H_ 39 class TextChangedListener;
50 enum {TOOLBOX_CLASS = 512};
183 void font(
const std::string &name,
int width,
int height);
std::string text() const
Get the the text that is being displayed.
Definition: writablefield.h:135
void font(const std::string &name, int width, int height)
Set the font used for the writable field.
Definition: writablefield.cc:84
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
void add_text_changed_listener(TextChangedListener *listener)
Add a listener to report when the text has changed in the writable field.
Definition: writablefield.cc:124
This is the base class for all Gadgets.
Definition: gadget.h:48
void system_font(int width, int height)
Set the writable field to use the system font to display the text.
Definition: writablefield.cc:104
WritableField & operator=(const WritableField &other)
Assign a writable field to refer to the same underlying toolbox gadget as another.
Definition: writablefield.h:92
ObjectId handle() const
Return the object handle for his component.
Definition: component.h:95
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
void text(const std::string &value)
Set the the text to display.
Definition: writablefield.h:130
WritableField & operator=(const Gadget &other)
Assign a writable field to refer to the same underlying toolbox gadget as an existing Gadget...
Definition: writablefield.h:100
WritableField(const WritableField &other)
Construct a writable field from another writableField.
Definition: writablefield.h:66
int allowable_length() const
Get the length of the allowable pattern.
Definition: writablefield.h:181
bool operator!=(const Gadget &other) const
Check if this display field refers to the same underlying toolbox gadget as another gadget...
Definition: writablefield.h:123
WritableField(const Component &other)
Construct a writable field from a Component.
Definition: writablefield.h:86
std::string string_property(int property_id) const
Get a string property from the toolbox object.
Definition: component.cc:261
Base class for components in an object.
Definition: component.h:42
Listener for text changed events.
Definition: textchangedlistener.h:92
std::string allowable() const
Get the pattern that specifies the character that can be entered into this field. ...
Definition: writablefield.h:177
ComponentId id() const
Get the component ID of this component.
Definition: component.h:103
WritableField(const Gadget &other)
Construct a writable field from another gadget.
Definition: writablefield.h:77
WritableField wrapper class for an underlying toolbox WritableField gadget.
Definition: writablefield.h:48
The Window object represents a toolbox window.
Definition: window.h:69
int text_length() const
Get the length of the text property.
Definition: writablefield.h:142
void allowable(const std::string &value)
Set the characters that are allowed to be entered into a writable field.
Definition: writablefield.h:171
bool operator==(const Gadget &other) const
Check if this display field refers to the same underlying toolbox gadget as another gadget...
Definition: writablefield.h:116
~WritableField()
Destroy a Writable Field gadget.
Definition: writablefield.h:59
ObjectId _handle
Underlying toolbox handle.
Definition: component.h:45
int _id
Underlying toolbox component id.
Definition: component.h:46
WritableField & operator=(const Component &other)
Assign a writable field to refer to the same underlying toolbox component as an existing Gadget...
Definition: writablefield.h:109
WritableField()
Construct an uninitialised display field.
Definition: writablefield.h:52
void remove_text_changed_listener(TextChangedListener *listener)
Remove a text changed listener.
Definition: writablefield.cc:132
int string_property_length(int property_id) const
Get a the length of a string property from the toolbox object.
Definition: component.cc:302