WaterMarkHelper < TEXTSTORE,WORDPROCESSOR >
DrawTextBox < WORDWRAPPEDTEXTIMAGER,SIMPLETEXTIMAGER,TEXTSTORE >
GetTextExtent < WORDWRAPPEDTEXTIMAGER,SIMPLETEXTIMAGER,TEXTSTORE >
A collection of fairly simple, hopefully (for some) handy utility claasses and routines using various parts of Led.This module will probably end up requiring linking in alot of Led - as its fairly diverse in nature. Perhaps that will get fixed in a future release?
WaterMarkHelper < TEXTSTORE,WORDPROCESSOR > [public]
TEXTSTORE defaults to ChunkedArrayTextStore
and WORDPROCESSOR defaults to WordProcessor
This can be used to draw a bit of styled (or other) as a watermark background. For example, you can
override TextImager::EraseBackground
() like this:
void MyLedBasedView::EraseBackground (Led_Tablet tablet, const Led_Rect& subsetToDraw, bool printing)
{
inherited::EraseBackground (tablet, subsetToDraw, printing);
static WaterMarkHelper<> waterMarkerImager (LED_TCHAR_OF ("Demo Mode")); // make this static - just as a performance hack. Also could be an instance variable of 'this'.
waterMarkerImager.DrawWatermark (tablet, GetWindowRect (), subsetToDraw);
}
Note - if you do this - you should also call
in your view's constructor, since scrolling bits won't work with a watermark background.
SetUseBitmapScrollingOptimization (false);
DrawTextBox < WORDWRAPPEDTEXTIMAGER,SIMPLETEXTIMAGER,TEXTSTORE > [public]
template < class WORDWRAPPEDTEXTIMAGER, class SIMPLETEXTIMAGER, class TEXTSTORE >
Trivial wrapper on TrivialImager
Note - this is done as a template - rather than directly as a function - so as to avoid forcing
people who include Led_MFC from also including all these other modules required for this. There is
a global function version of this function (Led_DrawText
) which will be enabled/included in
your program if you define qSupportDrawTextGetTextExtent
.
See also GetTextExtent
GetTextExtent < WORDWRAPPEDTEXTIMAGER,SIMPLETEXTIMAGER,TEXTSTORE > [public]
template < class WORDWRAPPEDTEXTIMAGER, class SIMPLETEXTIMAGER, class TEXTSTORE >
Trivial wrapper on TrivialImager
Note - this is done as a template - rather than directly as a function - so as to avoid forcing people who include LedHandySimple from also including all these other modules required for this.
See also DrawTextBox