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};
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
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
std::string selected() const
Get the currently selected string.
Definition: stringset.h:148
ObjectId handle() const
Return the object handle for his component.
Definition: component.h:95
The Window object represents a toolbox window.
Definition: window.h:70
Menu popup_menu() const
Get the popup menu used with the string set.
Definition: stringset.cc:126
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
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
void remove_text_changed_listener(TextChangedListener *listener)
Remove a text changed listener.
Definition: stringset.cc:148
Base class for components in an object.
Definition: component.h:42
StringSet(const Gadget &other)
Construct a string set from another gadget.
Definition: stringset.h:84
ObjectId _handle
Underlying toolbox handle.
Definition: component.h:45
ComponentId id() const
Get the component ID of this component.
Definition: component.h:103
StringSet(const Component &other)
Construct a string set from a Component.
Definition: stringset.h:93
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
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
virtual void stringset_about_to_be_shown(const EventInfo &event)=0
Method called just before the popup menu for a string set is shown.
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
StringSet & operator=(const StringSet &other)
Assign a string set to refer to the same underlying toolbox gadget as another.
Definition: stringset.h:99
int selected_index() const
Get the index of the selected string in the available list.
Definition: stringset.cc:98
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
void selected(const std::string &value)
Set the string to be selected.
Definition: stringset.h:143
Base class for all toolbox event listeners.
Definition: listener.h:34
int _id
Underlying toolbox component id.
Definition: component.h:46
Listener for text changed events.
Definition: textchangedlistener.h:93
This is the base class for all Gadgets.
Definition: gadget.h:49
Listener for the string set about to be shown event.
Definition: stringset.h:207
void allowable(const std::string &value)
Definition: stringset.h:189
void available(const std::string &value)
Set the list of strings available.
Definition: stringset.h:138
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 wrapper class for an underlying toolbox StringSet gadget.
Definition: stringset.h:55
Class to provide information on a toolbox event.
Definition: eventinfo.h:49
Gadget alphanumeric_gadget() const
Get the gadget used to display the selected string.
Definition: stringset.cc:114
~StringSet()
Destroy a string set gadget.
Definition: stringset.h:66