The bitmap class map macros are provided to assist in connecting the different LEADTOOLS C++ Class Library classes with classes you derive from LBitmap or LBitmapBase. The mapped classes are created "on demand", that is, no class object will be created if you do not request that class object from the bitmap object.
Connecting different LEADTOOLS C++ Class Library classes to the bitmap class object makes it easy to use these classes with the object when programming applications.
Every LEADTOOLS C++ Class Library class you derive from these bitmap classes must declare a class map. This is done through the LEAD_DECLARE_CLASS_MAP() macro in the header file that contains the declaration for the derived class. In the implementation file for that class the user must use the LEAD_START_CLASS_MAP(ClassName,ClassParent) , LEAD_INIT_(ClassName) and LEAD_END_CLASS_MAP(ClassName,ClassParent) macros respectively.
Class maps completely support inheritance. If a mapped class is not found then the mapped class of the parent class will be used. Any inherited classes will use the newly mapped classes or the parent mapped classes if the child does not have a mapped class of the same type. This gives you flexibility in programming your applications while using different class maps for each derived bitmap class.
LDictionary_DisconnectBitmapList
## LEAD_DECLARE_CLASS_MAP()
Use this macro to declare a class map for your derived LEAD bitmap class. This macro will declare different functions that you can use to get the corresponding mapped class object. The functions that this macro declares are:
Class | Function |
---|---|
virtual LDialogBase* | DialogBase(); //for the mapped LDialogBase or derived class |
virtual LDialogImage * | DialogImage(); //for the mapped LDialogImage or derived class |
virtual LDialogFile * | DialogFile(); //for the mapped LDialogFile or derived class |
virtual LDialogImageEffect * | DialogImageEffect(); //for the mapped LDialogImageEffect or derived class |
virtual LDialogColor * | DialogColor(); //for the mapped LDialogColor or derived class |
virtual LDialogDocument * | DialogDocument(); //for the mapped LDialogDocument or derived class |
virtual LDialogWeb * | DialogWeb(); //for the mapped LDialogWeb or derived class |
virtual LDialogEffect * | DialogEffect(); //for the mapped LDialogEffect or derived class |
virtual LMarker* | Marker(); //for the mapped LMarker or derived class |
Virtual LBitmapRgn* | Region(); //for the mapped LBitmapRgn or derived class |
virtual LPaint* | Paint(); //for the mapped LPaint or derived class |
virtual LPaintEffect* | PaintEffect(); //for the mapped LPaintEffect or derived class |
virtual LTwain * | Twain(); //for the mapped LTwain or derived class |
virtual LMemoryFile* | MemoryFile(); //for the mapped LMemoryFile or derived class |
virtual LFile* | File(); //for the mapped LFile or derived class |
virtual LPrint* | Print(); //for the mapped LPrint or derived class |
virtual LScreenCapture* | ScreenCapture(); //for the mapped LScreenCapture or derived class |
virtual LBarCode | BarCode(); //for the mapped LBarCode or derived class. |
Example:
For example in the header file of the LBitmapBase LEAD bitmap declaration this macro is used as follows:
class LBitmapBase: public LBase
{
LEAD_DECLARE_CLASS_MAP();
//.
//.
//.
}
Use this macro to start your class map implementation for your derived LEAD bitmap class object. This is done in the implementation file of your bitmap class.
Example:
For example in the LEADTOOLS C++ Class Library class LBitmapBase implementation, this macro is used as follows:
LEAD_START_CLASS_MAP(LBitmapBase,LBase)
For the user derived bitmap class (LUserBitmap)
LEAD_START_CLASS_MAP(LUserBitmap,LParentBitmapClassName)
LEAD_END_CLASS_MAP(LUserBitmap,LParentBitmapClassName)
Use this macro to end your class map implementation for your derived LEAD bitmap class object. This is done in the implementation file of your bitmap class.
Example:
For example in the LEADTOOLS C++ Class Library class LBitmapBase implementation, this macro is used as follows:
LEAD_START_CLASS_MAP(LBitmapBase,LBase)
LEAD_END_CLASS_MAP(LBitmapBase,LBase)
For the user derived bitmap class (LUserBitmap)
LEAD_START_CLASS_MAP(LUserBitmap,LParentBitmapClassName)
LEAD_END_CLASS_MAP(LUserBitmap,LParentBitmapClassName)
Use these macros in your class map implementation of your derived LEAD bitmap class object to map different classes to your bitmap object. This is done in the implementation file of your bitmap class.
The available LEAD_INIT_xxx macros are:
Macro | Description |
---|---|
LEAD_INIT_LFile() | to map a LFile class |
LEAD_INIT_LTwain() | to map a LTwain class |
LEAD_INIT_LPrint() | to map a LPrint class |
LEAD_INIT_LPaint() | to map a LPaint class |
LEAD_INIT_LDiaolgBase() | to map a LDialogBase class |
LEAD_INIT_LDiaolgImage() | to map a LDialogImage class |
LEAD_INIT_LDiaolgWeb() | to map a LDialogWeb class |
LEAD_INIT_LDiaolgColor() | to map a LDialogColor class |
LEAD_INIT_LDiaolgImageEffect() | to map a LDialogImageEffect class |
LEAD_INIT_LDiaolgDocument() | to map a LDialogDocument class |
LEAD_INIT_LDiaolgEffect() | to map a LDialogEffect class |
LEAD_INIT_LDiaolgFile() | to map a LDialogFile class |
LEAD_INIT_LMarker(LMarker) | to map a LMarker class. |
LEAD_INIT_LDiaolg() | to map a LDialog class |
LEAD_INIT_LBitmapRgn() | to map a LBitmapRgn class |
LEAD_INIT_LMemoryFile() | to map a LMemoryFile class |
LEAD_INIT_LPaintEffect() | to map a LPaintEffect class |
LEAD_INIT_LScreenCapture() | to map a LScreenCapture class |
LEAD_INIT_LBarCode() | to map a LBarCode class |
Example:
For example in the LEADTOOLS C++ Class Library class LBitmapBase implementation, these macros are used as follows:
LEAD_START_CLASS_MAP(LBitmapBase,LBase)
Macro | Description |
---|---|
LEAD_INIT_LFile(LFile) | to map a LFile class to the LBitmapBase class |
LEAD_INIT_LTwain(LTwain) | to map a LTwain class to the LBitmapBase class |
LEAD_INIT_LPrint(LPrint) | to map a LPrint class to the LBitmapBase class |
LEAD_INIT_LPaint(LPaint) | to map a LPaint class to the LBitmapBase class |
LEAD_INIT_LDiaolgBase( LDialogBase) | to map a LDialogBase class to the LBitmapBase class |
LEAD_INIT_LDiaolgImage( LDialogImage) | to map a LDialogImage class to the LBitmapBase class |
LEAD_INIT_LDiaolgEffect ( LDialogEffect) | to map a LDialogEffect class to the LBitmapBase class |
LEAD_INIT_LDiaolgWeb( LDialogWeb) | to map a LDialogWeb class to the LBitmapBase class |
LEAD_INIT_LDiaolgColor( LDialogColor) | to map a LDialogColor class to the LBitmapBase class |
LEAD_INIT_LDiaolgImageEffect( LDialogImageEffect) | to map a LDialogImageEffect class to the LBitmapBase class |
LEAD_INIT_LDiaolgFile( LDialogFile) | to map a LDialogFile class to the LBitmapBase class |
LEAD_INIT_LDiaolgDocument( LDialogDocument) | to map a LDialogDocument class to the LBitmapBase class |
LEAD_INIT_LMarker(LMarker) | to map a LMarker class to the LbitmapBase class |
LEAD_INIT_LBitmapRgn(LBitmapRgn) | to map a LBitmapRgn class to the LBitmapBase class |
LEAD_INIT_LMemoryFile(LMemoryFile) | to map a LMemoryFile class to the LBitmapBase class |
LEAD_INIT_LPaintEffect(LPaintEffect) | to map a LPaintEffect class to the LBitmapBase class |
LEAD_INIT_LScreenCapture(LScreenCapture) | to map a LScreenCapture class to the LBitmapBase class |
LEAD_INIT_LBarCode(LBarCode) | to map a LBarCode class to the LBitmapBase class |
LEAD_END_CLASS_MAP(LBitmapBase,LBase)
For the user derived bitmap class (LUserBitmap)
LEAD_START_CLASS_MAP(LUserBitmap, LBitmapBase)
Macro | Description |
---|---|
LEAD_INIT_LFile(LUserFile) | to map a LUserFile class to the LBitmapBase class |
LEAD_INIT_LPrint(LUserPrint) | to map a LUserPrint class to the LBitmapBase class |
LEAD_END_CLASS_MAP(LUserBitmap,LBitmapBase)
Now executing the following:
LUserBitmap UserBitmap;
Function | Description |
---|---|
UserBitmap.File(); | this returns a pointer to a LFile object |
UserBitmap.Paint(); | this returns a pointer to a LPaint object |
UserBitmap.Print(); | this returns a pointer to a LPrint object |
UserBitmap.Region(); | this returns a pointer to a LBitmapRgn object |
UserBitmap.PaintEffect(); | this returns a pointer to a LPaintEffect object |
UserBitmap.MemoryFile(); | this returns a pointer to a LMemoryFile object |
Use this macro to fire a changing notification for the passed bitmap object before executing the function that will change the bitmap. If the StartChanging notification callback returns an error code then this macro will end the calling function and return with the same error code.
Use this macro to fire a changing notification for the passed bitmap object after executing the function that changed the bitmap. This will notify the bitmap object that the function completed execution.
Use this macro to get the current number of LEADTOOLS C++ Class Library created bitmap objects.
Use this macro to get a pointer to a LEADTOOLS C++ Class Library bitmap object. The returned pointer is of type LBitmapBase *.
Use this macro to disconnect a LEADTOOLS C++ Class Library bitmap object from the specified bitmap list object.
Use this macro to check for a valid LEADTOOLS C++ Class Library bitmap object. This macro takes a pointer to the bitmap object to be verified.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document