unit ActnPopup;

interface

uses Classes, Controls, Menus, ActnMenus, XPActnCtrls, ActnMan, ActnList;

type

{ TCustomActionPopupMenuEx }

  TPopupActionBar = class;

  TCustomActionPopupMenuEx = class(TXPStylePopupMenu)
  protected
    procedure DoPopup(Item: TCustomActionControl); override;
    function GetPopupClass: TCustomPopupClass; override;
    procedure ExecAction(Action: TContainedAction); override;
  public
    procedure LoadMenu(Clients: TActionClients; AMenu: TMenuItem);
  end;

{ TPopupActionBar }

  TPopupActionBar = class(TPopupMenu)
  public
    constructor Create(AOwner: TComponent); override;
    procedure Popup(X: Integer; Y: Integer); override;
    property MenuActive: Boolean;
  published
    property PopupMenu: TCustomActionPopupMenuEx;
  end;

function NewPopupMenu(Owner: TComponent; const AName: string;
  Alignment: TPopupAlignment; AutoPopup: Boolean; const Items: array of TMenuItem): TPopupMenu;

implementation
