26 #define YUILogComponent "ui"
29 #include "YUISymbols.h"
30 #include "YComboBox.h"
31 #include "YUIException.h"
37 : editable( editable )
38 , inputMaxLength( -1 )
42 std::string validChars;
54 YUI_CHECK_NEW( priv );
66 return priv->editable;
72 return priv->validChars;
78 priv->validChars= newValidChars;
84 return priv->inputMaxLength;
90 priv->inputMaxLength = len;
138 std::string currentText =
text();
165 selectedItems.push_back( item );
186 propSet.
add(
YProperty( YUIProperty_Value, YOtherProperty ) );
187 propSet.
add(
YProperty( YUIProperty_Items, YOtherProperty ) );
188 propSet.
add(
YProperty( YUIProperty_Label, YStringProperty ) );
189 propSet.
add(
YProperty( YUIProperty_ValidChars, YStringProperty ) );
190 propSet.
add(
YProperty( YUIProperty_InputMaxLength, YIntegerProperty ) );
191 propSet.
add(
YProperty( YUIProperty_IconPath, YStringProperty ) );
204 if ( propertyName == YUIProperty_Value )
return false;
205 else if ( propertyName == YUIProperty_Items )
return false;
208 else if ( propertyName == YUIProperty_InputMaxLength )
setInputMaxLength( val.integerVal() );
224 if ( propertyName == YUIProperty_Value )
return YPropertyValue( YOtherProperty );
225 else if ( propertyName == YUIProperty_Items )
return YPropertyValue( YOtherProperty );
virtual YPropertyValue getProperty(const std::string &propertyName)
void check(const std::string &propertyName) const
int inputMaxLength() const
void add(const YProperty &prop)
virtual void setInputMaxLength(int numberOfChars)
void setValue(const std::string &newText)
YComboBox(YWidget *parent, const std::string &label, bool editable)
std::string stringVal() const
void setSelected(bool sel=true)
virtual void selectItem(YItem *item, bool selected=true)
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
virtual std::string text()=0
virtual YItem * selectedItem()
YPropertyType type() const
virtual void setText(const std::string &newText)=0
virtual YItemCollection selectedItems()
std::string label() const
virtual const YPropertySet & propertySet()
virtual void setValidChars(const std::string &validChars)