\section{wxRichTextCtrl overview}\label{wxrichtextctrloverview}
-Classes: \helpref{wxRichTextCtrl}{wxrichtextctrl}, \helpref{wxRichTextBuffer}{wxrichtextbuffer},
-\helpref{wxRichTextAttr}{wxrichtextattr}, \helpref{wxTextAttrEx}{wxtextattrex},
-\helpref{wxRichTextCharacterStyleDefinition}{wxrichtextcharacterstyledefinition},
+{\bf Major classes:} \helpref{wxRichTextCtrl}{wxrichtextctrl}, \helpref{wxRichTextBuffer}{wxrichtextbuffer}, \helpref{wxRichTextEvent}{wxrichtextevent}
+
+{\bf Helper classes:} \helpref{wxTextAttr}{wxtextattr}, \helpref{wxRichTextRange}{wxrichtextrange}
+
+{\bf File handler classes:} \helpref{wxRichTextFileHandler}{wxrichtextfilehandler}, \helpref{wxRichTextHTMLHandler}{wxrichtexthtmlhandler},
+\helpref{wxRichTextXMLHandler}{wxrichtextxmlhandler}
+
+{\bf Style classes:} \helpref{wxRichTextCharacterStyleDefinition}{wxrichtextcharacterstyledefinition},
\helpref{wxRichTextParagraphStyleDefinition}{wxrichtextparagraphstyledefinition},
\helpref{wxRichTextListStyleDefinition}{wxrichtextliststyledefinition},
-\helpref{wxRichTextStyleSheet}{wxrichtextstylesheet},
-\helpref{wxRichTextStyleComboCtrl}{wxrichtextstylecomboctrl},
+\helpref{wxRichTextStyleSheet}{wxrichtextstylesheet}
+
+{\bf Additional controls:} \helpref{wxRichTextStyleComboCtrl}{wxrichtextstylecomboctrl},
\helpref{wxRichTextStyleListBox}{wxrichtextstylelistbox},
-\helpref{wxRichTextStyleListCtrl}{wxrichtextstylelistctrl},
-\helpref{wxRichTextStyleOrganiserDialog}{wxrichtextstyleorganiserdialog},
-\helpref{wxRichTextEvent}{wxrichtextevent}, \helpref{wxRichTextRange}{wxrichtextrange},
-\helpref{wxRichTextFileHandler}{wxrichtextfilehandler}, \helpref{wxRichTextHTMLHandler}{wxrichtexthtmlhandler},
-\helpref{wxRichTextXMLHandler}{wxrichtextxmlhandler},
-\helpref{wxRichTextFormattingDialog}{wxrichtextformattingdialog},
-\helpref{wxRichTextPrinting}{wxrichtextprinting},
+\helpref{wxRichTextStyleListCtrl}{wxrichtextstylelistctrl}
+
+{\bf Printing classes:} \helpref{wxRichTextPrinting}{wxrichtextprinting},
\helpref{wxRichTextPrintout}{wxrichtextprintout},
-\helpref{wxRichTextHeaderFooterData}{wxrichtextheaderfooterdata},
+\helpref{wxRichTextHeaderFooterData}{wxrichtextheaderfooterdata}
+
+{\bf Dialog classes:} \helpref{wxRichTextStyleOrganiserDialog}{wxrichtextstyleorganiserdialog},
+\helpref{wxRichTextFormattingDialog}{wxrichtextformattingdialog},
\helpref{wxSymbolPickerDialog}{wxsymbolpickerdialog}
wxRichTextCtrl provides a generic implementation of a rich text editor that can handle different character
so does not behave exactly as a native wxTextCtrl, although common editing conventions
are followed. Users may miss the built-in spelling correction on Mac OS X, or any
special character input that may be provided by the native control. It would also
-be a bad choice if intended users rely on screen readers that would be unhappy
+be a poor choice if intended users rely on screen readers that would be not work well
with non-native text input implementation. You might mitigate this by providing
the choice between wxTextCtrl and wxRichTextCtrl, with fewer features in the
former case.
{\small
\begin{verbatim}
- wxRichTextCtrl* richTextCtrl = new wxRichTextCtrl(splitter, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(200, 200), wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS);
+ wxRichTextCtrl* richTextCtrl = new wxRichTextCtrl(splitter, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(200, 200), wxVSCROLL|wxHSCROLL|wxBORDER_NONE|wxWANTS_CHARS);
wxFont textFont = wxFont(12, wxROMAN, wxNORMAL, wxNORMAL);
wxFont boldFont = wxFont(12, wxROMAN, wxNORMAL, wxBOLD);
tabs.Add(600);
tabs.Add(800);
tabs.Add(1000);
- wxTextAttrEx attr;
+ wxTextAttr attr;
attr.SetFlags(wxTEXT_ATTR_TABS);
attr.SetTabs(tabs);
r.SetDefaultStyle(attr);
\subsubsection{wxRichTextCtrl and styles}
-Styling attributes are represented by one of three classes: \helpref{wxTextAttr}{wxtextattr}, \helpref{wxTextAttrEx}{wxtextattrex} and \helpref{wxRichTextAttr}{wxrichtextattr}.
-wxTextAttr is shared across all controls that are derived from wxTextCtrl and
-can store basic character and paragraph attributes. wxTextAttrEx derives
-from wxTextAttr and adds some further attributes that are only supported
-by wxRichTextCtrl. Finally, wxRichTextAttr is a more efficient version
-of wxTextAttrEx that doesn't use a wxFont object and can be used to
-query styles more quickly. wxTextAttrEx and wxRichTextAttr are largely
-interchangeable and have suitable conversion operators between them.
+Styling attributes are represented by \helpref{wxTextAttr}{wxtextattr}.
When setting a style, the flags of the attribute object determine which
attributes are applied. When querying a style, the passed flags are ignored
The content is represented by a hierarchy of objects, all derived from
wxRichTextObject. An object might be an image, a fragment of text, a paragraph,
-or a whole buffer. Objects store a wxRichTextAttr containing style information;
-although it contains both paragraph formatting and character style, the
-paragraph style information is ignored by children of a paragraph (only
-character style is relevant to these objects).
+or a whole buffer. Objects store a wxTextAttr containing style information;
+a paragraph object can contain both paragraph and character information, but
+content objects such as text can only store character information. The final
+style displayed in the control or in a printout is a combination of base
+style, paragraph style and content (character) style.
The top of the hierarchy is the buffer, a kind of wxRichTextParagraphLayoutBox.
containing further wxRichTextParagraph objects, each of which can include text,
images and potentially other types of object.
Each object maintains a range (start and end position) measured
-from the start of the main parent box.
+from the start of the main parent object.
When Layout is called on an object, it is given a size which the object
must limit itself to, or one or more flexible directions (vertical
object, a wxRichTextPlainText object. When styling is applied to part of
this object, the object is decomposed into separate objects, one object
for each different character style. So each object within a paragraph always has
-just one wxRichTextAttr object to denote its character style. Of course, this can
+just one wxTextAttr object to denote its character style. Of course, this can
lead to fragmentation after a lot of edit operations, potentially leading
to several objects with the same style where just one would do. So
a Defragment function is called when updating the control's display, to ensure that