LED_MFC_HANDLE_COMMANDLED_MFC_HANDLE_COMMAND_RANGELed_MFCLed_MFCReaderDAndDFlavorPackageLed_MFCWriterDAndDFlavorPackageLed_MFC_COleControlHelper < BASECLASS > Led_MFC_CViewHelper < BASECLASS > Led_MFC_DragAndDropWindow < BASECLASS > Led_MFC_DragAndDropWindow < BASECLASS > ::CommandNamesLed_MFC_ExceptionHandlerHelper < BASECLASS > Led_MFC_Helper < MFC_BASE_CLASS,BASE_INTERACTOR > Led_MFC_MimicMFCAPIHelper < BASECLASS > Led_MFC_OptionalWin32SDKMessageMimicHelper < BASECLASS > Led_MFC_TabletFromCDCLed_MFC_TmpCDCFromTabletLed_MFC_TmpCmdUpdaterLed_MFC_XTextInteractorCommonCommandHelper_MFC < BASECLASS,CMD_INFO,CMD_ENABLER > qGenerateStandardMFCExceptionsqLedAssertsDefaultToMFCAssertsqSupportDrawTextGetTextExtentAsCPointAsCRectAsCSizeAsLedPointAsLedRectLed_DrawTextLed_DrawText < TRIVIALWORDWRAPPEDTEXTIMAGER,SIMPLETEXTIMAGER,TEXTSTORE > Led_GetTextExtentLed_GetTextExtent < TRIVIALWORDWRAPPEDTEXTIMAGER,SIMPLETEXTIMAGER,TEXTSTORE > Led MFC specific wrappers.
As of Led 2.3, MFC is the only well supported way to use Led for Win32 (MS Windows). There are small, but definite MFC assumptions sprinkled throughout the rest of Led. About 99% of them are here. And in future releases ALL will be here (so its easier to use Led on Win32 with other class libraries).
Note that since MFC provides no abstract base classes for implementing editor-like behavior, Led cannot subclass from CEdit or CEditView.
Also - for some purposes, it would be better to inherit from CWnd. And for others, better to inherit from CView. Versions of Led prior to Led 2.3 inherited from CView.
Now - through the magic of templates - Led supports (almost) any MFC base class (at least CView and CWnd) for a Led-based editor, so long as it supports at least the functionality of CWnd/CView.
The current Led sample applications (LedIt! and LedLineIt! all use Led inheriting from a CView, and that is necessary to get the OLE/embedding funcitonality built in. But Led has also been tested as a replacemnt edit control inheriting from CWnd (@LEC).
LED_MFC_HANDLE_COMMAND [public]
Trivial helper for building MFC message maps.
LED_MFC_HANDLE_COMMAND_RANGE [public]
Trivial helper for building MFC message maps.
Led_MFC [public]
Led_MFC_CViewHelper < BASECLASS > , where BASECLASS=Led_MFC_OptionalWin32SDKMessageMimicHelper < BASECLASS > , where BASECLASS=@Led_MFC_MimicMFCAPIHelper < BASECLASS > ', where BASECLASS == Led_MFC_Helper < BASECLASS > , where BASECLASS=CViewThis template is provided partly as a convenience, for such a common case. But MOSTLY as backwards compatability for Led 2.2. In Led 2.2, Led_MFC was the SOLE class provided to integrated Led with MFC. Now there is a whole suite of individually selectable templates to provide that interfacing.
Led_MFCReaderDAndDFlavorPackage [public]
ReaderFlavorPackageReaderFlavorPackage which reads from a COleDataObject as its underlying storage. Useful for Drop (Drag and Drop) processing.
Led_MFCWriterDAndDFlavorPackage [public]
WriterFlavorPackageA WriterFlavorPackage which writes to a COleDataObject as its underlying storage. Useful for Drag (Drag and Drop) processing.
Led_MFC_COleControlHelper < BASECLASS > [public]
BASECLASSNB: BASECLASS must derive (possibly indirectly) from CView.
To use this class, you must also define DoDeclare_Led_MFC_COleControlHelper_MessageMap() to declare the actual message map for the template (unless its already done for yours in Led_MFC.cpp).
Led_MFC_CViewHelper < BASECLASS > [public]
BASECLASSNB: BASECLASS must derive (possibly indirectly) from CView.
To use this class, you must also define DoDeclare_Led_MFC_CViewHelper_MessageMap() to declare the actual message map for the template (unless its already done for yours in Led_MFC.cpp).
| Member Details | |||||
|---|---|---|---|---|---|
|
Don't call directly. Just called after DC setup from Led_MFC_CViewHelper |
Led_MFC_DragAndDropWindow < BASECLASS > [public]
BASECLASSNB: BASECLASS must derive (possibly indirectly) from CWnd.
To use this class, you must also define DoDeclare_Led_MFC_DragAndDropWindow_MessageMap() to declare the actual message map for the template (unless its already done for yours in Led_MFC.cpp).
Probably eventually migrate more stuff from Led_MFC_CViewHelper here to this class. But for now,
I'm risk averse. I don't want to break the class library. And this is all that is needed to move out to meet the immediate
complaints.
| Member Details |
|---|
|
The point of this is to allow for different UI-language localizations, without having to change Led itself. See also |
|
The point of this is to allow for different UI-language localizations, without having to change Led itself. |
|
Led_MFC_DragAndDropWindow.
The point of this is to allow for different UI-language localizations, without having to change Led itself. |
|
Led_MFC_DragAndDropWindow.
The point of this is to allow for different UI-language localizations, without having to change Led itself. |
|
Led_MFC_DragAndDropWindow.
|
|
|
|
Led_MFC_DragAndDropWindow.
|
|
Led_MFC_DragAndDropWindow.
|
Led_MFC_DragAndDropWindow < BASECLASS > ::CommandNames [public]
Command names for each of the user-visible commands produced by the TextInteractor module.
This name is used used in the constructed Undo command name, as
in, "Undo Drag and Drop". You can replace this name with whatever you like.
You change this value with TextInteractor::SetCommandNames.
The point of this is to allow for different UI-language localizations, without having to change Led itself.
See also Led_MFC_DragAndDropWindow.
See also TextInteractor::CommandNames.
Note - also - this class must be declared lexically inside the outer template -and not outside - do to compiler bugs with MSVC60(SP4). Didn't take the time to trace them down carefully - LGP 2000-08-19.
Led_MFC_ExceptionHandlerHelper < BASECLASS > [public]
BASECLASS = Led_MFC_Helper < MFC_BASE_CLASS,BASE_INTERACTOR > This helper is designed to manage exception handling, when the Led class is being used in a context (say OCX) where it cannot throw exceptions in error situations.
This class wraps many messages the control is likely to get, and when there is an exception, it calls a virtual exception-handling method (which by default - beeps), and then returns normally.
To use this class, you must also define DoDeclare_Led_MFC_ExceptionHandlerHelper_MessageMap() to declare the actual message map for the template.
| Member Details |
|---|
|
Led_BeepNotify.
|
Led_MFC_Helper < MFC_BASE_CLASS,BASE_INTERACTOR > [public]
MFC_BASE_CLASS = CWnd, Led_Win32_Helper < BASE_INTERACTOR > , BASE_INTERACTOR = TextInteractorThere are two obvious ways to hook into MFC. One is to create a subclass of CWnd. The other is to create a subclass of CView. Because CView inherits from CWnd, but not virtually, you are strongly encouraged to pick one or the other. Alas - neither is really a good choice for ALL applications. For a big, main view, associated with a document, you want to subclass from CView. For a little control (as in a dialog), you want to subclass from CWnd.
This template makes it easier (soon easy, but for now, just easier) to subclass from either one. The default one, and the one Led mainly uses is CView. But soon I'll support (better) subclassing from CWnd.
NB: You must invoke the macro DoDeclare_Led_MFC_Helper_MessageMap(MFC_BASE_CLASS, BASE_INTERACTOR) to generate the code for the message map for this template, unless its already been done so for your particular MFC_BASE_CLASS in Led_MFC.cpp.
| Member Details |
|---|
|
In the future, I may need to consider changing this name. But for now, I can think of none better. I provide two overloads of this routine. The one that returns a Led_Rect returns the Led WindowRect. And the one that takes an LPRECT parameter returns the Win32 SDK WindowRect. |
|
|
Led_MFC_MimicMFCAPIHelper < BASECLASS > [public]
BASECLASS = Led_MFC_Helper < MFC_BASE_CLASS,BASE_INTERACTOR > Mimicry of the MFC CEdit methods - to facilitate using this class in place of any existing CEdit usage. These methods simply do send-message calls just as their CEdit counterparts. Then messages are then trapped in the OnMsgXXX handlers.
NB: Use of this class almost ALWAYS requires also mixing in the template
Led_MFC_OptionalWin32SDKMessageMimicHelper. since that is what (by default) implements
the OnMsgXXX helpers.
NB: You must invoke the macro DoDeclare_Led_MFC_MimicMFCAPIHelper_MessageMap(BASECLASS) somewhere to generate the message map code for this template, unless thats already been done for your particular BASECLASS in Led_MFC.cpp.
Led_MFC_OptionalWin32SDKMessageMimicHelper < BASECLASS > [public]
BASECLASS = Led_MFC_Helper < MFC_BASE_CLASS,BASE_INTERACTOR > Mimicry of the starndard Win32 messages sent to an edit control. We cannot mimic ALL the messages. Some just don't make sense (like GETHANDLE). But for those that do, we do our best.
NB: You must declare DoDeclare_Led_MFC_OptionalWin32SDKMessageMimicHelper_MessageMap (BASECLASS) to get the message map for this class generated, unless this has already been done in Led_MFC.cpp (for your particular BASECLASS).
Led_MFC_TabletFromCDC [public]
Helper class to convert an MFC CDC to a Led_Tablet. Just creates a temporary wrapper.
Caution: You must create a NAMED temporary. A named temporary has lifetime til the end of the enclosing scope. An unnamed temporary has lifetime only til the next sequence point (less or equal to the rest of the current statement - I believe).
Led_MFC_TmpCDCFromTablet [public]
Helper class to convert a Led_Tablet to an MFC CDC. Just creates a temporary wrapper.
Caution: You must create a NAMED temporary. A named temporary has lifetime til the end of the enclosing scope. An unnamed temporary has lifetime only til the next sequence point (less or equal to the rest of the current statement - I believe).
Led_MFC_TmpCmdUpdater [public]
Helper used in WordProcessorCommonCommandHelper
Led_MFC_X [public]
ChosenInteractor, Led_MFCUtility template to mix together Led_MFC an a ChosenInteractor which already has support
for a particular TextImager mixed in.
TextInteractorCommonCommandHelper_MFC < BASECLASS,CMD_INFO,CMD_ENABLER > [public]
BASECLASSSee also WordProcessorCommonCommandHelper, and
WordProcessorCommonCommandHelper_MFC
To use this class, you must also define DoDeclare_TextInteractorCommonCommandHelper_MFC_MessageMap() to declare the actual message map for the template (unless its already done for yours in Led_MFC.cpp).
NB: This template is important because it hooks in the class library/SDK (in this case MFC) command dispatch metchanism into Led's.
qGenerateStandardMFCExceptions [public]
MFC apps generally throw AfxMemoryException () etc for internal exceptions. And there are standard MFC catchers for
these types. To make Led utilize the Led_Set_OutOfMemoryException_Handler etc mechanism to use the MFC exception types -
define this to TRUE. To use more standard Standard C++ or your own types - you may wish to shut this off.
Defaults to ON.
qLedAssertsDefaultToMFCAsserts [public]
By default when using MFC, make the Led asserts fall-thru into the default MFC assertion code. Some customers have indicated they prefer this (spr#0424).
Originally I made this default to TRUE, as the SPR requested. But I personally find the MFC Assert stuff a major pain in the donkey. Whenever you get an assert due to a display bug, it brings up a dialog, and dimissing that alert triggers (due to extra redisplay) extra re-enters into the same code which had the assert doing displays.
Since it was requested, I'll continue to make it easy for others to turn this on. But I leave it off by default.
qSupportDrawTextGetTextExtent [public]
Turn OFF by default (because requires including SimpleTextStore and SimpleTextImager and WordWrappedTextImager
in your projects - which you may not want to do).
See Led_DrawText and Led_GetTextExtent.
CPoint AsCPoint (Led_Point p)
Led_Point to an MFC CPoint.
See also AsLedPoint, AsCRect, AsLedRect.
CRect AsCRect (Led_Rect r)
See also AsCPoint, AsLedPoint, AsLedRect.
CSize AsCSize (Led_Size s)
Led_Point AsLedPoint (CPoint p)
Led_Point.
See also AsCPoint, AsCRect, AsLedRect.
Led_Rect AsLedRect (CRect r)
See also AsCPoint, AsLedPoint, AsCRect.
void Led_DrawText (CDC* cdc, const Led_tString& text, CRect r, bool wordWrap)
Instantiate Led_DrawText
See also @qSupportDrawTextGetTextExtent',
Led_GetTextExtent,
Led_DrawText
Led_DrawText < TRIVIALWORDWRAPPEDTEXTIMAGER,SIMPLETEXTIMAGER,TEXTSTORE > [public]
template < class TRIVIALWORDWRAPPEDTEXTIMAGER, class SIMPLETEXTIMAGER, class TEXTSTORE >
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 Led_GetTextExtent Instantiate Led_GetTextExtent See also @qSupportDrawTextGetTextExtent',
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 ( See also Led_DrawText
CSize Led_GetTextExtent (CDC* cdc, const Led_tString& text, CRect r, bool wordWrap)Led_DrawText,
Led_GetTextExtent
Led_GetTextExtent < TRIVIALWORDWRAPPEDTEXTIMAGER,SIMPLETEXTIMAGER,TEXTSTORE > [public]
template < class TRIVIALWORDWRAPPEDTEXTIMAGER, class SIMPLETEXTIMAGER, class TEXTSTORE > Led_GetTextExtent) which will be enabled/included in
your program if you define qSupportDrawTextGetTextExtent.
Return to Led Page
Return to Led ClassLib Documentation Index
Return to Led Reference Manual Index
Last Updated 2001-10-20