Led 3.0 Class Library Documentation

Module StyledTextIO_RTF


Classes and Global Functions Index

Module Description:

The knowledge of how to read RTF is in StyledTextIOReader_RTF and the knowledge of how to write RTF is in StyledTextIOWriter_RTF.


Class: RTFIO [public]

Description:

This RTFIO class serves as a (shared) scope to define some other classes used in reading/writing RTF. It probably should be replaced with something using namespaces. But I wanted to make as small and simple a change as possible to the old code (that used RTFInfo for this purpose).


Class: RTFIO::FontTable [public]

Description:

This object contains a vector of RTFIO::FontTableEntry. This corresponds to the \fonttbl RTF element. Its used to associate font numbers with names and other information.


Class: RTFIO::FontTableEntry [public]

Description:

These objects are collected together in a RTFIO::FontTable.


Class: RTFIO::ListOverrideTableEntry [public]

Description:

These objects are collected together in a RTFIO::ListTables.


Class: RTFIO::ListTableEntry [public]

Description:

These objects are collected together in a RTFIO::ListTables.


Class: RTFIO::ListTables [public]

Description:

This object contains a vector of RTFIO::ListTableEntry. This corresponds to the \listtable RTF element. It also contains a vector of RTFIO::ListOverrideTableEntry entries. These map to \listoverridetable entries. See the RTF 1.5 (or later) spec.


Class: RTFInfo [public]

Description:

This RTFInfo class is designed to capture any extra information about the RTF file you might want to keep track of, as a side-effect of reading it in (beyond simply the things which Led supports). For example, if you wanted to keep track of the original character set, the author, or the original style sheet information, this would be a good place to store those things.

NB: This class used to contain all the definitions name contained in RTFIO.


Class: StyledTextIOReader_RTF [public]

Base Classes: StyledTextIOReader
Description:

This is the class you construct to read in content as RTF-formatted text. You must specify SrcStream of input data (usually a file, or a clipboard record), and a SinkStream (usually a text buffer) to write to.

Then call StyledTextIOReader_RTF::Read () to get the actual reading done.

Member Details

StyledTextIOReader_RTF::ConstructDIBFromData [public]

Led_DIB* StyledTextIOReader_RTF::ConstructDIBFromData (Led_TWIPS_Point shownSize, ImageFormat imageFormat, Led_TWIPS_Point bmSize, size_t nBytes, const void* data)

Take the given size and data parameters, and consturct a new Led_DIB (which must be freed by caller using delete()). Returns NULL if unable to convert the given format.

StyledTextIOReader_RTF::ConstructDIBFromEMFHelper [public]

Led_DIB* StyledTextIOReader_RTF::ConstructDIBFromEMFHelper (Led_TWIPS_Point shownSize, Led_TWIPS_Point bmSize, const HENHMETAFILE hMF)

Construct a Led_DIB given HENHMETAFILE, the desired 'shownSize' and 'bmSize' can override the size specified in the metafile itself.

This routine is only available if qWindows.

StyledTextIOReader_RTF::GetPlainFont [public]

Led_FontSpecification StyledTextIOReader_RTF::GetPlainFont () const

Get the font which is used for RTF \plain directives. This can be set via StyledTextIOReader_RTF::SetPlainFont

StyledTextIOReader_RTF::ReadTopLevelPictData [public]

void StyledTextIOReader_RTF::ReadTopLevelPictData (Led_TWIPS_Point* shownSize, ImageFormat* imageFormat, Led_TWIPS_Point* bmSize, vector < char > * objData)

Read in the data from a \pict group.

StyledTextIOReader_RTF::SearchForwardFor [public]

bool StyledTextIOReader_RTF::SearchForwardFor (const char* searchFor, size_t maxCharsToExamine)

Internal/Private

Search for the given string (up to a max of maxCharsToExamine characters). Return true iff the string is found and leave the stream positioned where found. If fail to find - leave stream pointer unchanged. Don't THROW cuz of end of file - but just treat that as not finding. Other exceptions also return stream to original position.

StyledTextIOReader_RTF::SetPlainFont [public]

void StyledTextIOReader_RTF::SetPlainFont (const Led_FontSpecification& fsp)

Set the font which is used for RTF \plain directives. See StyledTextIOReader_RTF::GetPlainFont


Class: StyledTextIOReader_RTF::ReaderContext [public]

Description:

This context object is used during the process of reading RTF text from a source, and internalizing it into internal format. It is used to keep track of various document context information, like character sets, etc.


Class: StyledTextIOReader_RTF::ReaderContext::Destination_ [public]

Description:

Class: StyledTextIOReader_RTF::ReaderContext::GroupContext [public]

Description:

Helper class to implement nested scopes where we save/restore font info while reading


Class: StyledTextIOReader_RTF::ReaderContext::SinkStreamDestination [public]

Base Classes: StyledTextIOReader_RTF::ReaderContext::Destination_
Description:

Class: StyledTextIOReader_RTF::ReaderContext::SinkStreamDestination::Context [public]

Description:

Class: StyledTextIOWriter_RTF [public]

Base Classes: StyledTextIOWriter
Description:

Return to Led Page Return to Led ClassLib Documentation Index Return to Led Reference Manual Index
Last Updated 2001-10-20