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.
To create a UI plugin you need to implement a few interfaces
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:
The figure below outlines the methods an properties associated with the most significant UI plugin interfaces:
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.
Dim m_pSite As AGI.Ui.Plugins.IAgUiPluginSite
Dim m_odtk As Object
Public Sub OnStartup(ByVal PluginSite As
m_pSite = PluginSiteEnd Sub
m_odtk = m_pSite.Application.Personality
m_odtk.WriteMessage("In UI Plugin OnStartup", "debug")