ColoredUniformHidableTextMarkerOwner
HidableTextMarkerHelper < BASECLASS >
HidableTextMarkerOwner
HidableTextMarkerOwner::FontSpecHidableTextMarker
HidableTextMarkerOwner::HidableTextMarker
HidableTextMarkerOwner::LightUnderlineHidableTextMarker
UniformHidableTextMarkerOwner
This module provides generic support for keeping arbitrary ranges of text hidden within a Led buffer, but making it available for later display.
.ColoredUniformHidableTextMarkerOwner [public]
UniformHidableTextMarkerOwner
A UniformHidableTextMarkerOwner
where you can specify (simply) a color for the
hidable text markers (when they are shown).
HidableTextMarkerHelper < BASECLASS > [public]
BASECLASS
HidableTextMarkerOwner [public]
HidableTextMarkerOwner is a MarkerOwner
class, collecting together a set of
HidableTextMarkerOwner::HidableTextMarker
elements. Each of these hidden-text elements can contain
either currently hidden text, or text which could potentially be hidden.
Note that not all HidableTextMarkerOwner::HidableTextMarker
elements need to share the same
'hidden' / 'shown' state. Some can be hidden while others shown. And markers of different subclasses of
HidableTextMarkerOwner::HidableTextMarker
can be collected together in a single, or in multiple
HidableTextMarkerOwner
s.
See HidableTextMarkerOwner::HidableTextMarker
for more details, and subclasses.
Implemenation Note:
I considered implementing this using a map<> for its red-black tree implementation. That might turn out to
be faster if you have lots of hidden text. But the APIs STL provides you when you try todo this are not very friendly.
I battled them for a while (you must make a map with a second bogus field, and then everywhere try to say 'first' after
you access the interator - and thats not so bad in MY code - but when I use the builtin STL helpers - its more of a pain, and
then the lookup - find routine was a real pain - cuz I don't want to lookup by Marker* - but by POSITION).
Member Details |
---|
|
Return a NB: this routine only returns the hidable regions which are currently being SHOWN - not any invisible ones. This is because otherwise the run information would be useless, and not convey the actual sizes of the hidden text. See also HidableTextMarkerOwner::GetHidableRegionsWithData. |
If 'hidden' is true - then return true - iff the entire region from 'from' to 'to' is hidden. If 'hidden' is false, then return true iff the entire region from 'from' to 'to' contains no hidden elements. |
Tell all the existing 'hidden text' markers (optionally restricted to those intersecting
the 'from' .. 'to' range) to hide themselves. This does not create any new See |
This routine creates the actual marker objects to be used to hide text. By default - it
creates |
Mark the region from 'from' to 'to' as hidable. This could involve coalescing adjacent hidden text markers (though even adjacent markers are sometimes NOT coalesced, if they differ in shown/hidden state, or if one is already hidden - cuz then it would be too hard to combine the two). This routine assures that after the call - all text in the given range is encapsulated by a hidden-text marker or markers. Note - this does NOT actually hide the text. You must then call |
Remove any hidable-text markers in the given range. The markers could be either hidden or shown at the time. This could involce splitting or coalescing adjacent markers. |
|
Sets the externalizer ( |
Sets the internalizer ( |
Tell all the existing 'hidden text' markers (optionally restricted to those intersecting
the 'from' .. 'to' range) to show themselves. This does not destroy any new See also |
HidableTextMarkerOwner::FontSpecHidableTextMarker [public]
SimpleStyleMarkerByFontSpec < BASECLASS > , where BASECLASS = @HidableTextMarkerHelper < BASECLASS > ' where BASECLASS = HidableTextMarkerOwner::HidableTextMarker
Adds the argument style specification to the selected text. Smart enough to handle style overlaps with some kinds of
style markers (most importantly - StandardStyledTextImager::StandardStyleMarker
).
May have to also add embedding support to this. And may want to move this functionality out of here, and into some other helper file, and just USE the functionality here.
See also HidableTextMarkerOwner::LightUnderlineHidableTextMarker
.
HidableTextMarkerOwner::HidableTextMarker [public]
StyledTextImager::StyleMarker
HidableTextMarkerOwner::LightUnderlineHidableTextMarker [public]
HidableTextMarkerHelper < BASECLASS >
, where BASECLASS = SimpleStyleMarkerWithLightUnderline < BASECLASS > , where BASECLASS = @HidableTextMarkerOwner::HidableTextMarker'
Adds a light dashed underline to the given region. One advantage of
this over HidableTextMarkerOwner::FontSpecHidableTextMarker
is that
it works well with other embeddings and display markers, cuz it lets them
do their drawing, and simply adds the underline.
UniformHidableTextMarkerOwner [public]
UniformHidableTextMarkerOwner is a HidableTextMarkerOwner
class, which has a notion of
whether or not all the hidden text markers are hidden or not. You can manually change the hidden
state of particular markers - if you wish (via HidableTextMarkerOwner::HideAll () commands with a from/to range).
But the default behavior is that all the markers share this hidden or not hidden state, and NEWLY created 'hiding' markers inherit this state.