THYBaseToolbarItem

Overview

The THYBaseToolbarItem is a base class for toolbar items in the Hydra framework. This class implements the IHYVCLToolbarItem and provides basic functionality for toolbar item manipulation.

You will not deal with this class directly; for toolbar item manipulation you can use the IHYVCLToolbarItem.

Note: For mor information on menu and toolbar usage in the Hydra framework, please refer to this article. Please also look at the Actions sample shipped with Hydra to see menu and toolbar merging in action.

Location


 

constructor Create (TObject, THYBaseController)  reintroduce virtual    (declared in THYControl)

Creates a new instance of the class.

constructor Create(anObject: TObject; aController: THYBaseController)

Parameters:

  • anObject: Object that is wrapped by this class, if anObject is nil, an EHYException is raised.
  • aController: References to a controller that is used to manage this control.

constructor Create (TObject, THYBaseToolbarController)  reintroduce virtual

Creates a new instance of the class.

constructor Create(anObject: TObject; aController: THYBaseToolbarController)

Parameters:

  • anObject: Object that is wrapped by this class, if anObject is nil, an EHYException is raised.
  • aController: References to a controller that is used to manage this control.

constructor Create (TObject, Boolean)  reintroduce virtual    (declared in THYObjectReference)

Creates a new instance of the class.

constructor Create(anObject: TObject; OwnsObject: Boolean)

Parameters:

  • anObject: Object that is wrapped by this class, if anObject is nil, an EHYException is raised.
  • OwnsObject: If set to true, the referenced object will be freed when this class is destroyed.

Controller    (declared in THYControl)

References to a controller that is used to manage this control.

property Controller: THYBaseController read

Controller

Holds a reference to the toolbar controller class.

property Controller: THYBaseToolbarController read

DestroyObject  protected    (declared in THYObjectReference)

Destroys the referenced object.

procedure DestroyObject

DoGetIndex  protected virtual abstract    (declared in THYControl)

Returns an item index from the underlying control.

function DoGetIndex: Integer

GetAction  protected dynamic    (declared in THYControl)

Gets an action associated with underlying control.

function GetAction: TBasicAction

GetCaption  protected dynamic    (declared in THYControl)

Gets caption of the underlying control.

function GetCaption: string

GetIndex  protected dynamic    (declared in THYControl)

Gets an item index from the underlying control.

function GetIndex: Integer

GetProperty  protected    (declared in THYObjectReference)

Retrieves the value of the published property of the referenced object.

function GetProperty(const aName: string): variant

Parameters:

  • aName: Name of the property.

GetRefObject  protected    (declared in THYObjectReference)

Gets referenced object.

function GetRefObject: TObject

SetAction  protected dynamic    (declared in THYControl)

Sets an action associated with underlying control.

procedure SetAction(Value: TBasicAction)

Parameters:

  • Value: Reference to an action.

SetCaption  protected dynamic    (declared in THYControl)

Sets caption of the underlying control.

procedure SetCaption(const Value: string)

Parameters:

  • Value: New value of the caption.

SetProperty  protected    (declared in THYObjectReference)

Sets the value of the published property of the referenced object.

procedure SetProperty(const aName: string; const aPropertyValue: variant)

Parameters:

  • aName: Name of the property.
  • aPropertyValue: Value of the property.

 

Controller    (declared in THYControl)

References to a controller that is used to manage this control.

property Controller: THYBaseController read

Controller

Holds a reference to the toolbar controller class.

property Controller: THYBaseToolbarController read

 

constructor Create (TObject, THYBaseController)  reintroduce virtual    (declared in THYControl)

Creates a new instance of the class.

constructor Create(anObject: TObject; aController: THYBaseController)

Parameters:

  • anObject: Object that is wrapped by this class, if anObject is nil, an EHYException is raised.
  • aController: References to a controller that is used to manage this control.

constructor Create (TObject, THYBaseToolbarController)  reintroduce virtual

Creates a new instance of the class.

constructor Create(anObject: TObject; aController: THYBaseToolbarController)

Parameters:

  • anObject: Object that is wrapped by this class, if anObject is nil, an EHYException is raised.
  • aController: References to a controller that is used to manage this control.

constructor Create (TObject, Boolean)  reintroduce virtual    (declared in THYObjectReference)

Creates a new instance of the class.

constructor Create(anObject: TObject; OwnsObject: Boolean)

Parameters:

  • anObject: Object that is wrapped by this class, if anObject is nil, an EHYException is raised.
  • OwnsObject: If set to true, the referenced object will be freed when this class is destroyed.

DestroyObject  protected    (declared in THYObjectReference)

Destroys the referenced object.

procedure DestroyObject

DoGetIndex  protected virtual abstract    (declared in THYControl)

Returns an item index from the underlying control.

function DoGetIndex: Integer

GetAction  protected dynamic    (declared in THYControl)

Gets an action associated with underlying control.

function GetAction: TBasicAction

GetCaption  protected dynamic    (declared in THYControl)

Gets caption of the underlying control.

function GetCaption: string

GetIndex  protected dynamic    (declared in THYControl)

Gets an item index from the underlying control.

function GetIndex: Integer

GetProperty  protected    (declared in THYObjectReference)

Retrieves the value of the published property of the referenced object.

function GetProperty(const aName: string): variant

Parameters:

  • aName: Name of the property.

GetRefObject  protected    (declared in THYObjectReference)

Gets referenced object.

function GetRefObject: TObject

SetAction  protected dynamic    (declared in THYControl)

Sets an action associated with underlying control.

procedure SetAction(Value: TBasicAction)

Parameters:

  • Value: Reference to an action.

SetCaption  protected dynamic    (declared in THYControl)

Sets caption of the underlying control.

procedure SetCaption(const Value: string)

Parameters:

  • Value: New value of the caption.

SetProperty  protected    (declared in THYObjectReference)

Sets the value of the published property of the referenced object.

procedure SetProperty(const aName: string; const aPropertyValue: variant)

Parameters:

  • aName: Name of the property.
  • aPropertyValue: Value of the property.