Error processing SSI file
(Leadtools.Annotations.Core)

Show in webframe

IAnnAutomationControl Interface






Members 
Support for user controls with the LEADTOOLS Annotation Automation.
Object Model
Syntax
public interface IAnnAutomationControl 
'Declaration
 
Public Interface IAnnAutomationControl 
public interface IAnnAutomationControl 
@protocol LTIAnnAutomationControl < NSObject >
public interface IAnnAutomationControl
function Leadtools.Annotations.Core.IAnnAutomationControl() 
Remarks

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 Leadtools.Controls.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. LEADTOOLS_INSTALLATION_DIR 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 "LEADTOOLS_INSTALLATION_DIR"\Examples\DotNet\CS\Leadtools.Annotations.Winforms

Visual Basic version at "LEADTOOLS_INSTALLATION_DIR"\Examples\DotNet\VB\Leadtools.Annotations.Winforms

WPF (PresentationCore)

C# version at "LEADTOOLS_INSTALLATION_DIR"\Examples\DotNet3\CS\Leadtools.Annotations.Wpf

Visual Basic version at "LEADTOOLS_INSTALLATION_DIR"\Examples\DotNet3\VB\Leadtools.Annotations.Wpf

WinRT (Windows Store apps)

C# version at "LEADTOOLS_INSTALLATION_DIR"\Examples\WinRT\CS\Leadtools.Annotations.WinRT

Visual Basic version at "LEADTOOLS_INSTALLATION_DIR"\Examples\WinRT\VB\Leadtools.Annotations.WinRT

JavaScript (HTML5)

TypeScript version at "LEADTOOLS_INSTALLATION_DIR"\Examples\JS\Leadtools.Annotations.JavaScript

For a pure JavaScript version, use the compiled code from the TypeScript version in "LEADTOOLS_INSTALLATION_DIR"\Examples\JS\Common\Leadtools.Annotations.JavaScript.js

iOS and OSX

The implementation is inside the main annotations demo project at "LEADTOOLS_INSTALLATION_DIR"/Examples/[iOS\OSX]/AnnotationsDemo

Android

The implementation is inside the main annotations demo project at "LEADTOOLS_INSTALLATION_DIR"/Examples/AnnotationsDemo

Each of these projects contain one or more implementation 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, for example, obtain information about the control size and resolution, subscribe to the various touch/mouse and keyboard events for user-interface integration, invalidate all or portions of the control surface for re-painting to draw the annotation objects and translate values between annotation and client coordinates.

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 Leadtools.Controls.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.

IAnnAutomationControl provides support for automating a single and multiple containers.

In single container mode, the autmation 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 and each one of them 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 the related information correctly.

Both mode work the same way and the IAnnAutomationControl implementation usually handles both cases in the same manner. The AutomationGetContainersCallback method is called by AnnAutomation to setup 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 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 Leadtools.Controls.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.

Requirements

Target Platforms

See Also

Reference

IAnnAutomationControl Members
Leadtools.Annotations.Core Namespace

Error processing SSI file
   Leadtools.Annotations.Core requires a Document or Medical toolkit license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features