libyui
3.0.10
|
Public Member Functions | |
YRichText (YWidget *parent, const std::string &text, bool plainTextMode=false) | |
virtual | ~YRichText () |
virtual const char * | widgetClass () const |
virtual void | setValue (const std::string &newValue) |
std::string | value () const |
void | setText (const std::string &newText) |
std::string | text () const |
bool | plainTextMode () const |
virtual void | setPlainTextMode (bool on=true) |
bool | autoScrollDown () const |
virtual void | setAutoScrollDown (bool on=true) |
bool | shrinkable () const |
void | setShrinkable (bool shrinkable=true) |
virtual bool | setProperty (const std::string &propertyName, const YPropertyValue &val) |
virtual YPropertyValue | getProperty (const std::string &propertyName) |
virtual const YPropertySet & | propertySet () |
Protected Attributes | |
ImplPtr< YRichTextPrivate > | priv |
Definition at line 36 of file YRichText.h.
YRichText::YRichText | ( | YWidget * | parent, |
const std::string & | text, | ||
bool | plainTextMode = false |
||
) |
Constructor.
'plainTextMode' indicates that the text should be treated as plain text, i.e. any HTML-like tags in the text should not be interpreted in any way.
Definition at line 54 of file YRichText.cc.
YRichText::~YRichText | ( | ) | [virtual] |
Destructor.
Definition at line 65 of file YRichText.cc.
bool YRichText::autoScrollDown | ( | ) | const |
Return 'true' if this RichText widget should automatically scroll down when the text content is changed. This is useful for progress displays and log files.
Definition at line 95 of file YRichText.cc.
YPropertyValue YRichText::getProperty | ( | const std::string & | propertyName | ) | [virtual] |
Get a property. Reimplemented from YWidget.
This method may throw YUIPropertyExceptions.
Reimplemented from YWidget.
Definition at line 156 of file YRichText.cc.
bool YRichText::plainTextMode | ( | ) | const |
Return 'true' if this RichText widget is in "plain text" mode, i.e. does not try to interpret RichText/HTML tags.
Definition at line 83 of file YRichText.cc.
const YPropertySet & YRichText::propertySet | ( | ) | [virtual] |
Return this class's property set. This also initializes the property upon the first call.
Reimplemented from YWidget.
Reimplemented from YWidget.
Definition at line 120 of file YRichText.cc.
void YRichText::setAutoScrollDown | ( | bool | on = true | ) | [virtual] |
Set this RichText widget's "auto scroll down" mode on or off.
Derived classes may want to reimplement this, but they should call this base class function in the new function.
Definition at line 101 of file YRichText.cc.
void YRichText::setPlainTextMode | ( | bool | on = true | ) | [virtual] |
Set this RichText widget's "plain text" mode on or off.
Derived classes may want to reimplement this, but they should call this base class function in the new function.
Definition at line 89 of file YRichText.cc.
bool YRichText::setProperty | ( | const std::string & | propertyName, |
const YPropertyValue & | val | ||
) | [virtual] |
Set a property. Reimplemented from YWidget.
This function may throw YUIPropertyExceptions.
This function returns 'true' if the value was successfully set and 'false' if that value requires special handling (not in error cases: those are covered by exceptions).
Reimplemented from YWidget.
Definition at line 140 of file YRichText.cc.
void YRichText::setShrinkable | ( | bool | shrinkable = true | ) |
Make this widget shrinkable, i.e. very small in layouts.
This method is intentionally not virtual because it doesn't have any immediate effect; it is only needed in preferredWidth() / preferredHeight().
Definition at line 113 of file YRichText.cc.
void YRichText::setText | ( | const std::string & | newText | ) | [inline] |
Alias for setValue().
Definition at line 78 of file YRichText.h.
void YRichText::setValue | ( | const std::string & | newValue | ) | [virtual] |
Change the text content of the RichText widget.
Derived classes should overwrite this function, but call this base class function in the new function.
Definition at line 71 of file YRichText.cc.
bool YRichText::shrinkable | ( | ) | const |
Returns 'true' if this widget is "shrinkable", i.e. it should be very small by default.
Definition at line 107 of file YRichText.cc.
std::string YRichText::text | ( | ) | const [inline] |
Alias for value().
Definition at line 83 of file YRichText.h.
std::string YRichText::value | ( | ) | const |
Return the text content of the RichText widget.
Definition at line 77 of file YRichText.cc.
virtual const char* YRichText::widgetClass | ( | ) | const [inline, virtual] |
Returns a descriptive name of this widget class for logging, debugging etc.
Reimplemented from YWidget.
Definition at line 60 of file YRichText.h.