28 #include "YSelectionWidget.h"
74 virtual const char *
widgetClass()
const {
return "YComboBox"; }
106 void setValue(
const std::string & newText );
188 virtual bool setProperty(
const std::string & propertyName,
223 virtual std::string
text() = 0;
234 virtual void setText(
const std::string & newText ) = 0;
243 #endif // YComboBox_h
YComboBox(YWidget *parent, const std::string &label, bool editable)
Constructor.
void setValue(const std::string &newText)
Set the value of this ComboBox by string: Try to find a list item with that label and select it.
virtual const char * widgetClass() const
Returns a descriptive name of this widget class for logging, debugging etc.
std::vector< YItem * > YItemCollection
Collection of pointers to YItem.
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
bool editable() const
Return 'true' if this ComboBox is editable, i.e.
std::string validChars()
Get the valid input characters.
A set of properties to check names and types against.
virtual ~YComboBox()
Destructor.
virtual YItemCollection selectedItems()
Return all selected items.
virtual void setText(const std::string &newText)=0
Set this ComboBox's current value as text.
virtual YPropertyValue getProperty(const std::string &propertyName)
Get a property.
const char * userInputProperty()
The name of the widget property that will return user input.
virtual void selectItem(YItem *item, bool selected=true)
Select or deselect an item.
int inputMaxLength() const
The maximum input length, i.e., the maximum number of characters the user can enter.
virtual std::string text()=0
Return this ComboBox's current value as text.
ComboBox (or "drop down box", "drop down selection"); may be editable.
Transport class for the value of simple properties.
std::string value()
Return the value of this ComboBox:
virtual YItem * selectedItem()
Return the (first) selected item or 0 if none is selected or if this ComboBox is editable and the use...
virtual const YPropertySet & propertySet()
Return this class's property set.
virtual void setInputMaxLength(int numberOfChars)
Set the maximum input length, i.e., the maximum number of characters the user can enter.
virtual void setValidChars(const std::string &validChars)
Set the valid input characters.
Simple item class for SelectionBox, ComboBox, MultiSelectionBox etc.