public interface IAnnAutomationControl
@protocol LTIAnnAutomationControl <NSObject>
public interface IAnnAutomationControl
public:
interface class IAnnAutomationControl abstract
class IAnnAutomationControl:
IAnnAutomationControl defines and interface that allows you to easily use any control you choose with LEADTOOLS Annotation Automation.
By default, the automation framework provides support for using a LEADTOOLS ImageViewer control as the surface where the automation is used. The source code for this implementation is in the Leadtools.Annotations.[Platform] example project shipped with your LEADTOOLS setup as described in the table below. <installdir>
is the location of the LEADTOOLS SDK setup on your machine, usually at "C:\LEADTOOLS VersionNumber":
Platform | Project location |
---|---|
Windows Forms GDI+ (System.Drawing) |
C# version at |
WPF (PresentationCore) |
C# version at |
JavaScript (HTML5) |
C:\LEADTOOLS23\Examples\Annotation\JS\DemoLibraries\Annotations.JavaScript |
iOS and macOS |
version at |
Android |
Android version at |
Each of these projects contains one or more implementations of IAnnAutomationControl with the class name ImageViewerAutomationControl
. The projects contain full source code that can be freely used and modified in your application.
To perform automation, the toolkit must interact with the control in different ways. This includes the following tasks:
When the above mode is used, you can use the ImageViewerAutomationControl
that implements IAnnAutomationControl and provides translation between the methods/properties/events of the interface and those of ImageViewer.
To instead use automation on your own custom control, you must create a class that implements IAnnAutomationControl and pass an instance of this class to AnnAutomation(AnnAutomationManager, IAnnAutomationControl) and optionally to attach and detach methods of AnnAutomation if more advanced functionality is required.
The IAnnAutomationControl provides support for automating a single or multiple containers.
In single container mode, the automation object has a single container to automate and all operations (including rendering) are performed on this container which is always the active one.
In multi-container mode, the automation object has multiple containers. Each container can become active at any time (through user interaction by clicking on the container area in the control or through application code). The automation object will inform IAnnAutomationControl when the active container changes so the control can return related information correctly.
Both modes work the same way and the IAnnAutomationControl implementation usually handles both cases in the same manner. The AutomationGetContainersCallback method is called by AnnAutomation to set up a callback that can be used by the control to obtain the collection of the current containers in the automation. AnnAutomation will always set AutomationContainerIndex property with the index of the container before requesting the information. For example, if the automation needs the transformation matrix for the 3rd container (at the 0-based index of 2) in the list, it will first call AutomationContainerIndex with 3 before calling AutomationTransform. The implementer must save the last value of AutomationContainerIndex in a local variable and when the automation requests the information, it must use this value to obtain the transformation matrix. In the example of using a LEADTOOLS ImageViewer with multiple items, this will be the image transformation matrix of the 3rd item in the viewer.
Refer to the example source code for more information and a complete implementation.
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