32 #ifndef TBX_STRINGSET_H_ 33 #define TBX_STRINGSET_H_ 38 #include "eventinfo.h" 42 class TextChangedListener;
43 class StringSetAboutToBeShownListener;
57 enum {TOOLBOX_CLASS = 896};
217 virtual void stringset_about_to_be_shown(
const EventInfo &event) = 0;
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
void selected(const std::string &value)
Set the string to be selected.
Definition: stringset.h:143
Listener for the string set about to be shown event.
Definition: stringset.h:206
bool operator==(const Gadget &other) const
Check if this string set refers to the same underlying toolbox gadget as another gadget.
Definition: stringset.h:123
StringSet()
Construct an uninitialised display field.
Definition: stringset.h:59
StringSet wrapper class for an underlying toolbox StringSet gadget.
Definition: stringset.h:54
StringSet & operator=(const StringSet &other)
Assign a string set to refer to the same underlying toolbox gadget as another.
Definition: stringset.h:99
This is the base class for all Gadgets.
Definition: gadget.h:48
StringSet & operator=(const Component &other)
Assign a string set field to refer to the same underlying toolbox component as an existing Gadget...
Definition: stringset.h:116
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
StringSet(const StringSet &other)
Construct a string set from another string set.
Definition: stringset.h:73
void add_about_to_be_shown_listener(StringSetAboutToBeShownListener *listener)
Add a listener to be called just before the string set's menu is shown.
Definition: stringset.cc:158
~StringSet()
Destroy a string set gadget.
Definition: stringset.h:66
std::string string_property(int property_id) const
Get a string property from the toolbox object.
Definition: component.cc:261
StringSet & operator=(const Gadget &other)
Assign a string set to refer to the same underlying toolbox gadget as an existing Gadget...
Definition: stringset.h:107
Base class for components in an object.
Definition: component.h:42
void available(const std::string &value)
Set the list of strings available.
Definition: stringset.h:138
Listener for text changed events.
Definition: textchangedlistener.h:92
void allowable(const std::string &value)
Set the characters that are allowed to be entered into a string set.
Definition: stringset.h:189
std::string selected() const
Get the currently selected string.
Definition: stringset.h:148
ComponentId id() const
Get the component ID of this component.
Definition: component.h:103
Gadget alphanumeric_gadget() const
Get the gadget used to display the selected string.
Definition: stringset.cc:114
bool operator!=(const Gadget &other) const
Check if this string set refers to the same underlying toolbox gadget as another gadget.
Definition: stringset.h:130
StringSet(const Gadget &other)
Construct a string set from another gadget.
Definition: stringset.h:84
void add_text_changed_listener(TextChangedListener *listener)
Add a listener to report when the text has changed in the string set.
Definition: stringset.cc:140
The Window object represents a toolbox window.
Definition: window.h:69
Class to provide information on a toolbox event.
Definition: eventinfo.h:48
void remove_text_changed_listener(TextChangedListener *listener)
Remove a text changed listener.
Definition: stringset.cc:148
Base class for all toolbox event listeners.
Definition: listener.h:33
void remove_about_to_be_shown_listener(StringSetAboutToBeShownListener *listener)
Remove a listener to be called just before the string set's menu is shown.
Definition: stringset.cc:168
StringSet(const Component &other)
Construct a string set from a Component.
Definition: stringset.h:93
Menu popup_menu() const
Get the popup menu used with the string set.
Definition: stringset.cc:126
ObjectId _handle
Underlying toolbox handle.
Definition: component.h:45
int _id
Underlying toolbox component id.
Definition: component.h:46
int selected_index() const
Get the index of the selected string in the available list.
Definition: stringset.cc:98