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() );
int inputMaxLength() const
The maximum input length, i.e., the maximum number of characters the user can enter.
virtual void setDefaultVisibleLines(int newVisibleLines)
Set the number of input lines that are visible by default.
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
virtual const YPropertySet & propertySet()
Return this class's property set.
virtual ~YMultiLineEdit()
Destructor.
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.
virtual void setLabel(const std::string &label)
Set the label (the caption above the MultiLineEdit).
std::string label() const
Get the label (the caption above the MultiLineEdit).
YMultiLineEdit(YWidget *parent, const std::string &label)
Constructor.
int defaultVisibleLines() const
Return the number of input lines that are visible by default.
virtual std::string value()=0
Get the current value (the text entered by the user or set from the outside) of this MultiLineEdit.
virtual YPropertyValue getProperty(const std::string &propertyName)
Get a property.
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 check(const std::string &propertyName) const
Check if a property 'propertyName' exists in this property set.
bool isEmpty() const
Returns 'true' if this property set does not contain anything.
void add(const YProperty &prop)
Add a property to this property set.
Transport class for the value of simple properties.
std::string stringVal() const
Methods to get the value of this property.
YPropertyType type() const
Returns the type of this property value.
Class for widget properties.