Automated User Interface for Annotations

 

The annotation example program that ships with LEADTOOLS is implemented using the high-level LAnnotationWindow class automated features. This topic describes how the example program uses the LAnnotationWindow class.

First, the example derives a user-defined class from the LEADTOOLS LAnnotationWindow class. Then, the example assigns the handle of the window created by the MFC framework to the LAnnotationWindow derived class in the CAnnDemoView::OnCreate function. This allows the LEADTOOLS class object to do all of the necessary processing for displaying images and annotations in the MDI child windows. (Note: This example is using the LAnnotationWindow class object as a window, not as a control.)

The demo creates the Annotation Toolbar by using the LAnnotationWindow::GetToolBar function to get a pointer to an LAnnToolbar object. Then, it calls LAnnToolbar::Create to create the toolbar.The example code also handles selecting the appropriate button on the toolbar in response to the menu items.

The pull-down menus in the example program let you control the automation, but the menu items, themselves, are not automated. (Only the pop-up menus, invoked with the right mouse button, are automated.) The pull-down menu options that affect annotations do the following:

Behavior That Is Automated

The toolbar created by the LAnnToolbar::Create function appears as follows:

In design mode, you can select tools from the toolbar and draw them over the image in the window. You can then use the right mouse button to get a pop-up menu that is tailored to each object type.

The pop-up menu appears as shown in the example.

The popup menu is context sensitive. It lists only the properties that can be changed on the selected object or objects. If you use the popup menu to change a property, the value that you specify is applied to the current selection, and it becomes the default for the next object.

The following topics describe the automated annotation features for particular objects and tools:

User Interface for Container and Automation Objects

Selection Pointer Tool

Line Tool

Rectangle Tool

Ellipse Tool

Polyline Tool

Polygon Tool

Pointer Tool

Freehand Line Tool

Highlight Tool

Redaction Tool

Text Tool

Note Tool

Stamp Tool

HotSpot Tool

Button Tool

Audio Clip Tool

Ruler Tool

Video Tool

PushPin Tool

Protractor Tool

Cross product Tool

Freehand HotSpot Tool

Point Tool

Rubber Stamp Tool

Curve Tool

Closed Curve Tool

RTF Tool

PolyRuler Tool

Encrypt Tool

Text Pointer Tool

Help Version 20.0.2018.9.26
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help