+\subsection{Programming with wxRichTextCtrl}
+
+You need to include {\tt <wx/richtext/richtextctrl.h>} in your source, and link
+with the appropriate wxWidgets library with {\tt richtext} suffix. Put the rich text
+library first in your link line to avoid unresolved symbols.
+
+Then you can create a wxRichTextCtrl, with the wxWANT\_CHARS style if you want tabs to
+be processed by the control rather than being used for navigation between controls.
+
+It's helpful to have a model of how styling works. Any piece of text can have its
+style changed, but there also two global notions of style. The control's {\it basic} style
+is the fundamental style for the whole control, to which other character and paragraph styles are
+applied. For example, you can change the control's overall font by either calling SetBasicStyle with
+the appropriate font style, or by calling SetFont.
+
+The {\it default} style, on the other hand, is applied to subsequently inserted
+content. You might click on a Bold formatting tool, which sets bold as one of the default
+attributes, and typing will appear in bold. Then when you select Italic, both
+bold and italic attributes are applied as you type. The default attribute
+is set with \helpref{SetDefaultStyle}{wxrichtextctrlsetdefaultstyle}.
+
+(To be finished.)
+
+\subsection{How wxRichTextCtrl is implemented}
+
+Data representation is handled by wxRichTextBuffer, and a wxRichTextCtrl
+always has one such buffer.
+
+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).
+
+The top of the hierarchy is the buffer, a kind of wxRichTextParagraphLayoutBox.
+containing further wxRichTextParagraph objects, each of which can include text and
+images.
+
+Each object maintains a range (start and end position) measured
+from the start of the main parent box.
+
+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
+or horizontal). So, for example, a centered paragraph is given the page
+width to play with (minus any margins), but can extend indefinitely
+in the vertical direction. The implementation of Layout caches the calculated
+size and position.
+
+When the buffer is modified, a range is invalidated (marked as requiring
+layout), so that only the minimum amount of layout is performed.
+
+A paragraph of pure text with the same style contains just one further
+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
+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
+the minimum number of objects is used.
+
+(To be finished.)
+
+\subsection{wxRichTextCtrl roadmap}
+
+\wxheading{Bugs}
+
+This is an incomplete list of bugs.
+
+\begin{itemize}
+\item Moving the caret up at the beginning of a line sometimes incorrectly positions the
+caret.
+\end{itemize}
+
+\wxheading{Features}