Led 3.0 Class Library Documentation

Module StandardStyledTextInteractor


Classes and Global Functions Index

Module Description:

Combine the functionality of TextInteractor, and StandardStyledTextImager, and add a bunch of related functionality (which only makes sense when you have both of these features).


Class: StandardStyledTextInteractor [public]

Base Classes: virtual TextInteractor, StandardStyledTextImager
Description:

Simple mixin of StandardStyledTextImager and TextInteractor.

Since this class is designed to make easier implementing a standard font/stylerun type editor, we will override SetDefaultFont() and re-interpret it to mean setting the font for the current selection of text, or for the NULL selection, just as with Apples TE.

NB: We considered using InteractorImagerMixinHelper template as base-class helper. But it didn't help. We do too many overrides it doesn't, so it doesn't help much. And then later mixing together two subclasses of InteractorImagerMixinHelper (like for word processor) requires disambiguating stuff in InteractorImagerMixinHelper itself (like Draw). Just not worth much. -- LGP 970707.

Member Details

StandardStyledTextInteractor::GetCommandNames [public]

const StandardStyledTextInteractor::CommandNames& StandardStyledTextInteractor::GetCommandNames ()

Returns command name for each of the user-visible commands produced by this module. This name is used used in the constructed Undo command name, as in, "Undo Change Font". You can replace this name with whatever you like.You change this value with WordProcessor::SetCommandNames.

The point of this is to allow for different UI-language localizations, without having to change Led itself.

See also StandardStyledTextInteractor::CommandNames.

StandardStyledTextInteractor::GetEmptySelectionStyle [public]

Led_FontSpecification StandardStyledTextInteractor::GetEmptySelectionStyle () const

Return the style applied to newly typed text (or interactively entered text) at the current selection. This font defaults to the same as the surrounding text. But can be changed under user-control, in order to implement the usual semantics of a font / style menu.

See StandardStyledTextInteractor::SetEmptySelectionStyle.

StandardStyledTextInteractor::InteractiveSetFont [public]

void StandardStyledTextInteractor::InteractiveSetFont (const Led_IncrementalFontSpecification& defaultFont)

Sets the given font into current selection. Since this is an 'interactive' version, it shows up in the undo stream, and is undoable.

For now, this is a trivial wrapper on StandardStyledTextInteractor::SetDefaultFont (Led 2.3b8). But in the future, this will probably be the ONLY interface by which this operation will be undoable.

StandardStyledTextInteractor::SetCommandNames [public]

void StandardStyledTextInteractor::SetCommandNames (const StandardStyledTextInteractor::CommandNames& cmdNames)

See StandardStyledTextInteractor::GetCommandNames.

StandardStyledTextInteractor::SetDefaultFont [public]

void StandardStyledTextInteractor::SetDefaultFont (const Led_IncrementalFontSpecification& defaultFont)

This override of TextImager::SetDefaultFont applies the given incremental font specification to the current selection. If the selection is empty - it stores the specification in a special variable used to represent the font of the empty selection. Then when the user types, the newly typed characters are in that font.

This function is meant to implement the underlying semantics of the standard word-processor font/style selection menu.

As such, it is also entered by name in the command UNDO list. If you do not want your font changes treated that way, use StandardStyledTextImager::SetStyleInfo.

StandardStyledTextInteractor::SetEmptySelectionStyle [public]

void StandardStyledTextInteractor::SetEmptySelectionStyle (Led_FontSpecification newEmptyFontSpec)

Set the Led_FontSpecification applied to newly typed text (or interactively entered text) at the current selection. This font defaults to the same as the surrounding text. But can be changed under user-control, in order to implement the usual semantics of a font / style menu.

Note: if the selection is currently empty, this routine will make appropriate AboutToUpdate/DidUpdate calls to notifie anyone interested of the change (so - for example - the cached font metrics of text can change).

See StandardStyledTextInteractor::GetEmptySelectionStyle.


Class: StandardStyledTextInteractor::CommandNames [public]

Description:

Command names for each of the user-visible commands produced by the TextInteractor module. This name is used used in the constructed Undo command name, as in, "Undo Change Font". You can replace this name with whatever you like. You change this value with StandardStyledTextInteractor::SetCommandNames.

The point of this is to allow for different UI-language localizations, without having to change Led itself.

See also TextInteractor::GetCommandNames.

See also TextInteractor::CommandNames.


Class: StandardStyledTextInteractor::EmptySelStyleTextRep [public]

Base Classes: InteractiveReplaceCommand::SavedTextRep
Description:

Class: StandardStyledTextInteractor::StandardStyledTextIOSinkStream [public]

Base Classes: StyledTextIOReader::SinkStream
Description:

This is a writer sink stream which talks to a StandardStyledTextImager and/or WordProcessor class. It knows about StyleDatabases, and ParagraphDatabases, and writes content to them from the input reader class.


Class: StandardStyledTextInteractor::StandardStyledTextIOSrcStream [public]

Base Classes: StyledTextIOWriter::SrcStream
Description:

This is a writer source stream which talks to a StandardStyledTextImager and/or WordProcessor class. It knows about StyleDatabases, and ParagraphDatabases, and gets content from them for the output writer class.


Class: StandardStyledTextInteractor::StyledTextFlavorPackageExternalizer [public]

Base Classes: virtual FlavorPackageExternalizer
Description:

Add RTF, Led_Native, and SingleSelectedEmbedding support.

Member Details

StandardStyledTextInteractor::StyledTextFlavorPackageExternalizer::mkStandardStyledTextIOSrcStream [public]

StandardStyledTextInteractor::StandardStyledTextIOSrcStream* StyledTextFlavorPackageExternalizer::mkStandardStyledTextIOSrcStream (size_t selectionStart, size_t selectionEnd)

Hook function so that the various Internalize_XXX methods in StandardStyledTextInteractor::StyledTextFlavorPackageExternalizer can use a dynamicly typed SinkStream. So - for example - the internalize methods include paragraph info.


Class: StandardStyledTextInteractor::StyledTextFlavorPackageInternalizer [public]

Base Classes: virtual FlavorPackageInternalizer
Description:

Add RTF, Led_Native, and SingleSelectedEmbedding support.

Member Details

StandardStyledTextInteractor::StyledTextFlavorPackageInternalizer::mkStandardStyledTextIOSinkStream [public]

StandardStyledTextInteractor::StandardStyledTextIOSinkStream* StyledTextFlavorPackageInternalizer::mkStandardStyledTextIOSinkStream (size_t insertionStart)

Hook function so that the various Externalize_XXX methods in StandardStyledTextInteractor::StyledTextFlavorPackageInternalizer can use a dynamicly typed SinkStream. So - for example - the externalize methods include paragraph info.


Config Variable: qIncludeLedNativeFileFormatSupportInStandardStyledTextInteractor [public]

Description:

This format isn't terribly useful right now. It may become much more useful in future versions, if I decide to rewrite it, to make it much faster than RTF. Then I may use it internally more.

It should cause little harm being turned on, but some people (SPR#0810) have requested the ability to have this code stripped out.

Turn ON by default.


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