Led 3.0 Class Library Documentation

Module StandardStyledTextImager

Classes and Global Functions Index

Module Description:

StandardStyledTextImager is not intended to be a general and flexible style run interface. Rather, it is intended to mimic the usual style-run support found in other text editors, like MS-Word, or Apples TextEdit.

It keeps style runs in markers which are a subclass of StyledTextImager::StyleMarker, called StandardStyledTextImager::StandardStyleMarker.

Class: SimpleStyleMarkerByIncrementalFontSpecStandardStyleMarkerHelper [public]

Base Classes: BASECLASS

Simple helper class so that SimpleStyleMarkerByIncrementalFontSpec will use the font specification of any embedded StandardStyledTextImager::StandardStyleMarker will have its associated Led_FontSpecification copied out and used in the FontSpec.

As a kludge - this class depends on the user ALSO using the template SimpleStyleMarkerWithExtraDraw. We override its SimpleStyleMarkerWithExtraDraw::MungeRunElement () method. This isn't strictly necesary, but it saves us alot of code. That way - we can just change the RunElt to return NULL for the marker - and then the caller will use its default algorithm, and call the MakeFontSpec () method.

The nature of class class could change in the future - so its not recomended that anyone directly use it.

Class: StandardStyledTextImager [public]

Base Classes: virtual StyledTextImager

StandardStyledTextImager is not intended to be a general and flexible style run interface (like StyledTextImager). Rather, it is intended to mimic traditional API for handling styled text found in other text editors, like MS-Word, or Apples TextEdit.

You can specify ranges of text, and apply font styles to them. And there are routines (like StandardStyledTextImager::GetContinuousStyleInfo etc) to help find/idenitfiy font style runs, etc.

This class is built trivially ontop of the StyledTextImager. The rendering of styles and layout issues are all taken care of. This class is merely responsable for preserving a disjoint cover (partition) of styles (StandardStyledTextImager::StandardStyleMarker), and coalescing adjacent ones that have the same font info.

Member Details

StandardStyledTextImager::GetContinuousStyleInfo [public]

Led_IncrementalFontSpecification StandardStyledTextImager::GetContinuousStyleInfo (size_t from, size_t nTChars) const

Create a Led_IncrementalFontSpecification with set as valid all attributes which apply to all of the text from 'from' for 'nTChars'.

So for example - if all text in that range has the same face, but different font sizes, then the face attribute will be valid (and set to that common face) and the font size attribute will be set invalid.

This is useful for setting menus checked or unchecked in a typical word processor font menu.

StandardStyledTextImager::HookStyleDatabaseChanged [public]

void StandardStyledTextImager::HookStyleDatabaseChanged ()

Called whenever the StandardStyledTextImager::StyleDatabasePtr associated with this StandardStyledTextImager is changed. This means when a new one is provided, created, or disassociated. It does NOT mean that its called when any of the data in the style database changes.

StandardStyledTextImager::SummarizeStyleMarkers [public]

vector < StyledTextImager::RunElement > StandardStyledTextImager::SummarizeStyleMarkers (size_t from, size_t to) const

NOW OBSOLETE Code. See qOldStyleMarkerBackCompatHelperCode.

See StyledTextImager::SummarizeStyleMarkers. Except use StyledTextImager::StyleMarkerSummarySinkForSingleOwner by default, thus restricting this imager to paying attention to style markers owned by our style database.

Class: StandardStyledTextImager::InfoSummaryRecord [public]

Base Classes: Led_FontSpecification

Add a length attribute to Led_FontSpecification. Used in specifying style runs by StandardStyledTextImager.

Class: StandardStyledTextImager::StandardStyleMarker [public]

Base Classes: StyledTextImager::StyleMarker

Private, implementation detail class. Part of StandardStyledTextImager implementation.

Should NOT be subclassed. These participate in routines to grab runs of style info, etc, and aren't really designed to be subclassed. Also, all elements of this type in the text buffer are summarily deleted upon deletion of the owning StyleDatabase.

Class: StandardStyledTextImager::StyleDatabasePtr [public]

Base Classes: Led_RefCntPtr < T > , (T=StandardStyledTextImager::StyleDatabaseRep)

Class: StandardStyledTextImager::StyleDatabaseRep [public]

Base Classes: MarkerCover < StandardStyleMarker,Led_FontSpecification,Led_IncrementalFontSpecification >

Reference counted object which stores all the style runs objects for a StandardStyledTextImager. An explicit storage object like this is used, instead of using the StandardStyledTextImager itself, so as too allow you to have either multiple views onto the same text which use the SAME database of style runs, or to allow using different style info databases, all live on the same text.

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