Led 3.0 Class Library Documentation

Module StyledTextEmbeddedObjects


Classes and Global Functions Index

Module Description:

This module introduces a whole bunch of classes which leverage the Led Marker, and particularly the Led 'StyledTextImager::StyleMarker' mechanism - to implement visual object embedding within the text.

The objects we embed are of type SimpleEmbeddedObjectStyleMarker. But this module also contains other classes to support the creation of these embedding markers, to get them properly inserted into the text. And this module contains many SimpleEmbeddedObjectStyleMarker subclasses, such as StandardDIBStyleMarker, which utilize this mechanism to display a particular data type as an emebdding.


Class: EmbeddedObjectCreatorRegistry [public]

Description:

Class which manages the registry of mappings from clipboard and Led private file format magic tag strings, to function pointers capable of reading these objects from RAM or a flavor package.


Class: SimpleEmbeddedObjectStyleMarker [public]

Base Classes: StyledTextImager::StyleMarker
Description:

An abstract class which contains most of the functionality for supporting Led embeddings in a Styled Text document.

All the various kinds of embeddings Led supports are subclasses of this class.

See InsertEmbeddingForExistingSentinal and AddEmbedding for more details on how to add these markers to the text. These utilities are not needed - but can simplify the process of adding embeddings.

Also, to understand more about how these work, see StyledTextImager::StyleMarker for more details.

(NEED LOTS MORE DETAILS - THIS IS IMPORTANT)

Member Details

SimpleEmbeddedObjectStyleMarker::DoCommand [public]

void SimpleEmbeddedObjectStyleMarker::DoCommand (PrivateCmdNumber cmd)

For all commands specified in overrides of SimpleEmbeddedObjectStyleMarker::GetCmdNumbers (ie all private commands supported) perform that command. This is invoked by the menu commands, etc (for example). The only command automatically handled by this implementation (SimpleEmbeddedObjectStyleMarker::DoCommand) is for eOpenCmdNum, and that just invokes SimpleEmbeddedObjectStyleMarker::HandleOpen (). For other command numbers, the subclasser must handle the commands themselves.

SimpleEmbeddedObjectStyleMarker::GetCmdNumbers [public]

vector < SimpleEmbeddedObjectStyleMarker::PrivateCmdNumber > SimpleEmbeddedObjectStyleMarker::GetCmdNumbers () const

Return a list of all private commands (such as eOpenCmdNum) which this embedding object can support. See also SimpleEmbeddedObjectStyleMarker::IsCmdEnabled (), SimpleEmbeddedObjectStyleMarker::GetCmdText (), and SimpleEmbeddedObjectStyleMarker::DoCommand () which also must be supported for each of those commands.

SimpleEmbeddedObjectStyleMarker::GetCmdText [public]

Led_SDK_String SimpleEmbeddedObjectStyleMarker::GetCmdText (PrivateCmdNumber cmd)

For all commands specified in overrides of SimpleEmbeddedObjectStyleMarker::GetCmdNumbers (ie all private commands supported) return the command name text.

SimpleEmbeddedObjectStyleMarker::GetCommandNames [public]

const SimpleEmbeddedObjectStyleMarker::CommandNames& SimpleEmbeddedObjectStyleMarker::GetCommandNames ()

Returns command name for each of the user-visible commands produced by this module.

See also TextInteractor::CommandNames.

SimpleEmbeddedObjectStyleMarker::IsCmdEnabled [public]

bool SimpleEmbeddedObjectStyleMarker::IsCmdEnabled (PrivateCmdNumber /*cmd*/) const

For all commands specified in overrides of SimpleEmbeddedObjectStyleMarker::GetCmdNumbers (ie all private commands supported) return whether or not that command is currently enabled.

SimpleEmbeddedObjectStyleMarker::SetCommandNames [public]

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

See SimpleEmbeddedObjectStyleMarker::GetCommandNames.


Class: SimpleEmbeddedObjectStyleMarker::CommandNames [public]

Description:

Command names for each of the user-visible commands produced by the SimpleEmbeddedObjectStyleMarker module.


Class: StandardDIBStyleMarker [public]

Base Classes: SimpleEmbeddedObjectStyleMarker
Description:

A Windows DIB (Device Independent Bitmap) picture embedding. Note that this can still be portably displayed on both Mac and Windows.


Class: StandardMacPictureStyleMarker [public]

Base Classes: SimpleEmbeddedObjectStyleMarker
Description:

A Macintosh format picture embedding.


Class: StandardURLStyleMarker [public]

Base Classes: SimpleEmbeddedObjectStyleMarker
Description:

A URL object. Double click on this to open the URL.


Class: StandardUnknownTypeStyleMarker [public]

Base Classes: SimpleEmbeddedObjectStyleMarker
Description:

Use to represent visually embeddings which we've read from a file, and want to keep track of, but don't know how to display.

Member Details

StandardUnknownTypeStyleMarker::CalcDefaultShownSize [public]

Led_TWIPS_Point StandardUnknownTypeStyleMarker::CalcDefaultShownSize ()

See StandardUnknownTypeStyleMarker::GetShownSize.

Generates a reasonable default size (based on sUnknownPict size) for the embedding. Used unless overridden by calls to StandardUnknownTypeStyleMarker::SetShownSize.

StandardUnknownTypeStyleMarker::GetShownSize [public]

Led_TWIPS_Point StandardUnknownTypeStyleMarker::GetShownSize () const

Return the size in TWIPS of this embeddings display. Defaults to some size appropriate for the picture drawn. But sometimes (like in reading RTF files which contain size annotations), we select an appropriate size.

See StandardUnknownTypeStyleMarker::SetShownSize

StandardUnknownTypeStyleMarker::SetShownSize [public]

void StandardUnknownTypeStyleMarker::SetShownSize (Led_TWIPS_Point size)

See StandardUnknownTypeStyleMarker::GetShownSize, or StandardUnknownTypeStyleMarker::CalcDefaultShownSize.

NB: it is the CALLERs responsability to assure the appropriate TextInteractors/TextImagers are notified to adjust any caching of size information they may have. This can be avoided by setting this value BEFORE adding the embedding to the TextStore.


Config Variable: qURLStyleMarkerNewDisplayMode [public]

Description:

The old display mode was somewhat idiosyncratic, and the new one is more like how other browsers display URLs. But keep the old one available in case some prefer it (at least for 3.0).

Turn ON by default.


AddEmbedding [public]

void AddEmbedding (SimpleEmbeddedObjectStyleMarker* embedding, TextStore& textStore, size_t insertAt, MarkerOwner* ownerForEmbedding);

Utility method to insert the given embedding (SimpleEmbeddedObjectStyleMarker) into the given TextStore, at a given position in the text. This routine, adds a sentinal character at that position. If the sentinal character is already there, use InsertEmbeddingForExistingSentinal.

Actually, this function isn't strictly needed. But there is alot of mumbo-jumbo that needs to be done when adding embeddings (e.g. DoAboutToUpdateCalls etc), and this packages up all those things and avoids you from having todo them in a bunch of places.


InsertEmbeddingForExistingSentinal [public]

void InsertEmbeddingForExistingSentinal (SimpleEmbeddedObjectStyleMarker* embedding, TextStore& textStore, size_t insertAt, MarkerOwner* ownerForEmbedding);

Utility method to insert the given embedding (SimpleEmbeddedObjectStyleMarker) into the given TextStore, at a given position in the text. To use this routine, the sentinal character must already be present. Use AddEmbedding if the sentinal has not yet been added.


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