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;
std::vector< YItem * > YItemCollection
Collection of pointers to YItem.
ComboBox (or "drop down box", "drop down selection"); may be editable.
int inputMaxLength() const
The maximum input length, i.e., the maximum number of characters the user can enter.
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
virtual void setText(const std::string &newText)=0
Set this ComboBox's current value as text.
std::string validChars()
Get the valid input characters.
virtual const char * widgetClass() const
Returns a descriptive name of this widget class for logging, debugging etc.
virtual void setInputMaxLength(int numberOfChars)
Set the maximum input length, i.e., the maximum number of characters the user can enter.
virtual YItemCollection selectedItems()
Return all selected items.
virtual const YPropertySet & propertySet()
Return this class's property set.
virtual ~YComboBox()
Destructor.
virtual std::string text()=0
Return this ComboBox's current value as text.
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.
bool editable() const
Return 'true' if this ComboBox is editable, i.e.
virtual void setValidChars(const std::string &validChars)
Set the valid input characters.
virtual YItem * selectedItem()
Return the (first) selected item or 0 if none is selected or if this ComboBox is editable and the use...
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 YPropertyValue getProperty(const std::string &propertyName)
Get a property.
YComboBox(YWidget *parent, const std::string &label, bool editable)
Constructor.
std::string value()
Return the value of this ComboBox:
Simple item class for SelectionBox, ComboBox, MultiSelectionBox etc.
A set of properties to check names and types against.
Transport class for the value of simple properties.