26 #define YUILogComponent "ui" 29 #include "YUISymbols.h" 30 #include "YMultiLineEdit.h" 33 #define DEFAULT_VISIBLE_LINES 3 42 , inputMaxLength( -1 )
43 , defaultVisibleLines( DEFAULT_VISIBLE_LINES )
48 int defaultVisibleLines;
58 YUI_CHECK_NEW( priv );
85 return priv->inputMaxLength;
91 priv->inputMaxLength = len;
97 return priv->defaultVisibleLines;
103 priv->defaultVisibleLines = newVisibleLines;
119 propSet.
add(
YProperty( YUIProperty_Value, YStringProperty ) );
120 propSet.
add(
YProperty( YUIProperty_Label, YStringProperty ) );
121 propSet.
add(
YProperty( YUIProperty_InputMaxLength, YIntegerProperty ) );
136 else if ( propertyName == YUIProperty_InputMaxLength )
setInputMaxLength( val.integerVal() );
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
bool isEmpty() const
Returns 'true' if this property set does not contain anything.
Transport class for the value of simple properties.
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.
std::string label() const
Get the label (the caption above the MultiLineEdit).
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...
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.
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.
void check(const std::string &propertyName) const
Check if a property 'propertyName' exists in this property set.
YMultiLineEdit(YWidget *parent, const std::string &label)
Constructor.
YPropertyType type() const
Returns the type of this property value.
virtual void setInputMaxLength(int numberOfChars)
Set the maximum input length, i.e., the maximum number of characters the user can enter...
virtual ~YMultiLineEdit()
Destructor.