
Notes on converting RTF classes to wxWidgets
====================================================

Julian Smart, July 2006

Requirements:

Convert Michael Sgtrop's RTF reader/writer classes to
work with wxWidgets 2.7, to be incorporated into the
Richtext library in wxWidgets 2.7. Demonstrate reading
and writing of a simple RTF file.

The code will be self-contained, allowing manipulation
of RTF documents, but eventually (as part of a separate
phase) will be used by a wxRichTextCtrl handler for RTF
import/export.

The code should allow wxWidgets streams (not standard streams)
to be used, as well as files.

Where possible, abbreviated names should be replaced by
more meaningful names to make the code easier to read,
and the code should conform to the usual wxWidgets
standards, with standard formatting.

Classes to replace:

* CHashTbl: use e.g. wxHashMap instead
* Various lists: use e.g. WX_DECLARE_LIST. Original list
  code is not available, but functionality can be deduced
  from the code.
* CString to wxString conversion
* CFileRead to wxWidgets streams and files: CRtfRead can inherit from
  wxObject (or nothing) and the members can read from a stored
  wxInputStream pointer, passed in the constructor.
* CFileWrt to wxWidgets streams and files: see above.

Most of the data structure conversion work is in RtfDcmt.h/cpp.

The original author, Michael Sgtrop <MSoegtrop@yahoo.de>, will
answer basic questions about the functionality of the missing
list classes.

One comment from Michael:

"PushCopy pushes a copy of the top element in a stack-type
dynamic array."
