New Menu Designer by Howard Page-Clark. Issue #29205.

git-svn-id: trunk@50992 -
This commit is contained in:
juha 2015-12-22 19:17:29 +00:00
parent b61461e71a
commit 5beb73daf3
15 changed files with 8175 additions and 257 deletions

9
.gitattributes vendored
View File

@ -4521,6 +4521,7 @@ designer/framedesigner.pas svneol=native#text/pascal
designer/jitforms.pp svneol=native#text/pascal
designer/menueditorform.lfm svneol=native#text/pascal
designer/menueditorform.pas svneol=native#text/pascal
designer/menushadows.pp svneol=native#text/pascal
designer/noncontroldesigner.pas svneol=native#text/pascal
designer/objinspext.pas svneol=native#text/pascal
designer/scalecompsdlg.lfm svneol=native#text/plain
@ -6305,6 +6306,14 @@ images/designer/Order_back_one.png -text
images/designer/Order_forward_one.png -text
images/designer/Order_move_back.png -text
images/designer/Order_move_front.png -text
images/designer/add_item_above.png -text svneol=unset#image/png
images/designer/add_item_below.png -text svneol=unset#image/png
images/designer/add_item_left.png -text svneol=unset#image/png
images/designer/add_item_right.png -text svneol=unset#image/png
images/designer/add_sep_above.png -text svneol=unset#image/png
images/designer/add_sep_below.png -text svneol=unset#image/png
images/designer/add_submenu_below.png -text svneol=unset#image/png
images/designer/add_submenu_right.png -text svneol=unset#image/png
images/designer/align.png -text
images/designer/anchor_bottom.png -text svneol=unset#image/png
images/designer/anchor_center_horizontal.png -text svneol=unset#image/png

View File

@ -1,89 +1,274 @@
object MainMenuEditorForm: TMainMenuEditorForm
Left = 395
Height = 220
Top = 480
Width = 600
Caption = 'MainMenuEditorForm'
ClientHeight = 220
ClientWidth = 600
object MenuDesigner: TMenuDesigner
Left = 846
Height = 345
Top = 497
Width = 730
Caption = 'MenuDesigner'
ClientHeight = 345
ClientWidth = 730
Constraints.MinHeight = 345
Constraints.MinWidth = 730
FormStyle = fsStayOnTop
OnClose = FormClose
KeyPreview = True
OnCreate = FormCreate
OnDestroy = FormDestroy
Position = poScreenCenter
LCLVersion = '1.1'
object MenuScrollBox: TScrollBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = List_menus
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
ShowHint = True
LCLVersion = '1.4.4.0'
object LeftPanel: TPanel
Left = 0
Height = 220
Height = 345
Top = 0
Width = 382
HorzScrollBar.Page = 378
HorzScrollBar.Tracking = True
VertScrollBar.Page = 216
VertScrollBar.Tracking = True
Align = alClient
ClientHeight = 216
ClientWidth = 378
Width = 204
Align = alLeft
AutoSize = True
ClientHeight = 345
ClientWidth = 204
Constraints.MinHeight = 345
Constraints.MinWidth = 204
TabOrder = 0
object Panel: TPanel
AnchorSideLeft.Control = MenuScrollBox
AnchorSideTop.Control = MenuScrollBox
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 212
Top = 0
Width = 200
BevelOuter = bvNone
TabOrder = 0
end
end
object Panel_MenuList: TPanel
Left = 387
Height = 220
Top = 0
Width = 213
Align = alRight
ClientHeight = 220
ClientWidth = 213
TabOrder = 1
object Label_menus: TLabel
AnchorSideLeft.Control = List_menus
object ButtonsGroupBox: TGroupBox
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = List_menus
Left = 8
Height = 15
Top = 11
Width = 65
Anchors = [akLeft, akBottom]
Caption = 'Label_menus'
ParentColor = False
end
object List_menus: TListBox
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Panel_MenuList
AnchorSideBottom.Side = asrBottom
Left = 8
Height = 181
Top = 32
Width = 194
Anchors = [akTop, akLeft, akRight, akBottom]
Left = 7
Height = 98
Top = 7
Width = 190
Align = alTop
AutoSize = True
BorderSpacing.Around = 6
ItemHeight = 0
OnClick = List_menusClick
Caption = 'ButtonsGroupBox'
ClientHeight = 78
ClientWidth = 186
TabOrder = 0
object MoveItemUpButton: TSpeedButton
AnchorSideLeft.Control = ButtonsGroupBox
AnchorSideTop.Control = ButtonsGroupBox
Left = 6
Height = 30
Top = 6
Width = 30
BorderSpacing.Around = 6
ShowCaption = False
ParentFont = False
end
object MoveItemDownButton: TSpeedButton
AnchorSideLeft.Control = ButtonsGroupBox
AnchorSideTop.Control = MoveItemUpButton
AnchorSideTop.Side = asrBottom
Left = 6
Height = 30
Top = 42
Width = 30
BorderSpacing.Around = 6
ShowCaption = False
ParentFont = False
end
object AddSeparatorAboveButton: TSpeedButton
AnchorSideLeft.Control = MoveItemUpButton
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ButtonsGroupBox
Left = 42
Height = 30
Top = 6
Width = 30
BorderSpacing.Around = 6
ShowCaption = False
ParentFont = False
end
object AddSeparatorBelowButton: TSpeedButton
AnchorSideLeft.Control = MoveItemDownButton
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = AddSeparatorAboveButton
AnchorSideTop.Side = asrBottom
Left = 42
Height = 30
Top = 42
Width = 30
ShowCaption = False
ParentFont = False
end
object DeleteItemButton: TSpeedButton
AnchorSideLeft.Control = AddSeparatorAboveButton
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ButtonsGroupBox
Left = 78
Height = 30
Top = 24
Width = 30
BorderSpacing.Top = 24
ShowCaption = False
ParentFont = False
end
object AddItemAboveButton: TSpeedButton
AnchorSideLeft.Control = DeleteItemButton
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ButtonsGroupBox
Left = 114
Height = 30
Top = 6
Width = 30
BorderSpacing.Around = 6
ShowCaption = False
ParentFont = False
end
object AddItemBelowButton: TSpeedButton
AnchorSideLeft.Control = DeleteItemButton
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = AddItemAboveButton
AnchorSideTop.Side = asrBottom
Left = 114
Height = 30
Top = 42
Width = 30
BorderSpacing.Around = 6
ShowCaption = False
ParentFont = False
end
object AddSubMenuButton: TSpeedButton
AnchorSideLeft.Control = AddItemAboveButton
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ButtonsGroupBox
Left = 150
Height = 30
Top = 24
Width = 30
BorderSpacing.Top = 24
ShowCaption = False
ParentFont = False
end
end
object StatisticsGroupBox: TGroupBox
AnchorSideRight.Side = asrBottom
Left = 7
Height = 137
Top = 111
Width = 190
Align = alTop
AutoSize = True
BorderSpacing.Around = 6
Caption = 'StatisticsGroupBox'
ClientHeight = 117
ClientWidth = 186
Color = clBtnFace
ParentColor = False
TabOrder = 1
object CaptionedItemsCountLabel: TLabel
AnchorSideLeft.Control = StatisticsGroupBox
AnchorSideTop.Control = StatisticsGroupBox
AnchorSideRight.Control = StatisticsGroupBox
AnchorSideRight.Side = asrBottom
Left = 12
Height = 15
Top = 6
Width = 168
Anchors = [akTop, akLeft, akRight]
AutoSize = False
BorderSpacing.Left = 6
BorderSpacing.Around = 6
Caption = 'CaptionedItemsCountLabel'
Color = clBtnFace
ParentColor = False
ParentFont = False
Transparent = False
end
object ShortcutItemsCountLabel: TLabel
AnchorSideLeft.Control = StatisticsGroupBox
AnchorSideTop.Control = CaptionedItemsCountLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = StatisticsGroupBox
AnchorSideRight.Side = asrBottom
Left = 12
Height = 15
Top = 27
Width = 168
Anchors = [akTop, akLeft, akRight]
AutoSize = False
BorderSpacing.Left = 6
BorderSpacing.Around = 6
Caption = 'ShortcutItemsCountLabel'
Color = clBtnFace
ParentColor = False
ParentFont = False
Transparent = False
end
object DeepestNestingLevelLabel: TLabel
AnchorSideLeft.Control = StatisticsGroupBox
AnchorSideTop.Control = ShortcutItemsCountLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = StatisticsGroupBox
AnchorSideRight.Side = asrBottom
Left = 12
Height = 15
Top = 48
Width = 168
Anchors = [akTop, akLeft, akRight]
AutoSize = False
BorderSpacing.Left = 6
BorderSpacing.Around = 6
Caption = 'DeepestNestingLevelLabel'
Color = clBtnFace
ParentColor = False
ParentFont = False
Transparent = False
end
object IconCountLabel: TLabel
AnchorSideLeft.Control = StatisticsGroupBox
AnchorSideTop.Control = DeepestNestingLevelLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = StatisticsGroupBox
AnchorSideRight.Side = asrBottom
Left = 12
Height = 15
Top = 69
Width = 168
Anchors = [akTop, akLeft, akRight]
AutoSize = False
BorderSpacing.Left = 6
BorderSpacing.Around = 6
Caption = 'IconCountLabel'
Color = clBtnFace
ParentColor = False
ParentFont = False
Transparent = False
end
object PopupAssignmentsCountLabel: TLabel
AnchorSideLeft.Control = StatisticsGroupBox
AnchorSideTop.Control = IconCountLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = StatisticsGroupBox
AnchorSideRight.Side = asrBottom
Left = 12
Height = 15
Top = 90
Width = 168
Anchors = [akTop, akLeft, akRight]
AutoSize = False
BorderSpacing.Left = 6
BorderSpacing.Bottom = 6
BorderSpacing.Around = 6
Caption = 'PopupAssignmentsCountLabel'
Color = clBtnFace
ParentColor = False
ParentFont = False
Transparent = False
end
end
object HelpButton: TBitBtn
AnchorSideLeft.Control = LeftPanel
AnchorSideTop.Control = StatisticsGroupBox
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = LeftPanel
AnchorSideBottom.Side = asrBottom
Left = 13
Height = 25
Top = 307
Width = 75
Anchors = [akLeft, akBottom]
BorderSpacing.Around = 12
DefaultCaption = True
Kind = bkHelp
OnClick = HelpButtonClick
TabOrder = 2
end
end
object Splitter_BoxPanel: TSplitter
Left = 382
Height = 220
Top = 0
Width = 5
Align = alRight
ResizeAnchor = akRight
end
end

