Skip to content

TAcceleratorsResource

Accelerator table resource type

Declaration

Source position: acceleratorsresource.pp line 52

type

  TAcceleratorsResource = class(TAbstractResource)
  protected
    function GetType : TResourceDesc;
    function GetName : TResourceDesc;
    function ChangeDescTypeAllowed : Boolean;
    function ChangeDescValueAllowed : Boolean;
    procedure NotifyResourcesLoaded;
  public
    constructor Create;
    constructor Create(aType: TResourceDesc; aName: TResourceDesc);
    destructor Destroy;
    procedure UpdateRawData;
    procedure Add;
    procedure Clear;
    procedure Delete;
    property Count: Integer; {r}
    property Items[index : Integer]: TAccelerator; {rw}
  end;

Description

This class represents a resource of type RT_ACCELERATOR.

An accelerator table resource is a collection of accelerators (represented by TAccelerator records).

An accelerator represents a keystroke that can be associated with some action.

This resource type is very Microsoft Windows-specific, so it might not be of interest for many users.

Methods are provided to add, delete and modify single accelerators.

Remark:

This class doesn't allow its type to be changed to anything else than RT_ACCELERATOR. Attempts to do so result in a EResourceDescChangeNotAllowedException.

Properties

Member Visibility Description
Count read only public The number of accelerators in the table
Items public Indexed array of accelerators in the table
See all Properties

Methods

Member Visibility Description
Add public Adds a new accelerator to the table
ChangeDescTypeAllowed protected
ChangeDescValueAllowed protected
Clear public Empties the accelerator table
Create public Creates a new accelerator table resource
Delete public Deletes an accelerator from the table
Destroy public
GetName protected
GetType protected
NotifyResourcesLoaded protected
UpdateRawData public
See all Methods