Public Member Functions | Protected Attributes

# wxRichTextPlainText Class Reference
[Rich Text]

`#include <wx/richtext/richtextbuffer.h>`

Inheritance diagram for wxRichTextPlainText:
[legend]

## Detailed Description

This object represents a single piece of text.

##

Library: wxRichText
Category: Rich Text

See also:
  wxRichTextBuffer, wxRichTextCtrl

## Public Member Functions
| wxRichTextPlainText (const wxString &text=wxEmptyString, wxRichTextObject *parent=NULL, wxRichTextAttr *style=NULL)
| Constructor.
| wxRichTextPlainText (const wxRichTextPlainText &obj)
| Copy constructor.
virtual bool | Draw (wxDC &dc, const wxRichTextRange &range, const wxRichTextSelection &selection, const wxRect &rect, int descent, int style)
| Draw the item, within the given range.
virtual bool | Layout (wxDC &dc, const wxRect &rect, int style)
| Lay the item out at the specified position with the given size constraint.
virtual bool | GetRangeSize (const wxRichTextRange &range, wxSize &size, int &descent, wxDC &dc, int flags, wxPoint position=wxPoint(0, 0), wxArrayInt *partialExtents=NULL) const
| Returns the object size for the given range.
virtual wxString | GetTextForRange (const wxRichTextRange &range) const
virtual wxRichTextObject * | DoSplit (long pos)
virtual void | CalculateRange (long start, long &end)
| Calculates the range of the object.
virtual bool | DeleteRange (const wxRichTextRange &range)
virtual bool | IsEmpty () const
| Returns true if the object is empty.
virtual bool | CanMerge (wxRichTextObject *object) const
virtual bool | Merge (wxRichTextObject *object)
virtual void | Dump (wxTextOutputStream &stream)
| Dump object data to the given output stream for debugging.
long | GetFirstLineBreakPosition (long pos)
| Get the first position from pos that has a line break character.
virtual bool | UsesParagraphAttributes () const
| Does this object take note of paragraph attributes? Text and image objects don't.
virtual wxString | GetXMLNodeName () const
| Returns the XML node name of this object.
const wxString & | GetText () const
| Returns the text.
void | SetText (const wxString &text)
| Sets the text.
void | Copy (const wxRichTextPlainText &obj)
virtual wxRichTextObject * | Clone () const
| Clones the object.
## Protected Attributes
wxString | m_text

List of all members.

## Constructor & Destructor Documentation

wxRichTextPlainText::wxRichTextPlainText | ( | const wxString & | text = `wxEmptyString`,
|  | wxRichTextObject * | parent = `NULL`,
|  | wxRichTextAttr * | style = `NULL` |
| ) |  |  |

Constructor.

wxRichTextPlainText::wxRichTextPlainText | ( | const wxRichTextPlainText & | obj | ) | `[inline]`

Copy constructor.

## Member Function Documentation

virtual void wxRichTextPlainText::CalculateRange | ( | long | start,
|  | long & | end |
| ) |  |  | `[virtual]`

Calculates the range of the object.

By default, guess that the object is 1 unit long.

Reimplemented from wxRichTextObject.

virtual bool wxRichTextPlainText::CanMerge | ( | wxRichTextObject * | object | ) | const`[virtual]`

virtual wxRichTextObject* wxRichTextPlainText::Clone | ( |  | ) | const`[inline, virtual]`

Clones the object.

Reimplemented from wxRichTextObject.

void wxRichTextPlainText::Copy | ( | const wxRichTextPlainText & | obj | ) |

virtual bool wxRichTextPlainText::DeleteRange | ( | const wxRichTextRange & | range | ) | `[virtual]`

virtual wxRichTextObject* wxRichTextPlainText::DoSplit | ( | long | pos | ) | `[virtual]`

virtual bool wxRichTextPlainText::Draw | ( | wxDC & | dc,
|  | const wxRichTextRange & | range,
|  | const wxRichTextSelection & | selection,
|  | const wxRect & | rect,
|  | int | descent,
|  | int | style |
| ) |  |  | `[virtual]`

Draw the item, within the given range.

Some objects may ignore the range (for example paragraphs) while others must obey it (lines, to implement wrapping)

Implements wxRichTextObject.

virtual void wxRichTextPlainText::Dump | ( | wxTextOutputStream & | stream | ) | `[virtual]`

Dump object data to the given output stream for debugging.

Reimplemented from wxRichTextObject.

long wxRichTextPlainText::GetFirstLineBreakPosition | ( | long | pos | ) |

Get the first position from pos that has a line break character.

virtual bool wxRichTextPlainText::GetRangeSize | ( | const wxRichTextRange & | range,
|  | wxSize & | size,
|  | int & | descent,
|  | wxDC & | dc,
|  | int | flags,
|  | wxPoint | position = `wxPoint(0, 0)`,
|  | wxArrayInt * | partialExtents = `NULL` |
| ) |  |  | const`[virtual]`

Returns the object size for the given range.

Returns false if the range is invalid for this object.

Implements wxRichTextObject.

const wxString& wxRichTextPlainText::GetText | ( |  | ) | const`[inline]`

Returns the text.

virtual wxString wxRichTextPlainText::GetTextForRange | ( | const wxRichTextRange & | range | ) | const`[virtual]`

virtual wxString wxRichTextPlainText::GetXMLNodeName | ( |  | ) | const`[inline, virtual]`

Returns the XML node name of this object.

This must be overridden for wxXmlNode-base XML export to work.

Reimplemented from wxRichTextObject.

virtual bool wxRichTextPlainText::IsEmpty | ( |  | ) | const`[inline, virtual]`

Returns true if the object is empty.

Reimplemented from wxRichTextObject.

virtual bool wxRichTextPlainText::Layout | ( | wxDC & | dc,
|  | const wxRect & | rect,
|  | int | style |
| ) |  |  | `[virtual]`

Lay the item out at the specified position with the given size constraint.

Layout must set the cached size.

Implements wxRichTextObject.

virtual bool wxRichTextPlainText::Merge | ( | wxRichTextObject * | object | ) | `[virtual]`

void wxRichTextPlainText::SetText | ( | const wxString & | text | ) | `[inline]`

Sets the text.

virtual bool wxRichTextPlainText::UsesParagraphAttributes | ( |  | ) | const`[inline, virtual]`

Does this object take note of paragraph attributes? Text and image objects don't.

Reimplemented from wxRichTextObject.

## Member Data Documentation

wxString wxRichTextPlainText::m_text`[protected]`

|  | [ top ]