27 #define YUILogComponent "ui"
30 #include "YUISymbols.h"
31 #include "YRichText.h"
43 , plainTextMode( plainTextMode )
44 , autoScrollDown ( false )
61 YUI_CHECK_NEW( priv );
76 priv->text = newValue;
88 return priv->plainTextMode;
100 return priv->autoScrollDown;
112 return priv->shrinkable;
135 propSet.
add(
YProperty( YUIProperty_Value, YStringProperty ) );
136 propSet.
add(
YProperty( YUIProperty_Text, YStringProperty ) );
137 propSet.
add(
YProperty( YUIProperty_VScrollValue, YStringProperty ) );
138 propSet.
add(
YProperty( YUIProperty_HScrollValue, YStringProperty ) );
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.
bool plainTextMode() const
Return 'true' if this RichText widget is in "plain text" mode, i.e.
YRichText(YWidget *parent, const std::string &text, bool plainTextMode=false)
Constructor.
virtual YPropertyValue getProperty(const std::string &propertyName)
Get a property.
virtual void setHScrollValue(const std::string &newValue)
Set the position value of the horizontal scrollbar.
virtual void setVScrollValue(const std::string &newValue)
Set the position value of the vertical scrollbar.
bool autoScrollDown() const
Return 'true' if this RichText widget should automatically scroll down when the text content is chang...
virtual ~YRichText()
Destructor.
virtual std::string vScrollValue() const
Get the position value of the vertical scrollbar.
virtual const YPropertySet & propertySet()
Return this class's property set.
std::string value() const
Return the text content of the RichText widget.
virtual std::string hScrollValue() const
Get the position value of the horizontal scrollbar.
virtual void setPlainTextMode(bool on=true)
Set this RichText widget's "plain text" mode on or off.
void setShrinkable(bool shrinkable=true)
Make this widget shrinkable, i.e.
virtual void setValue(const std::string &newValue)
Change the text content of the RichText widget.
virtual void setAutoScrollDown(bool on=true)
Set this RichText widget's "auto scroll down" mode on or off.
bool shrinkable() const
Returns 'true' if this widget is "shrinkable", i.e.
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
YRichTextPrivate(const string &text, bool plainTextMode)
Constructor.