MultiRowTextImager
MultiRowTextImager::MultiRowPartition
MultiRowTextImager::MultiRowPartitionMarker
MultiRowTextImager::RowReference
MultiRowTextImager is a TextImager
which supports having partition elements made up of multirow text.
MultiRowTextImager [public]
PartitioningTextImager
A PartitioningTextImager
which supports the notion of having multiple rows of text per line.
NB: Although this class properly supports the APIs for PartitioningTextImager
, it has a
limitation, based on its historical implementation. It assumes that there is a one-to-one
correspondance between its Partition and the TextImager, and that this Partition is (or subclasses from
MultiRowTextImager::MultiRowPartition
).
This limitation is partly (largely) based on the fact that we use the trick of piggybacking row-wrap information on the partition markers themselves. A future version of this class might keep the per-row information in a MarkerCover, or some such other data structure.
Member Details |
---|
Override |
Count the # of rows from one rowreference to the other (order doesn't matter) |
Count the # of rows from one rowreference to the other (order doesn't matter), but never count a number of rows exceeding 'limit'. Just return 'limit' if there are 'limit' rows or more. The reason you would use this intead of |
Called by |
Draw the given row of text. Erase the background (by calling NB: This bit about flicker changed in Led 2.2. Earlier Led versions tried to elminate flicker at all levels and avoid offscreen bitmaps. But problems with kerning made this difficult. |
Called by |
Called by |
Get the It calls |
Adjust See also |
Returns the last row-reference in the window (end of window). |
Efficient implemenation of |
Efficient implemenation of |
Advance the given row reference argument to the next row. Return true if there
is a valid next row. And false if |
Retreat the given row reference argument to the previous row. Return true if there
is a valid previous row. And false if See also |
Returns the height (in standard GDI units, usually pixels) of the given row reference. |
Gets the length of the given row (in See also MultiRowTextImager::GetStartOfRow and MultiRowTextImager::GetEndOfRow. |
Override/implement |
Invalidate cached row-height/etc information for the entire imager. Invalidate rows in a window cached values, etc. Called automatically from MultiRowTextImager::TabletChangedMetrics () |
Override |
Implement |
Hook TextImager::TabletChangedMetrics () to call MultiRowTextImager::InvalidateAllCaches () |
MultiRowTextImager::MultiRowPartition [protected]
LineBasedPartition
MultiRowTextImager::MultiRowPartitionMarker [public]
Partition::PartitionMarker
A partition marker which keeps track of extra information to support having multiple rows per line. This information includes a pixel height of the partition element. A RowHeight array (GetRowHeight()). And a RowStart array (GetLineRelativeRowStartPosition). Also, each of these partition markers has an interline space field.
Note that the RowHeight is in the standard GDI-defined units of height (typically pixels). And that the rowStart array specifies Led_tChar offsets into the partition marker.
NB: that these numbers are zero-based offsets, and from the start of the PM. They are kept relative to the start of the PM, because otherwise they would need to be real markers in their own right to get updated when text before the given PM is added or deleted. Making them relative to the PM start is the only way to assure they don't need to be updated (except when the PM itself has its contents changed, and in that case, it gets a MarkerOwner::DidUpdate call, and can invalidat the rowstarts array.
Member Details |
---|
Get the interline space associated with a partition. Each partition can have a unique interline space. These are computed by overriding the MultiRowPartitionMarker::CalculateInterLineSpace () method. They are not set directly. Though you CAN mark as invalid the interline space which has already been computed for a given partition element via MultiRowTextImager::MultiRowPartitionMarker::InvalidateInterLineSpace (). |
Return the last valid row index (may invoke FillCache if cached result not already available). |
Return the cached height of the given partition element. This is the sum of the pixel height computed in FillCache () for the actual text, and the interline space (see GetInterLineSpace ()). |
Return the cached number of rows in this partition element. This is computed in MultiRowTextImager::FillCache (), and specified indirectly via calls (from inside FillCache) to MultiRowTextImager::MultiRowPartitionMarker::IncrementRowCountAndFixCacheBuffers (). |
See MultiRowTextImager::MultiRowPartitionMarker::GetInterLineSpace (). |
Return the height - (in whatever unit the GDI is using, but typically pixels) of the given row. The internal representation of these things is somewhat obscure for data size reasons, so there is some unpacking to be done. |
Return the partition element relative offset of the start of a given row. So for the first row, this is always zero. |
Set the height of a given row. This is typically just done within FillCache(). |
Set the partition element relative offset of the start of a given row. So for the first row, this is MUST BE zero. This is typically just called during FillCache (). |
MultiRowTextImager::RowReference [public]
A utility class to represent a row. It is a struct with a parition marker, and a row number. These things are NOT long-lived. And shouldn't be saved anyplace, as no attempt is made to keep them automaticlly up to date as the text is modified. They are just a convenient, short-hand way to navigate through rows of text.