Implementing Key Interfaces | Methods & Properties Associated With Key Interfaces | Using the Object Model With User Interface (UI) Plugins

User Interface (UI) Plugins Technology

The UI plugins framework consists of a hosting environment and the hosted components discovered and loaded at run-time. A hosted component, or plugin, is a COM object that implements interfaces required by the hosted environment to invoke the object's methods at run-time. Plugins may be implemented in a variety of languages (Visual Basic, Visual C#, C++, etc.) that support COM interfaces. The hosting environment is a GUI or GUI-less application that makes use of the UI plugins framework. A hosting environment is responsible for activation and management of the lifetime of the plugins. In addition, a hosted environment supplies information about itself and its capabilities to the plugins during their initialization.

Implementing Key Interfaces

To create a UI plugin you need to implement a few interfaces from the AgUiPlugins library (AGI.Ui.Plugins namespace). You can implement the AgUiPlugins interface from any technology where it is possible to implement COM interfaces.

The first figure outlines the most significant UI plugin interfaces:

Methods & Properties Associated With Key Interfaces

The figure below outlines the methods an properties associated with the most significant UI plugin interfaces:

Using the Object Model With User Interface (UI) Plugins

User interface (UI) Plugins can access and manipulate the ODTK scenario and objects using the object hierarchy and functional attributes. The ODTK object can be accessed by interrogating the UI Plugin object site.

Imports AGI.Ui.Plugins
Imports AGI.Ui.Core

Dim m_pSite As AGI.Ui.Plugins.IAgUiPluginSite
Dim m_odtk As Object

Public Sub OnStartup(ByVal PluginSite As
AGI.Ui.Plugins.IAgUiPluginSite) Implements
AGI.Ui.Plugins.IAgUiPlugin.OnStartup
m_pSite = PluginSite
m_odtk = m_pSite.Application.Personality
m_odtk.WriteMessage("In UI Plugin OnStartup", "debug")
End Sub

ODTK 6.5