Automated User Interface for Annotations

(Document and Medical Imaging toolkits)

The annotation example program that ships with LEADTOOLS is implemented using high-level automated features. This topic describes which parts of the example program are automated and which parts are not.

Behavior That Is Not Automated

When the main window is created, the example program creates the annotation toolbar using the L_AnnCreateToolbar function and initializes a tool-tracking variable by calling the L_AnnGetToolBarChecked function.

When a child window is created, if annotation data is present, the window is set to the container of the child window using L_AnnSetWnd. If annotation data is not present, a container is created for the child window. Next, the user mode is set using L_AnnSetUserMode. An automation object is then created, associated with the container, and activated using L_AnnCreate, L_AnnSetAutoContainer and L_AnnSetActiveState. This allows you to interact with the annotations, and is required to create the automated mode for annotations. Finally, parameters are set to control the translation of annotations added to the container, undo depth, and the hyperlink menu item.

When a child window is closed, the program disables and destroys the annotation objects using the L_AnnSetActiveState and L_AnnDestroy functions.

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 L_AnnCreateToolbar function appears as follows:

Annotation toolbar

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 this 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 21.0.2023.2.15
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.