View File

@ -1,12 +1,4 @@
{
/***************************************************************************
menueditorform.pas
------------------
***************************************************************************/
***************************************************************************
{***************************************************************************
* *
* This source is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -25,9 +17,8 @@
* *
***************************************************************************
Author: Martin Patik
Author: Howard Page-Clark }
}
unit MenuEditorForm;
{$mode objfpc}{$H+}
@ -35,47 +26,91 @@ unit MenuEditorForm;
interface
uses
Classes, SysUtils, TypInfo, LCLProc, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, ExtCtrls, DesignerMenu, Menus, GraphType,
ComponentEditors, LazarusIDEStrConsts, PropEdits;
Buttons, Classes, ComponentEditors, Controls, ExtCtrls, Forms,
Graphics, LazarusIDEStrConsts, LazIDEIntf, LCLintf, LCLProc, Menus,
MenuShadows, PropEdits, StdCtrls, SysUtils;
type
{ TMainMenuEditorForm }
{ TMenuDesigner }
TMainMenuEditorForm = class(TForm)
List_menus: TListBox;
Label_menus: TLabel;
MenuScrollBox: TScrollBox;
Panel: TPanel;
Panel_MenuList:TPanel;
Splitter_BoxPanel:TSplitter;
procedure FormClose(Sender: TObject; var {%H-}CloseAction: TCloseAction);
TMenuDesigner = class(TForm)
AddItemAboveButton: TSpeedButton;
AddItemBelowButton: TSpeedButton;
AddSeparatorAboveButton: TSpeedButton;
AddSeparatorBelowButton: TSpeedButton;
AddSubMenuButton: TSpeedButton;
ButtonsGroupBox: TGroupBox;
CaptionedItemsCountLabel: TLabel;
DeepestNestingLevelLabel: TLabel;
DeleteItemButton: TSpeedButton;
HelpButton: TBitBtn;
IconCountLabel: TLabel;
MoveItemDownButton: TSpeedButton;
MoveItemUpButton: TSpeedButton;
PopupAssignmentsCountLabel: TLabel;
ShortcutItemsCountLabel: TLabel;
LeftPanel:TPanel;
StatisticsGroupBox: TGroupBox;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure List_menusClick(Sender: TObject);
private
FDesignerMainMenu: TDesignerMainMenu;
FMenu: TMenu;
FDesigner: TComponentEditorDesigner;
procedure OnPersistentDeleting(APersistent: TPersistent);
procedure OnPersistentAdded(APersistent: TPersistent; {%H-}Select: boolean);
procedure UpdateListOfMenus;
procedure HelpButtonClick(Sender: TObject);
strict private
FAcceleratorMenuItemsCount: integer;
FCaptionedItemsCount:integer;
FDeepestNestingLevel: integer;
FEditedMenu: TMenu;
FGUIEnabled: boolean;
FIconsCount: integer;
FPopupAssignments: TStringList;
FPopupAssignmentsListBox: TListBox;
FSavedTemplatesCount: integer;
FScroller: TScrollPanel;
FShadowMenu: TShadowMenu;
FShortcutConflictsCount: integer;
FShortcutList: TSCList;
FShortcutMenuItemsCount: integer;
FTemplatesSaved: boolean;
FTotalMenuItemsCount: integer;
FVariableGlyphsInMenuBar: boolean;
function GetItemCounts(out aCaptionedItemCount, aShortcutItemCount,
anIconCount, anAccelCount: integer): integer;
function GetPopupAssignmentCount: integer;
function GetSelectedMenuComponent(const aSelection: TPersistentSelectionList;
out isTMenu: boolean; out selCount: integer): TPersistent;
procedure DisableGUI;
procedure EnableGUI(selectedIsNil: boolean);
procedure InitializeStatisticVars;
procedure LoadFixedButtonGlyphs;
procedure OnDesignerSetSelection(const ASelection: TPersistentSelectionList);
procedure HidePopupAssignmentsInfo;
procedure SetupPopupAssignmentsDisplay;
protected
procedure Activate; override;
public
procedure SetMenu(NewMenu: TMenu);
property DesignerMainMenu: TDesignerMainMenu read FDesignerMainMenu
write FDesignerMainMenu;
procedure LoadVariableButtonGlyphs(isInMenubar: boolean);
procedure SetMenu(aMenu: TMenu; aMenuItem: TMenuItem);
procedure ShowPopupAssignmentsInfo;
procedure UpdateShortcutList(includeAccelerators: boolean=False);
procedure UpdateStatistics;
procedure UpdateTemplatesCount;
property AcceleratorMenuItemsCount: integer read FAcceleratorMenuItemsCount;
property EditedMenu: TMenu read FEditedMenu;
property SavedTemplatesCount: integer read FSavedTemplatesCount;
property Scroller: TScrollPanel read FScroller;
property ShadowMenu: TShadowMenu read FShadowMenu;
property ShortcutConflictsCount: integer read FShortcutConflictsCount;
property ShortcutList: TSCList read FShortcutList;
property ShortcutMenuItemsCount: integer read FShortcutMenuItemsCount;
property TemplatesSaved: boolean read FTemplatesSaved;
property TotalMenuItemsCount: integer read FTotalMenuItemsCount;
property VariableGlyphsInMenuBar: boolean read FVariableGlyphsInMenuBar;
end;
{ TMenuComponentEditor -- The default component editor for TMenu. }
{ TMenuComponentEditor - the default component editor for TMenu }
TMainMenuComponentEditor = class(TComponentEditor)
private
FDesigner: TComponentEditorDesigner;
protected
public
constructor Create(AComponent: TComponent;
ADesigner: TComponentEditorDesigner); override;
procedure Edit; override;
function GetVerbCount: Integer; override;
function GetVerb(Index: Integer): string; override;
@ -83,8 +118,8 @@ type
end;
{ TMenuItemsPropertyEditor
PropertyEditor editor for the TMenu.Items properties. Brings up the menu editor. }
{ TMenuItemsPropertyEditor - property editor for TMenuItem properties.
Invokes the parent menu's component editor }
TMenuItemsPropertyEditor = class(TClassPropertyEditor)
public
@ -92,152 +127,451 @@ type
function GetAttributes: TPropertyAttributes; override;
end;
procedure ShowMenuEditor(aMenu: TMenu);
var
MainMenuEditorForm: TMainMenuEditorForm;
procedure ShowMenuEditor(AMenu: TMenu);
function MenuDesigner: TMenuDesigner;
implementation
{$R *.lfm}
procedure ShowMenuEditor(AMenu: TMenu);
var
MenuDesignerSingleton: TMenuDesigner = nil;
procedure ShowMenuEditor(aMenu: TMenu);
begin
if AMenu=nil then RaiseGDBException('ShowMenuEditor AMenu=nil');
if MainMenuEditorForm=nil then
MainMenuEditorForm:=TMainMenuEditorForm.Create(Application);
MainMenuEditorForm.SetMenu(AMenu);
MainMenuEditorForm.ShowOnTop;
if (aMenu = nil) then
RaiseGDBException(lisMenuEditorShowMenuEditorTMenuParameterIsNil);
MenuDesigner.SetMenu(aMenu, nil);
MenuDesigner.ShowOnTop;
end;
{ TMainMenuEditorForm }
procedure TMainMenuEditorForm.FormCreate(Sender: TObject);
function MenuDesigner: TMenuDesigner; // refer always to a single instance
begin
if (MenuDesignerSingleton = nil) then
MenuDesignerSingleton:=TMenuDesigner.Create(LazarusIDE.OwningComponent);
Result:=MenuDesignerSingleton;
end;
{ TMenuDesigner }
procedure TMenuDesigner.FormCreate(Sender: TObject);
begin
Name:='MenuDesignerWindow';
Caption:=lisMenuEditorMenuEditor;
Panel.Height:=Panel.Parent.Height;
Label_menus.Caption:=lisMenuEditorSelectMenu;
GlobalDesignHook.AddHandlerPersistentDeleting(@OnPersistentDeleting);
GlobalDesignHook.AddHandlerPersistentAdded(@OnPersistentAdded);
ButtonsGroupBox.Caption:=lisMenuEditorMoveSeparateDeleteInsertItems;
FEditedMenu:=nil;
FGUIEnabled:=False;
LoadFixedButtonGlyphs;
LoadVariableButtonGlyphs(True);
KeyPreview:=True;
GlobalDesignHook.AddHandlerSetSelection(@OnDesignerSetSelection);
FShortcutList:=TSCList.Create;
InitializeStatisticVars;
FTemplatesSaved:=SavedTemplatesExist;
SetupPopupAssignmentsDisplay;
end;
procedure TMainMenuEditorForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure TMenuDesigner.FormDestroy(Sender: TObject);
begin
SetMenu(nil);
end;
procedure TMainMenuEditorForm.FormDestroy(Sender: TObject);
begin
if GlobalDesignHook <> nil then
FEditedMenu:=nil;
if (GlobalDesignHook <> nil) then
GlobalDesignHook.RemoveAllHandlersForObject(Self);
if (FShadowMenu <> nil) then begin
FShadowMenu.Parent:=nil;
FShadowMenu.Free;
FShadowMenu:=nil;
end;
FreeAndNil(FShortcutList);
FreeAndNil(FPopupAssignments);
end;
procedure TMainMenuEditorForm.List_menusClick(Sender: TObject);
var
i, j: Integer;
CurComponent: TComponent;
procedure TMenuDesigner.HelpButtonClick(Sender: TObject);
const
helpPath = 'http://wiki.lazarus.freepascal.org/IDE_Window:_menu_editor';
begin
for i := 0 to List_menus.Items.Count - 1 do
if List_menus.Selected[i] then
for j := 0 to FDesigner.Form.ComponentCount - 1 do
begin
CurComponent:=FDesigner.Form.Components[j];
if (List_menus.Items[i] = CurComponent.Name) and (CurComponent is TMenu) then
begin
SetMenu(TMenu(CurComponent));
Exit;
end;
//LazarusHelp.ShowHelpForIDEControl(Self);
OpenURL(helpPath);
end;
procedure TMenuDesigner.OnDesignerSetSelection(const ASelection: TPersistentSelectionList);
var
mnu: TMenu;
mi, tmp: TMenuItem;
selCount: integer;
isTMenu: boolean;
persist: TPersistent;
begin
persist:=GetSelectedMenuComponent(ASelection, isTMenu, selCount);
if (persist <> nil) then
begin
case isTMenu of
True: SetMenu(TMenu(persist), nil);
False:begin
mi:=TMenuItem(persist);
tmp:=mi;
while (tmp.Parent <> nil) do
tmp:=tmp.Parent;
mnu:=tmp.Menu;
if (mnu = nil) then
mnu:=mi.GetParentMenu;
if (mnu = FEditedMenu) and (FShadowMenu <> nil) then
FShadowMenu.SetSelectedMenuItem(mi, True, False)
else if (mnu <> nil) then
SetMenu(mnu, mi);
end;
end;
end
else if (selCount = 1) then // persist = nil, i.e. no menu component selected, maybe this never happens?
SetMenu(nil, nil);
end;
procedure TMainMenuEditorForm.OnPersistentDeleting(APersistent: TPersistent);
procedure TMenuDesigner.ShowPopupAssignmentsInfo;
var
i: Integer;
AComponent: TComponent;
count: integer;
begin
if APersistent is TComponent then
begin
AComponent := TComponent(APersistent);
if FindRootDesigner(AComponent) <> FDesigner then Exit;
i := List_menus.Items.IndexOf(AComponent.Name);
if i >= 0 then List_menus.Items.Delete(i);
if AComponent = FMenu then
SetMenu(nil);
if (FEditedMenu <> nil) and (FEditedMenu is TPopupMenu) then begin
count:=GetPopupAssignmentCount;
PopupAssignmentsCountLabel.Enabled:=True;
if (count > 0) then
PopupAssignmentsCountLabel.BorderSpacing.Bottom:=0
else PopupAssignmentsCountLabel.BorderSpacing.Bottom:=Double_Margin;
if (count= -1) then
PopupAssignmentsCountLabel.Caption:=lisMenuEditorPopupAssignmentsNA
else PopupAssignmentsCountLabel.Caption:=Format(lisMenuEditorPopupAssignmentsD, [count]);
if (count > 0) then begin
FPopupAssignmentsListBox.Items.Assign(FPopupAssignments);
FPopupAssignmentsListBox.Visible:=True;
end
else FPopupAssignmentsListBox.Visible:=False;
end;
end;
procedure TMainMenuEditorForm.OnPersistentAdded(APersistent: TPersistent;
Select: boolean);
procedure TMenuDesigner.HidePopupAssignmentsInfo;
begin
//debugln('TMainMenuEditorForm.OnPersistentAdded ',dbgsName(APersistent));
if APersistent is TMenu then
UpdateListOfMenus;
if (FEditedMenu <> nil) and (FEditedMenu is TMainMenu) then begin
PopupAssignmentsCountLabel.Caption:=lisMenuEditorPopupAssignmentsNA;
PopupAssignmentsCountLabel.Enabled:=False;
FPopupAssignmentsListBox.Visible:=False;
end;
end;
procedure TMainMenuEditorForm.UpdateListOfMenus;
var
i: Integer;
CurComponent: TComponent;
procedure TMenuDesigner.SetupPopupAssignmentsDisplay;
begin
List_menus.Items.BeginUpdate;
List_menus.Items.Clear;
if FDesigner <> nil then
FPopupAssignmentsListBox:=TListBox.Create(Self);
with FPopupAssignmentsListBox do begin
Name:='FPopupAssignmentsListBox';
Color:=clBtnFace;
BorderSpacing.Top:=2;
BorderSpacing.Left:=3*Margin;
BorderSpacing.Right:=Margin;
BorderSpacing.Bottom:=Margin;
Anchors:=[akTop, akLeft, akRight];
AnchorSideLeft.Control:=StatisticsGroupBox;
AnchorSideTop.Control:=PopupAssignmentsCountLabel;
AnchorSideTop.Side:=asrBottom;
AnchorSideRight.Control:=StatisticsGroupBox;
AnchorSideRight.Side:=asrBottom;
ParentFont:=False;
TabStop:=False;
BorderStyle:=bsNone;
ExtendedSelect:=False;
Height:=45;
Parent:=StatisticsGroupBox;
Visible:=False;
end;
end;
function TMenuDesigner.GetItemCounts(out aCaptionedItemCount,
aShortcutItemCount, anIconCount, anAccelCount: integer): integer;
var
i, imgCount: integer;
hasImages: boolean;
sc: TShortCut;
procedure ProcessItems(aMI: TMenuItem);
var
i: integer;
begin
for i := 0 to FDesigner.Form.ComponentCount - 1 do
begin
CurComponent:=FDesigner.Form.Components[i];
//debugln('TMainMenuEditorForm.UpdateListOfMenus A ',dbgsName(CurComponent));
if (CurComponent is TMainMenu) or (CurComponent is TPopupMenu) then
List_menus.Items.Add(CurComponent.Name);
Inc(Result);
if not aMI.IsLine and (aMI.Caption <> '') then begin
Inc(aCaptionedItemCount);
if HasAccelerator(aMI.Caption, sc) then
Inc(anAccelCount);
end;
if (aMI.ShortCut <> 0) or (aMI.ShortCutKey2 <> 0) then
Inc(aShortcutItemCount);
if hasImages and (aMI.ImageIndex > -1) and (aMI.ImageIndex < imgCount) then
Inc(anIconCount)
else if aMI.HasBitmap and not aMI.Bitmap.Empty then
Inc(anIconCount);
for i:=0 to aMI.Count-1 do
ProcessItems(aMI.Items[i]);
end;
List_menus.Items.EndUpdate;
if FMenu <> nil then
for i := 0 to List_menus.Items.Count - 1 do
if (FMenu.Name = List_menus.Items[i]) then
List_menus.Selected[i] := True;
begin
if (FEditedMenu = nil) then
Exit;
aCaptionedItemCount:=0;
aShortcutItemCount:=0;
anIconCount:=0;
imgCount:=0;
anAccelCount:=0;
Result:=0;
hasImages:=(FEditedMenu.Images <> nil) and (FEditedMenu.Images.Count > 0);
if hasImages then
imgCount:=FEditedMenu.Images.Count;
for i:=0 to FEditedMenu.Items.Count-1 do
ProcessItems(FEditedMenu.Items[i]);
end;
procedure TMainMenuEditorForm.SetMenu(NewMenu: TMenu);
function TMenuDesigner.GetSelectedMenuComponent(const aSelection: TPersistentSelectionList;
out isTMenu: boolean; out selCount: integer): TPersistent;
begin
if NewMenu <> FMenu then
begin
FreeAndNil(FDesignerMainMenu);
FMenu := NewMenu;
FDesigner := FindRootDesigner(FMenu) as TComponentEditorDesigner;
UpdateListOfMenus;
if FMenu <> nil then
Result:=nil;
selCount:=aSelection.Count;
if (selCount = 1) then
begin
FDesignerMainMenu := TDesignerMainMenu.CreateWithMenu(Self, FMenu);
with FDesignerMainMenu do
begin
Parent := Self;
ParentCanvas := Canvas;
LoadMainMenu;
SetCoordinates(10, 10, 0, FDesignerMainMenu.Root);
if (aSelection.Items[0] is TMenu) then
begin
isTMenu:=True;
Result:=aSelection.Items[0];
end
else
if (aSelection.Items[0] is TMenuItem) then
begin
isTMenu:=False;
Result:=aSelection.Items[0];
end
end;
end;
function TMenuDesigner.GetPopupAssignmentCount: integer;
var
lookupRoot: TPersistent;
procedure ScanLookupRoot;
var
frm: TCustomForm;
i: integer;
procedure ProcessForPopup(aControl: TControl);
var
wc: TWinControl;
j:integer;
begin
if (aControl.PopupMenu = FEditedMenu) and (aControl.Name <> '') then
FPopupAssignments.Add(aControl.Name);
if (aControl is TWinControl) then begin
wc:=TWinControl(aControl);
for j:=0 to wc.ControlCount-1 do
ProcessForPopup(wc.Controls[j]);
end;
FDesignerMainMenu.Panel := Panel;
FDesignerMainMenu.RealignDesigner;
end
else
Close;
end;
begin
frm:=TCustomForm(lookupRoot);
if (frm.PopupMenu = FEditedMenu) then
FPopupAssignments.Add(frm.Name);
for i:=0 to frm.ControlCount-1 do
ProcessForPopup(frm.Controls[i]);
end;
begin
lookupRoot:=GlobalDesignHook.LookupRoot;
if (FEditedMenu is TMainMenu) or (lookupRoot is TDataModule) then
Exit(-1)
else begin
FreeAndNil(FPopupAssignments);
FPopupAssignments:=TStringList.Create;
ScanLookupRoot;
Result:=FPopupAssignments.Count;
end
end;
procedure TMenuDesigner.Activate;
begin
inherited Activate;
if (FShadowMenu <> nil) and FShadowMenu.AddedSingleInitialItem then begin
GlobalDesignHook.PersistentAdded(FEditedMenu.Items[0], True);
FShadowMenu.AddedSingleInitialItem:=False;
FShadowMenu.SetSelectedMenuItem(FEditedMenu.Items[0], True, False);
end;
end;
procedure TMenuDesigner.LoadVariableButtonGlyphs(isInMenubar: boolean);
begin
case isInMenubar of
True: begin
MoveItemUpButton.LoadGlyphFromResourceName(HINSTANCE,'arrow_left');
MoveItemDownButton.LoadGlyphFromResourceName(HINSTANCE,'arrow_right');
AddItemAboveButton.LoadGlyphFromResourceName(HINSTANCE,'add_item_left');
AddItemBelowButton.LoadGlyphFromResourceName(HINSTANCE,'add_item_right');
AddSubMenuButton.LoadGlyphFromResourceName(HINSTANCE,'add_submenu_below');
end;
False: begin
MoveItemUpButton.LoadGlyphFromResourceName(HINSTANCE,'arrow_up');
MoveItemDownButton.LoadGlyphFromResourceName(HINSTANCE,'arrow_down');
AddItemAboveButton.LoadGlyphFromResourceName(HINSTANCE,'add_item_above');
AddItemBelowButton.LoadGlyphFromResourceName(HINSTANCE,'add_item_below');
AddSubMenuButton.LoadGlyphFromResourceName(HINSTANCE,'add_submenu_right');
end;
end;
FVariableGlyphsInMenuBar:=isInMenubar;
end;
procedure TMenuDesigner.LoadFixedButtonGlyphs;
begin
DeleteItemButton.LoadGlyphFromResourceName(HINSTANCE,'laz_delete');
AddSeparatorAboveButton.LoadGlyphFromResourceName(HINSTANCE,'add_sep_above');
AddSeparatorBelowButton.LoadGlyphFromResourceName(HINSTANCE,'add_sep_below');
HelpButton.Hint:=lisMenuEditorGetHelpToUseThisEditor;
end;
procedure TMenuDesigner.EnableGUI(selectedIsNil: boolean);
var
isPopupMenu: boolean;
begin
if not FGUIEnabled then
begin
StatisticsGroupBox.Font.Style:=[fsBold];
StatisticsGroupBox.Caption:=FEditedMenu.Name;
StatisticsGroupBox.Enabled:=True;
ButtonsGroupBox.Enabled:=not selectedIsNil;
if selectedIsNil then
Caption:=Format(lisMenuEditorEditingSSNoMenuItemSelected,
[TComponent(GlobalDesignHook.LookupRoot).Name, FEditedMenu.Name]);
isPopupMenu:=(FEditedMenu is TPopupMenu);
LoadVariableButtonGlyphs(not isPopupMenu);
if isPopupMenu then
ShowPopupAssignmentsInfo
else HidePopupAssignmentsInfo;
FGUIEnabled:=True;
end;
end;
procedure TMenuDesigner.InitializeStatisticVars;
begin
FShortcutMenuItemsCount:= -1;
FIconsCount:= -1;
FDeepestNestingLevel:= -1;
FCaptionedItemsCount:= -1;
end;
procedure TMenuDesigner.DisableGUI;
begin
if FGUIEnabled then begin
StatisticsGroupBox.Font.Style:=[];
StatisticsGroupBox.Caption:=lisMenuEditorNoMenuSelected;
CaptionedItemsCountLabel.Caption:=lisMenuEditorCaptionedItemsNA;
ShortcutItemsCountLabel.Caption:=lisMenuEditorShortcutItemsNA;
IconCountLabel.Caption:=lisMenuEditorItemsWithIconNA;
DeepestNestingLevelLabel.Caption:=lisMenuEditorDeepestNestedMenuLevelNA;
PopupAssignmentsCountLabel.Caption:=lisMenuEditorPopupAssignmentsNA;
StatisticsGroupBox.Enabled:=False;
ButtonsGroupBox.Enabled:=False;
FPopupAssignmentsListBox.Visible:=False;
FGUIEnabled:=False;
InitializeStatisticVars;
Caption:=lisMenuEditorMenuEditorNoMenuIsSelected;
end;
end;
procedure TMenuDesigner.SetMenu(aMenu: TMenu; aMenuItem: TMenuItem);
var
selection: TMenuItem;
w: integer;
begin
if (aMenu = nil) then begin
DisableGUI;
FreeAndNil(FShadowMenu);
FEditedMenu:=nil;
end
else
begin
if (aMenu = FEditedMenu) and (FShadowMenu <> nil) then
FShadowMenu.SetSelectedMenuItem(aMenuItem, True, False)
else begin
if (aMenu = FEditedMenu) and (FShadowMenu = nil) then begin
if (FEditedMenu.Items.Count > 0) then
selection:=FEditedMenu.Items[0]
else selection:=nil;
end
else if (aMenu <> FEditedMenu) then begin
if (FShadowMenu <> nil) then
FreeAndNil(FShadowMenu);
FEditedMenu:=aMenu;
selection:=aMenuItem;
end;
FGUIEnabled:=False;
EnableGUI(selection = nil);
UpdateStatistics;
FShortcutList.ClearAllLists;
FShortcutList.ScanContainerForShortcutsAndAccelerators;
FShortcutConflictsCount:=FShortcutList.InitialDuplicatesCount;
w:=Width - LeftPanel.Width;
FShadowMenu:=TShadowMenu.CreateWithMenuAndDims(FEditedMenu, selection, w, Height);
FScroller:=TScrollPanel.CreateWithChild(Self, FShadowMenu);
FScroller.Align:=alClient;
FScroller.Parent:=Self;
end;
end;
end;
procedure TMenuDesigner.UpdateStatistics;
var
captions, shortcuts, icons, accels, tmp: integer;
begin
if not SameText(StatisticsGroupBox.Caption, FEditedMenu.Name) then
StatisticsGroupBox.Caption:=FEditedMenu.Name;
FTotalMenuItemsCount:=GetItemCounts(captions, shortcuts, icons, accels);
if (FCaptionedItemsCount <> captions) then begin
FCaptionedItemsCount:=captions;
CaptionedItemsCountLabel.Caption:=
Format(lisMenuEditorCaptionedItemsD, [FCaptionedItemsCount]);
end;
if (FShortcutMenuItemsCount <> shortcuts) then begin
FShortcutMenuItemsCount:=shortcuts;
ShortcutItemsCountLabel.Caption:=
Format(lisMenuEditorShortcutItemsD, [FShortcutMenuItemsCount]);
end;
if (FIconsCount <> icons) then begin
FIconsCount:=icons;
IconCountLabel.Caption:=
Format(lisMenuEditorItemsWithIconD, [FIconsCount]);
end;
if (FAcceleratorMenuItemsCount <> accels) then
FAcceleratorMenuItemsCount:=accels;
tmp:=GetNestingLevelDepth(FEditedMenu);
if (FDeepestNestingLevel <> tmp) then begin
DeepestNestingLevelLabel.Caption:=
Format(lisMenuEditorDeepestNestedMenuLevelD, [tmp]);
FDeepestNestingLevel:=tmp;
end;
StatisticsGroupBox.Invalidate;
end;
procedure TMenuDesigner.UpdateShortcutList(includeAccelerators: boolean);
begin
if includeAccelerators then
FShortcutList.ScanContainerForShortcutsAndAccelerators
else FShortcutList.ScanContainerForShortcutsOnly;
end;
procedure TMenuDesigner.UpdateTemplatesCount;
begin
FTemplatesSaved:=SavedTemplatesExist;
if not FTemplatesSaved then begin
FSavedTemplatesCount:=GetSavedTemplatesCount;
Exit;
end
else FSavedTemplatesCount:=GetSavedTemplatesCount;
end;
{ TMainMenuComponentEditor}
constructor TMainMenuComponentEditor.Create(AComponent: TComponent;
ADesigner: TComponentEditorDesigner);
begin
inherited Create(AComponent, ADesigner);
FDesigner := ADesigner;
end;
procedure TMainMenuComponentEditor.Edit;
begin
ShowMenuEditor(Component as TMenu);
@ -245,36 +579,39 @@ end;
function TMainMenuComponentEditor.GetVerbCount: Integer;
begin
Result := 1;
Result:=1;
end;
function TMainMenuComponentEditor.GetVerb(Index: Integer): string;
begin
case Index of
0: Result := lisMenuEditor;
else Result := '';;
0: Result:=lisMenuEditor;
else Result:='';
end;
end;
procedure TMainMenuComponentEditor.ExecuteVerb(Index: Integer);
begin
case Index of
0: Edit;
end;
if (Index = 0) then
Edit;
end;
{ TMenuItemsPropertyEditor }
procedure TMenuItemsPropertyEditor.Edit;
var
Menu: TMenu;
MenuItem: TMenuItem;
mnu: TMenu;
mnuItem: TMenuItem;
designer: TComponentEditorDesigner;
begin
MenuItem := TMenuItem(GetObjectValue(TMenuItem));
if MenuItem = nil then exit;
Menu := MenuItem.GetParentMenu;
if Menu = nil then exit;
ShowMenuEditor(Menu);
mnuItem:=TMenuItem(GetObjectValue(TMenuItem));
if (mnuItem <> nil) then
begin
mnu:=mnuItem.GetParentMenu;
designer:=FindRootDesigner(mnu) as TComponentEditorDesigner;
if (mnu <> nil) and (designer <> nil) then
ShowMenuEditor(mnu);
end;
end;
function TMenuItemsPropertyEditor.GetAttributes: TPropertyAttributes;
@ -282,17 +619,10 @@ begin
Result := [paDialog, paRevertable, paReadOnly];
end;
//=============================================================================
procedure InitMenuEditorGlobals;
begin
RegisterComponentEditor(TMenu,TMainMenuComponentEditor);
RegisterPropertyEditor(GetPropInfo(TMenu,'Items')^.PropType,
TMenu,'',TMenuItemsPropertyEditor);
end;
initialization
InitMenuEditorGlobals;
RegisterComponentEditor(TMenu, TMainMenuComponentEditor);
RegisterPropertyEditor(TypeInfo(TMenu), TMenu, 'Items', TMenuItemsPropertyEditor);
end.

7199
designer/menushadows.pp Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4662,20 +4662,207 @@ resourcestring
// menu editor
lisMenuEditor = 'Menu Editor ...';
lisMenuEditorMenuEditor = 'Menu Editor';
lisMenuEditorSelectMenu = 'Select Menu:';
lisMenuEditorSelectTemplate = 'Select Template:';
lisMenuEditorTemplatePreview = 'Template Preview';
lisMenuEditorNewTemplateDescription = 'New Template Description ...';
lisMenuEditorInsertNewItemAfter = 'Insert New Item (after)';
lisMenuEditorInsertNewItemBefore = 'Insert New Item (before)';
lisMenuEditorDeleteItem = 'Delete Item';
lisMenuEditorCreateSubMenu = 'Create Submenu';
lisMenuEditorHandleOnClickEvent = 'Handle OnClick Event';
lisMenuEditorMoveUp = 'Move Up (or left)';
lisMenuEditorAcceleratorKeySNeedsChanging = 'Accelerator(&&) key "%s" needs changing ';
lisMenuEditorAComponentWithNameExists = 'A component with the name %s already exists';
lisMenuEditorAddANewItemAboveSelectedItem = 'Add a new item above selected item';
lisMenuEditorAddANewItemAfterSelectedItem = 'Add a new item after selected item';
lisMenuEditorAddANewItemBeforeSelectedItem = 'Add a new item before selected item';
lisMenuEditorAddANewItemBelowSelectedItem = 'Add a new item below selected item';
lisMenuEditorAddAnIconFromTheMenuSImageList = 'Add an icon from the menu''s ImageList';
lisMenuEditorAddAnOnClickEventToSelectedItem = 'Add an OnClick event to selected item';
lisMenuEditorAddASeparatorAfterSelectedItem = 'Add a separator after selected item';
lisMenuEditorAddASeparatorBeforeSelectedItem = 'Add a separator before selected item';
lisMenuEditorAddASubmenuAtTheRightOfSelectedItem = 'Add a submenu at the right of selected item';
lisMenuEditorAddASubmenuBelowSelectedItem = 'Add a submenu below selected item';
lisMenuEditorAddFromTemplate = '&Add from template ...';
lisMenuEditorAddIconFromS = 'Add icon from %s';
lisMenuEditorAddIconFromS2 = 'Add icon from %s ...';
lisMenuEditorAddImagelistIcon = 'Add imagelist &icon';
lisMenuEditorAddImagelistIcon2 = 'Add imagelist icon';
lisMenuEditorAddItemsOneByOne = 'Add items one by one';
lisMenuEditorAddNewItemAbove = '&Add new item above';
lisMenuEditorAddNeWItemAfter = 'Add ne&w item after';
lisMenuEditorAddNewItemBefore = '&Add new item before';
lisMenuEditorAddNeWItemBelow = 'Add ne&w item below';
lisMenuEditorAddOnClickHandler = 'Add &OnClick handler';
lisMenuEditorAddSeparatorBefore = 'Add separator &before';
lisMenuEditorAddSeparatorAfter = 'Add separator &after';
lisMenuEditorAddSubmenuBelow = 'Add &submenu below';
lisMenuEditorAddSubmenuRight = 'Add &submenu right';
lisMenuEditorANewMenuTemplateHasBeenSaved = 'A new '
+'menu template described as "%s" has been saved based on %s, with %d sub items';
lisMenuEditorBasicEditMenuTemplate = '&Edit,Basic edit menu,' +
'&Undo,Ctrl+Z,&Redo,,-,,Select &All,Ctrl+A,C&ut,Ctrl+X,C&opy,Ctrl+C,P&aste,Ctrl+V,' +
'Paste &Special,,-,,F&ind,,R&eplace,,&Go to ...,,';
lisMenuEditorBasicFileMenuTemplate = '&File,Basic file menu,' +
'&New,,&Open ...,,&Save,,Save &As,,-,,&Print,,P&rint Setup ...,,-,,E&xit,,';
lisMenuEditorBasicHelpMenuTemplate = '&Help,Basic help menu,' +
'Help &Contents,F1,Help &Index,,&Online Help,,-,,' +
'&Licence Information,,&Check for Updates,,-,,&About,,';
lisMenuEditorBasicWindowMenuTemplate = '&Window,Basic window menu,' +
'&New Window,,&Tile,,&Cascade,,&Arrange all,,-,,&Hide,,&Show,,';
lisMenuEditorCancelDeletion = 'Cancel deletion';
lisMenuEditorCaption = 'Caption';
lisMenuEditorCaptionCannotBeBlank = 'Caption cannot be blank';
lisMenuEditorCaptionedItemsD = 'Captioned items: %d';
lisMenuEditorCaptionedItemsNA = 'Captioned items: n/a';
lisMenuEditorCaptionShouldNotBeBlank = 'Caption should not be blank';
lisMenuEditorChangeConflictingAcceleratorS = 'Change conflicting accelerator "%s"';
lisMenuEditorChangeImagelistIcon = 'Change imagelist &icon';
lisMenuEditorChangeShortcutCaptionForComponent = 'Change %s for %s';
lisMenuEditorChangeShortcutConflictS = 'Change shortcut conflict "%s"';
lisMenuEditorChangeTheShortCutForS = 'Change the shortCut for %s';
lisMenuEditorChangeTheShortCutKey2ForS = 'Change the shortCutKey2 for %s';
lisMenuEditorCheckMarkAndRadioItemProps = '%s "%s" - Check mark and RadioItem properties';
lisMenuEditorCheckmarkRadioitem = 'Checkmark && &radioitem ...';
lisMenuEditorChooseTemplateToDelete = 'Choose template to delete';
lisMenuEditorChooseTemplateToInsert = 'Choose template to insert';
lisMenuEditorClickANonGreyedItemToEditItsShortcut = 'Click a non-greyed item '
+'to edit its shortcut';
lisMenuEditorClose = '&Close';
lisMenuEditorComponentIsUnexpectedKind = 'Component is unexpected kind';
lisMenuEditorComponentIsUnnamed = 'component is unnamed';
lisMenuEditorConflictResolutionComplete = '<conflict resolution complete>';
lisMenuEditorDDItems = '%d (%d items)';
lisMenuEditorDeepestNestedMenuLevelD = 'Deepest nested menu level: %d';
lisMenuEditorDeepestNestedMenuLevelNA = 'Deepest nested menu level: n/a';
lisMenuEditorDeleteAllSubitems = 'Delete all subitems';
lisMenuEditorDeleteItem = '&Delete item';
lisMenuEditorDeleteMenuTemplate = '&Delete menu template ...';
lisMenuEditorDeletePreviouslySavedMenuTemplate = 'Delete previously saved menu template';
lisMenuEditorDeleteSavedMenuTemplate = 'Delete saved menu template';
lisMenuEditorDeleteSelectedMenuTemplate = 'Delete selected menu template';
lisMenuEditorDeleteTheSelecteditem = 'Delete the selected item';
lisMenuEditorDeleteThisItemAndItsSubitems = 'Delete this item and its subitems?';
lisMenuEditorDeletingItemWithASubmenu = 'Deleting item with a submenu';
lisMenuEditorDeletingThisItemWillDeleteAllSubitemsToo = 'Deleting this item '
+'will delete all subitems too.';
lisMenuEditorDiscoverAndResolveAnyConflictingShortcuts = 'Discover and '
+'resolve any conflicting shortcuts';
lisMenuEditorDisplayAListOfBothShortcutsAndAcceleratorKeys = 'Display a list '
+'of both shortcuts and accelerator keys';
lisMenuEditorDisplayAListOfMenuitemShortcuts = 'Display a list of menuitem shortcuts';
lisMenuEditorDisplayPreviewAsPopupMenu = 'Display preview as &Popup menu';
lisMenuEditorDoYouWantToAddMenuItemsOneByOne = 'Do you want to add menu items one by one,';
lisMenuEditorEditCaption = 'Edit &Caption';
lisMenuEditorEditingCaptionOfS = 'Editing Caption of %s';
lisMenuEditorEditingSForS = 'Editing %s for %s';
lisMenuEditorEditingSdotS = 'To resolve conflict edit %s.%s';
lisMenuEditorEditingSSNoMenuItemSelected = 'Editing %s.%s - no menu item selected';
lisMenuEditorEditingSSNoMenuitemSelected2 = 'Editing %s.%s - no menuitem selected';
lisMenuEditorEditTheSelectedItemSCaption = 'Edit the selected item''s Caption';
lisMenuEditorEnterAMenuDescription = 'Enter a menu &Description:';
lisMenuEditorEnterANewShortCutForS = 'Enter a new ShortCut for %s';
lisMenuEditorEnterANewShortCutKey2ForS = 'Enter a new ShortCutKey2 for %s';
lisMenuEditorExistingSavedTemplates = 'Existing saved templates';
lisMenuEditorFurtherShortcutConflict = 'Further shortcut conflict';
lisMenuEditorGetHelpToUseThisEditor = 'Get help to use this editor';
lisMenuEditorGrabKey = '&Grab key';
lisMenuEditorGroupIndexDropdownShowsAnyExistingGroups = '&GroupIndex ('
+'dropdown shows any existing groups)';
lisMenuEditorGroupIndexMenuItems = 'GroupIndex,MenuItems';
lisMenuEditorInadequateDescription = 'Inadequate Description';
lisMenuEditorInitialMenuPopulation = 'Initial menu population';
lisMenuEditorInsertMenuTemplateInto = 'Insert menu template into ';
lisMenuEditorInsertSelectedMenuTemplate = 'Insert selected menu template';
lisMenuEditorIsNotAssigned = 'is not assigned';
lisMenuEditorItemsWithIconD = 'Items with icon: %d';
lisMenuEditorItemsWithIconNA = 'Items with icon: n/a';
lisMenuEditorListShortcutsAndAccelerators = 'List shortcuts and &accelerators for %s ...';
lisMenuEditorListShortcutsForS = 'List shortcuts for %s ...';
lisMenuEditorManageCheckMarksAndRadiogroups = 'Manage check marks and radiogroups';
lisMenuEditorMenuEditorNoMenuIsSelected = 'Menu Editor - no menu is selected';
lisMenuEditorMenuitemShortcutConflictsIn = 'Menuitem shortcut conflicts in ';
lisMenuEditorMoveDown = 'Move Down (or right)';
lisMenuEditorInsertFromTemplate = 'Insert From Template ...';
lisMenuEditorSaveAsTemplate = 'Save As Template ...';
lisMenuEditorDeleteFromTemplate = 'Delete From Template ...';
lisMenuEditorMoVeItemDown = 'Mo&ve item down';
lisMenuEditorMoveItemLeft = '&Move item left';
lisMenuEditorMoVeItemRight = 'Mo&ve item right';
lisMenuEditorMoveItemUp = '&Move item up';
lisMenuEditorMoveSelectedItemDown = 'Move selected item down';
lisMenuEditorMoveSelectedItemToTheLeft = 'Move selected item to the left';
lisMenuEditorMoveSelectedItemToTheRight = 'Move selected item to the right';
lisMenuEditorMoveSelectedItemUp = 'Move selected item up';
lisMenuEditorMoveSeparateDeleteInsertItems = 'Move Divide Delete Add items';
lisMenuEditorMoveUp = 'Move Up (or left)';
lisMenuEditorNoMenuSelected = '(no menu selected)';
lisMenuEditorNone = '<none>';
lisMenuEditorNoneNone = '<none>,<none>';
lisMenuEditorNoShortcutConflictsFound = '<no shortcut conflicts found>';
lisMenuEditorNoShortcutConflictsRemain = '<no shortcut conflicts remain>';
lisMenuEditorNoShortcutConflictsToResolve = '<no shortcut conflicts to resolve>';
lisMenuEditorNoteGroupIndexDHasOnlyOneRadioItemItIsNotYetAGroup = ' Note: '
+'GroupIndex %d has only one RadioItem (it is not yet a group)';
lisMenuEditorNoUserSavedTemplates = 'No user-saved templates';
lisMenuEditorNumberOfDropdownItemsForEachMenubarItem = 'Number of dropdown '
+'items for each menubar item';
lisMenuEditorNumberOfInitialMenubarItems = 'Number of initial menubar items';
lisMenuEditorNumberOfInitialPopupMenuItems = 'Number of initial popup menu items';
lisMenuEditorOnlyStandardDefaultTemplatesAreAvailable = 'Only standard '
+'default templates are available.';
lisMenuEditorOrClickHeaderToSortByThatColumn = ' or click header to sort by that column';
lisMenuEditorOrStartWithASkeletonMenuOfSeveralItems = 'Or start with a '
+'skeleton menu of several items?';
lisMenuEditorPickAnIconFromS = 'Pick an icon from %s';
lisMenuEditorPopupAssignmentsD = 'Popup assignments: %d';
lisMenuEditorPopupAssignmentsNA = 'Popup assignments n/a';
lisMenuEditorRemainingConflicts0 = 'Remaining conflicts: 0';
lisMenuEditorRemainingConflictsD = 'Remaining conflicts: %d';
lisMenuEditorRemoveAllSeparators = '&Remove all separators';
lisMenuEditorRemoveEverySeparatorinThisSubmenu = 'Remove every separator in this submenu';
lisMenuEditorResolvedConflicts0 = 'Resolved conflicts: 0';
lisMenuEditorResolvedConflictsD = 'Resolved conflicts: %d';
lisMenuEditorResolveSelectedConflict = 'Resolve selected conflict';
lisMenuEditorResolveShortcutConflicts = '&Resolve shortcut conflicts ...';
lisMenuEditorSavedTemplates = 'Saved templates';
lisMenuEditorSaveMenuAsATemplate = '&Save menu as a template ...';
lisMenuEditorSaveMenuAsTemplate = 'Save menu as template';
lisMenuEditorSaveMenuAsTemplateForFutureUse = 'Save menu as template for future use';
lisMenuEditorSaveMenuShownAsANewTemplate = 'Save menu shown as a new template';
lisMenuEditorEditCheckmarkProps = 'Edit Check mark and RadioItem properties';
lisMenuEditorSaveThisMenuLayoutForFutureReuse = 'Save this menu layout for future reuse';
lisMenuEditorSConflictsWithS = '%s conflicts with %s';
lisMenuEditorSeParators = 'Se&parators';
lisMenuEditorShortcutConflictsFoundInitiallyD = 'Shortcut conflicts found initially: %d';
lisMenuEditorShortcutItemsD = 'Shortcut items: %d';
lisMenuEditorShortcutItemsNA = 'Shortcut items: n/a';
lisMenuEditorShortcutNotYetChanged = 'Shortcut not yet changed';
lisMenuEditorShortcutPropertyWithShortcut = 'Shortcut,Property with shortcut';
lisMenuEditorShortcutPropertyWithShortcutAccelerator = 'Shortcut,Property '
+'with shortcut/accelerator';
lisMenuEditorShortcuts = 'Shortcuts';
lisMenuEditorShortcUts2 = 'Shortc&uts';
lisMenuEditorShortcutsAndAcceleratorKeys = 'Shortcuts and Accelerator keys';
lisMenuEditorShortcutsAssociatedWithMenusAndActionsD = 'Shortcuts associated '
+'with Menus and Actions (%d)';
lisMenuEditorShortcutsDAndAcceleratorKeysD = 'Shortcuts (%d) and Accelerator keys (%d)';
lisMenuEditorShortcutsUsedInS = 'Shortcuts used in %s';
lisMenuEditorShowMenuEditorTMenuParameterIsNil = 'ShowMenuEditor: TMenu parameter is nil';
lisMenuEditorSInS = '"%s" in %s';
lisMenuEditorSIsAlreadyInUse = '"%s" is '
+'already in use in %s as a shortcut.%sTry a different shortcut.';
lisMenuEditorSIsNotASufficientDescriptionPleaseExpand = 'Please expand: "%s" is not a '
+'sufficient Description';
lisMenuEditorSomeWidgetsetsDoNotAllowSeparatorsInTheMainMenubar = 'Some '
+'widgetsets do not allow separators in the main menubar';
lisMenuEditorSShortcuts = '%s: Shortcuts';
lisMenuEditorSShortcutsAcceleratorKeys = '%s: Shortcuts & accelerator keys';
lisMenuEditorSShortcutsAndAcceleratorKeys = '%s: Shortcuts and accelerator keys';
lisMenuEditorSShortcutSummary = '%s: Shortcut summary';
lisMenuEditorSSSOnClickS = '%s.%s.%s - OnClick: %s';
lisMenuEditorStandardTemplates = 'Standard templates';
lisMenuEditorStartingToCreateAMenu = 'Starting to create a menu';
lisMenuEditorStartWithSeveralItems = 'Start with several items';
lisMenuEditorTemplateDescription = 'Template description:';
lisMenuEditorTemplates = '&Templates';
lisMenuEditorTemplateSaved = 'Template saved';
lisMenuEditorThereAreNoUserSavedMenuTemplates = 'There are no user-saved menu templates.';
lisMenuEditorTSCListGetScanListCompNameInvalidIndexDForFScanLis = 'TSCList.'
+'GetScanListCompName: invalid index %d for FScanList';
lisMenuEditorUseAMenuTemplateToConstructMenuItemsHere = 'Use a menu template '
+'to construct menu items here';
lisMenuEditorYouHaveToChangeTheShortcutFromSStoAvoidAConflict = 'You have to'
+' change the shortcut from %s%sto avoid a conflict';
lisMenuEditorYouMustEnterTextForTheCaption = 'You must enter text for the Caption';
// Standard File menu
lisMenuTemplateDescriptionStandardFileMenu = 'Standard File Menu';

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

View File

@ -173,6 +173,14 @@ codeexplorer/ce_cycleinterface.png
codeexplorer/ce_cycleimplementation.png
codeexplorer/show_source.png
codeexplorer/show_category.png
designer/add_item_above.png
designer/add_item_below.png
designer/add_item_left.png
designer/add_item_right.png
designer/add_sep_above.png
designer/add_sep_below.png
designer/add_submenu_right.png
designer/add_submenu_below.png
designer/anchor_bottom.png
designer/anchor_center_horizontal.png
designer/anchor_center_vertical.png