Support for user controls with the LEADTOOLS Annotation Automation.
public interface IAnnAutomationControl
Public Interface IAnnAutomationControl
public interface IAnnAutomationControl
@protocol LTIAnnAutomationControl <NSObject>
public interface IAnnAutomationControl
function Leadtools.Annotations.Core.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 VB version at |
WPF (PresentationCore) |
C# version at |
WinRT (Windows Store apps) |
C# version at JS version at |
JavaScript (HTML5) |
JS version at For a pure JavaScript version, use the compiled code from the TypeScript version in |
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.
Products |
Support |
Feedback: IAnnAutomationControl Interface - Leadtools.Annotations.Core |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.