26 #define YUILogComponent "ui" 29 #include "YUISymbols.h" 30 #include "YMultiLineEdit.h" 33 #define DEFAULT_VISIBLE_LINES 3 40 , inputMaxLength( -1 )
41 , defaultVisibleLines( DEFAULT_VISIBLE_LINES )
46 int defaultVisibleLines;
56 YUI_CHECK_NEW( priv );
83 return priv->inputMaxLength;
89 priv->inputMaxLength = len;
95 return priv->defaultVisibleLines;
101 priv->defaultVisibleLines = newVisibleLines;
117 propSet.
add(
YProperty( YUIProperty_Value, YStringProperty ) );
118 propSet.
add(
YProperty( YUIProperty_Label, YStringProperty ) );
119 propSet.
add(
YProperty( YUIProperty_InputMaxLength, YIntegerProperty ) );
134 else if ( propertyName == YUIProperty_InputMaxLength )
setInputMaxLength( val.integerVal() );
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
Transport class for the value of simple properties.
void check(const std::string &propertyName) const
Check if a property 'propertyName' exists in this property set.
virtual void setValue(const std::string &text)=0
Set the current value (the text entered by the user or set from the outside) of this MultiLineEdit...
void add(const YProperty &prop)
Add a property to this property set.
A set of properties to check names and types against.
virtual YPropertyValue getProperty(const std::string &propertyName)
Get a property.
int inputMaxLength() const
The maximum input length, i.e., the maximum number of characters the user can enter.
std::string stringVal() const
Methods to get the value of this property.
virtual void setLabel(const std::string &label)
Set the label (the caption above the MultiLineEdit).
virtual std::string value()=0
Get the current value (the text entered by the user or set from the outside) of this MultiLineEdit...
bool isEmpty() const
Returns 'true' if this property set does not contain anything.
Class for widget properties.
int defaultVisibleLines() const
Return the number of input lines that are visible by default.
virtual void setDefaultVisibleLines(int newVisibleLines)
Set the number of input lines that are visible by default.
virtual const YPropertySet & propertySet()
Return this class's property set.
YPropertyType type() const
Returns the type of this property value.
YMultiLineEdit(YWidget *parent, const std::string &label)
Constructor.
std::string label() const
Get the label (the caption above the MultiLineEdit).
virtual void setInputMaxLength(int numberOfChars)
Set the maximum input length, i.e., the maximum number of characters the user can enter...
virtual ~YMultiLineEdit()
Destructor.