IHYHost

Overview

The IHYHost interface is implemented by the host side THYModuleManager component. The plugin uses the IHYHost interface for access to the host, such as calling the SendMessage method for callbacks into the host.

In order to create menu items and toolbars, the host uses MenuController and ToolbarController components. Since also the plugins might need to access such controllers, I extended IHYHost so that the plugins have a way to access the controllers.

Location

  • Unit: uHYIntf.pas
  • Ancestry: IHYHost

Implemented in

 

Form

Gets reference to a host parent form.

property Form: TForm read write

HostParameters

Gets or sets reference to the list of host parameters.

property HostParameters: TStrings read write

InstanceCount

Gets the number of plugin instances created by the host.

property InstanceCount: integer read write

Instances

Gets reference to an instance of a plugin created by the host with specified index.

property Instances[Index: integer]: IHYPlugin read write

MenuController

Gets reference to the menu controller associated with the host.

property MenuController: IHYMenuController read write

SendMessage  deprecated

Used by a plugins to send message to the host. Deprecated.

procedure SendMessage(const Sender: IHYPlugin; aMessageID: integer; const aMessageData: pointer)

Parameters:

  • Sender: Reference to an instance of a plugin that sends message.
  • aMessageID: Custom message identifier.
  • aMessageData: Pointer to the custom message data.

ToolbarController

Gets reference to the toolbar controller associated with the host.

property ToolbarController: IHYToolbarController read write

 

Form

Gets reference to a host parent form.

property Form: TForm read write

HostParameters

Gets or sets reference to the list of host parameters.

property HostParameters: TStrings read write

InstanceCount

Gets the number of plugin instances created by the host.

property InstanceCount: integer read write

Instances

Gets reference to an instance of a plugin created by the host with specified index.

property Instances[Index: integer]: IHYPlugin read write

MenuController

Gets reference to the menu controller associated with the host.

property MenuController: IHYMenuController read write

ToolbarController

Gets reference to the toolbar controller associated with the host.

property ToolbarController: IHYToolbarController read write

 

SendMessage  deprecated

Used by a plugins to send message to the host. Deprecated.

procedure SendMessage(const Sender: IHYPlugin; aMessageID: integer; const aMessageData: pointer)

Parameters:

  • Sender: Reference to an instance of a plugin that sends message.
  • aMessageID: Custom message identifier.
  • aMessageData: Pointer to the custom message data.