2006-04-17 18:41:43 +00:00
|
|
|
{
|
|
|
|
:: Contains the design-time editor for the MenuBar
|
|
|
|
::
|
|
|
|
:: Last changed: $Date$
|
|
|
|
:: Revision: $Rev$
|
|
|
|
:: Author: $Author$
|
|
|
|
}
|
|
|
|
unit X2CLMBEditors;
|
|
|
|
|
|
|
|
interface
|
|
|
|
uses
|
|
|
|
DesignEditors;
|
2007-04-20 13:37:56 +00:00
|
|
|
|
2006-04-17 18:41:43 +00:00
|
|
|
|
|
|
|
type
|
|
|
|
TX2MenuBarComponentEditor = class(TComponentEditor)
|
|
|
|
public
|
|
|
|
procedure Edit(); override;
|
|
|
|
procedure ExecuteVerb(Index: Integer); override;
|
|
|
|
function GetVerb(Index: Integer): string; override;
|
|
|
|
function GetVerbCount(): Integer; override;
|
|
|
|
end;
|
|
|
|
|
2007-04-20 13:37:56 +00:00
|
|
|
|
2006-04-17 18:41:43 +00:00
|
|
|
implementation
|
|
|
|
uses
|
|
|
|
X2CLMenuBar,
|
|
|
|
X2CLMenuBarEditor;
|
|
|
|
|
|
|
|
|
2007-04-20 13:37:56 +00:00
|
|
|
|
2006-04-17 18:41:43 +00:00
|
|
|
{ TX2MenuBarComponentEditor }
|
|
|
|
procedure TX2MenuBarComponentEditor.Edit();
|
|
|
|
begin
|
|
|
|
if Assigned(Component) and (Component is TX2CustomMenuBar) then
|
|
|
|
TfrmMenuBarEditor.Execute(TX2CustomMenuBar(Component), Designer);
|
|
|
|
end;
|
|
|
|
|
2007-04-20 13:37:56 +00:00
|
|
|
|
2006-04-17 18:41:43 +00:00
|
|
|
procedure TX2MenuBarComponentEditor.ExecuteVerb(Index: Integer);
|
|
|
|
begin
|
|
|
|
Edit();
|
|
|
|
end;
|
|
|
|
|
2007-04-20 13:37:56 +00:00
|
|
|
|
2006-04-17 18:41:43 +00:00
|
|
|
function TX2MenuBarComponentEditor.GetVerb(Index: Integer): string;
|
|
|
|
begin
|
|
|
|
Result := 'Edit...';
|
|
|
|
end;
|
|
|
|
|
2007-04-20 13:37:56 +00:00
|
|
|
|
2006-04-17 18:41:43 +00:00
|
|
|
function TX2MenuBarComponentEditor.GetVerbCount(): Integer;
|
|
|
|
begin
|
|
|
|
Result := 1;
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|