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