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