mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 14:40:24 +02:00
IDE: Improve the IDE Coolbar. Issue #27603, patch from Balázs Székely.
git-svn-id: trunk@48526 -
This commit is contained in:
parent
5ea64c5142
commit
21e4c4019c
@ -8,63 +8,61 @@ object ToolbarOptionsFrame: TToolbarOptionsFrame
|
||||
TabOrder = 0
|
||||
DesignLeft = 798
|
||||
DesignTop = 305
|
||||
object pnTop: TPanel
|
||||
object pnBottom: TPanel
|
||||
Left = 0
|
||||
Height = 218
|
||||
Top = 25
|
||||
Height = 221
|
||||
Top = 230
|
||||
Width = 520
|
||||
Align = alTop
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 218
|
||||
ClientHeight = 221
|
||||
ClientWidth = 520
|
||||
Constraints.MinHeight = 115
|
||||
TabOrder = 0
|
||||
TabOrder = 1
|
||||
object pnButtons: TPanel
|
||||
Left = 0
|
||||
Height = 40
|
||||
Top = 178
|
||||
Top = 181
|
||||
Width = 520
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 40
|
||||
ClientWidth = 520
|
||||
Constraints.MinHeight = 35
|
||||
TabOrder = 0
|
||||
TabOrder = 1
|
||||
object bAdd: TBitBtn
|
||||
Left = 247
|
||||
Left = 15
|
||||
Height = 24
|
||||
Top = 0
|
||||
Width = 85
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Add'
|
||||
OnClick = bAddClick
|
||||
TabOrder = 0
|
||||
end
|
||||
object bDelete: TBitBtn
|
||||
Left = 421
|
||||
Left = 189
|
||||
Height = 24
|
||||
Top = 0
|
||||
Width = 85
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Delete'
|
||||
OnClick = bDeleteClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object bConfig: TBitBtn
|
||||
Left = 334
|
||||
Height = 24
|
||||
Top = 0
|
||||
Width = 85
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Config'
|
||||
OnClick = bConfigClick
|
||||
TabOrder = 2
|
||||
end
|
||||
object bDefaultToolbar: TBitBtn
|
||||
Left = 8
|
||||
object bConfig: TBitBtn
|
||||
Left = 102
|
||||
Height = 24
|
||||
Top = 0
|
||||
Width = 85
|
||||
Caption = 'Config'
|
||||
OnClick = bConfigClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object bDefaultToolbar: TBitBtn
|
||||
Left = 377
|
||||
Height = 24
|
||||
Top = 0
|
||||
Width = 127
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Default'
|
||||
OnClick = bDefaultToolbarClick
|
||||
TabOrder = 3
|
||||
@ -72,17 +70,17 @@ object ToolbarOptionsFrame: TToolbarOptionsFrame
|
||||
end
|
||||
object sbCoolBar: TScrollBox
|
||||
Left = 0
|
||||
Height = 178
|
||||
Height = 158
|
||||
Top = 0
|
||||
Width = 520
|
||||
HorzScrollBar.Page = 75
|
||||
VertScrollBar.Page = 25
|
||||
Align = alClient
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderStyle = bsNone
|
||||
ClientHeight = 178
|
||||
ClientHeight = 158
|
||||
ClientWidth = 520
|
||||
Constraints.MinHeight = 75
|
||||
TabOrder = 1
|
||||
TabOrder = 0
|
||||
object Coolbar: TCoolBar
|
||||
Left = 0
|
||||
Height = 25
|
||||
@ -102,33 +100,23 @@ object ToolbarOptionsFrame: TToolbarOptionsFrame
|
||||
ShowText = False
|
||||
OnMouseDown = CoolbarMouseDown
|
||||
OnResize = CoolbarResize
|
||||
OnStartDrag = CoolbarStartDrag
|
||||
end
|
||||
end
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Cursor = crVSplit
|
||||
Left = 0
|
||||
Height = 5
|
||||
Top = 243
|
||||
Width = 520
|
||||
Align = alTop
|
||||
MinSize = 50
|
||||
ResizeAnchor = akTop
|
||||
end
|
||||
object pnBottom: TPanel
|
||||
object pnTop: TPanel
|
||||
Left = 0
|
||||
Height = 203
|
||||
Top = 248
|
||||
Top = 0
|
||||
Width = 520
|
||||
Align = alClient
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 203
|
||||
ClientWidth = 520
|
||||
TabOrder = 2
|
||||
Constraints.MinWidth = 350
|
||||
TabOrder = 0
|
||||
object dbGeneralSettings: TDividerBevel
|
||||
Left = 0
|
||||
Height = 15
|
||||
Height = 17
|
||||
Top = 5
|
||||
Width = 520
|
||||
Caption = 'General Toolbars Settings'
|
||||
@ -145,14 +133,14 @@ object ToolbarOptionsFrame: TToolbarOptionsFrame
|
||||
Top = 64
|
||||
Width = 188
|
||||
Caption = 'Grab Style'
|
||||
ClientHeight = 69
|
||||
ClientHeight = 68
|
||||
ClientWidth = 184
|
||||
TabOrder = 0
|
||||
TabOrder = 1
|
||||
object lbGrabWidth: TLabel
|
||||
Left = 12
|
||||
Height = 15
|
||||
Height = 17
|
||||
Top = 43
|
||||
Width = 63
|
||||
Width = 69
|
||||
Caption = 'Grab Width:'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -161,12 +149,12 @@ object ToolbarOptionsFrame: TToolbarOptionsFrame
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 118
|
||||
Height = 23
|
||||
Top = 39
|
||||
Top = 40
|
||||
Width = 50
|
||||
MaxValue = 50
|
||||
MinValue = 1
|
||||
OnChange = spGrabWidthChange
|
||||
TabOrder = 0
|
||||
TabOrder = 1
|
||||
Value = 5
|
||||
end
|
||||
object cbGrabStyle: TComboBox
|
||||
@ -174,7 +162,7 @@ object ToolbarOptionsFrame: TToolbarOptionsFrame
|
||||
Height = 23
|
||||
Top = 5
|
||||
Width = 157
|
||||
ItemHeight = 15
|
||||
ItemHeight = 17
|
||||
ItemIndex = 4
|
||||
Items.Strings = (
|
||||
'gsSimple'
|
||||
@ -186,27 +174,27 @@ object ToolbarOptionsFrame: TToolbarOptionsFrame
|
||||
)
|
||||
OnChange = cbGrabStyleChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 1
|
||||
TabOrder = 0
|
||||
Text = 'gsGripper'
|
||||
end
|
||||
end
|
||||
object bDefaultGeneral: TBitBtn
|
||||
Left = 6
|
||||
Left = 376
|
||||
Height = 24
|
||||
Top = 167
|
||||
Width = 85
|
||||
Anchors = [akLeft, akBottom]
|
||||
Top = 168
|
||||
Width = 127
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Default'
|
||||
OnClick = bDefaultGeneralClick
|
||||
TabOrder = 1
|
||||
TabOrder = 3
|
||||
end
|
||||
object cbToolBarVisible: TCheckBox
|
||||
Left = 12
|
||||
Height = 19
|
||||
Height = 22
|
||||
Top = 32
|
||||
Width = 108
|
||||
Width = 119
|
||||
Caption = 'Toolbar is visible'
|
||||
TabOrder = 2
|
||||
TabOrder = 0
|
||||
end
|
||||
object gbBorderStyle: TGroupBox
|
||||
Left = 216
|
||||
@ -214,15 +202,15 @@ object ToolbarOptionsFrame: TToolbarOptionsFrame
|
||||
Top = 64
|
||||
Width = 188
|
||||
Caption = 'Band Border Style'
|
||||
ClientHeight = 69
|
||||
ClientHeight = 68
|
||||
ClientWidth = 184
|
||||
TabOrder = 3
|
||||
TabOrder = 2
|
||||
object cbBorderStyle: TComboBox
|
||||
Left = 11
|
||||
Height = 23
|
||||
Top = 5
|
||||
Width = 157
|
||||
ItemHeight = 15
|
||||
ItemHeight = 17
|
||||
ItemIndex = 1
|
||||
Items.Strings = (
|
||||
'None'
|
||||
@ -237,8 +225,8 @@ object ToolbarOptionsFrame: TToolbarOptionsFrame
|
||||
end
|
||||
object dbAddConfigDelete: TDividerBevel
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 5
|
||||
Height = 17
|
||||
Top = 208
|
||||
Width = 520
|
||||
Caption = 'Add/Config/Delete Toolbar(s)'
|
||||
Align = alTop
|
||||
@ -252,4 +240,11 @@ object ToolbarOptionsFrame: TToolbarOptionsFrame
|
||||
left = 464
|
||||
top = 96
|
||||
end
|
||||
object tmWait: TTimer
|
||||
Enabled = False
|
||||
Interval = 100
|
||||
OnTimer = tmWaitTimer
|
||||
left = 408
|
||||
top = 96
|
||||
end
|
||||
end
|
||||
|
@ -17,7 +17,7 @@
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* *
|
||||
***************************************************************************
|
||||
Author: Balazs Szekely
|
||||
Author: Balázs Székely
|
||||
Abstract:
|
||||
Frame for toolbar options.
|
||||
}
|
||||
@ -52,13 +52,12 @@ type
|
||||
dbAddConfigDelete: TDividerBevel;
|
||||
dbGeneralSettings: TDividerBevel;
|
||||
lbGrabWidth: TLabel;
|
||||
MenuItem1: TMenuItem;
|
||||
pnBottom: TPanel;
|
||||
pnTop: TPanel;
|
||||
pnBottom: TPanel;
|
||||
pnButtons: TPanel;
|
||||
sbCoolBar: TScrollBox;
|
||||
spGrabWidth: TSpinEdit;
|
||||
Splitter1: TSplitter;
|
||||
tmWait: TTimer;
|
||||
procedure bAddClick(Sender: TObject);
|
||||
procedure bConfigClick(Sender: TObject);
|
||||
procedure bDefaultGeneralClick(Sender: TObject);
|
||||
@ -69,8 +68,8 @@ type
|
||||
procedure CoolBarMouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: integer);
|
||||
procedure CoolbarResize(Sender: TObject);
|
||||
procedure CoolbarStartDrag(Sender: TObject; var DragObject: TDragObject);
|
||||
procedure spGrabWidthChange(Sender: TObject);
|
||||
procedure tmWaitTimer(Sender: TObject);
|
||||
private
|
||||
FTempList: TIDEToolBarList;
|
||||
procedure SelectBand(const ID: integer);
|
||||
@ -106,10 +105,10 @@ procedure TToolbarOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
||||
begin
|
||||
dbAddConfigDelete.Caption := lisCoolbarAddConfigDelete;
|
||||
dbGeneralSettings.Caption := lisCoolbarGeneralSettings;
|
||||
bDefaultToolbar.Caption := lisCoolbarDefault;
|
||||
bAdd.Caption := lisCoolbarAdd;
|
||||
bConfig.Caption := lisCoolbarConfig;
|
||||
bDelete.Caption := lisCoolbarDelete;
|
||||
bDefaultToolbar.Caption := lisCoolbarRestoreDefaults;
|
||||
bAdd.Caption := lisBtnAdd;
|
||||
bConfig.Caption := lisCoolbarConfigure;
|
||||
bDelete.Caption := lisBtnDelete;
|
||||
cbToolBarVisible.Caption := lisCoolbarVisible;
|
||||
gbGrabStyle.Caption := lisCoolbarGrabStyle;
|
||||
cbGrabStyle.Items.Strings[0] := lisCoolbarGrabStyleItem0;
|
||||
@ -122,7 +121,7 @@ begin
|
||||
gbBorderStyle.Caption := lisCoolbarBorderStyle;
|
||||
cbBorderStyle.Items.Strings[0] := lisCoolbarBorderStyleItem0;
|
||||
cbBorderStyle.Items.Strings[1] := lisCoolbarBorderStyleItem1;
|
||||
bDefaultGeneral.Caption := lisCoolbarDefault;
|
||||
bDefaultGeneral.Caption := lisCoolbarRestoreDefaults;
|
||||
end;
|
||||
|
||||
procedure TToolbarOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
@ -228,15 +227,18 @@ end;
|
||||
|
||||
procedure TToolbarOptionsFrame.CoolbarResize(Sender: TObject);
|
||||
begin
|
||||
Coolbar.AutosizeBands;
|
||||
if tmWait.Enabled then
|
||||
Exit;
|
||||
tmWait.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TToolbarOptionsFrame.CoolbarStartDrag(Sender: TObject;
|
||||
var DragObject: TDragObject);
|
||||
procedure TToolbarOptionsFrame.tmWaitTimer(Sender: TObject);
|
||||
begin
|
||||
Caption := 'Dragging';
|
||||
Coolbar.AutosizeBands;
|
||||
tmWait.Enabled := False;
|
||||
end;
|
||||
|
||||
|
||||
procedure TToolbarOptionsFrame.spGrabWidthChange(Sender: TObject);
|
||||
begin
|
||||
CoolBar.GrabWidth := TSpinEdit(Sender).Value;
|
||||
@ -320,10 +322,10 @@ begin
|
||||
CoolBar.Bands.Clear;
|
||||
for I := 0 to FTempList.Count - 1 do
|
||||
begin
|
||||
//Balazs
|
||||
CoolBand := CoolBar.Bands.Add;
|
||||
CoolBand.Break := FTempList.Items[I].Break;
|
||||
CoolBand.Control := FTempList.Items[I].Toolbar;
|
||||
FTempList.Items[I].Toolbar.Enabled := False;
|
||||
CoolBand.Visible := True;
|
||||
CoolBand.MinWidth := 25;
|
||||
CoolBand.MinHeight := 22;
|
||||
@ -362,12 +364,11 @@ begin
|
||||
CoolBand := CoolBar.Bands.Add;
|
||||
CoolBand.Break := True;
|
||||
CoolBand.Control := IDEToolbar.Toolbar;
|
||||
IDEToolbar.Toolbar.Enabled := False;
|
||||
CoolBand.Visible := True;
|
||||
CoolBand.MinWidth := 25;
|
||||
CoolBand.MinHeight := 22;
|
||||
CoolBand.FixedSize := True;
|
||||
|
||||
// AddBand(True, IDEToolbar.Toolbar);
|
||||
SelectBand(CoolBand.Index);
|
||||
EnableButtons;
|
||||
end;
|
||||
@ -384,7 +385,7 @@ begin
|
||||
MessageDlg(lisCoolbarSelectToolBar, mtInformation, [mbOk], 0);
|
||||
Exit;
|
||||
end;
|
||||
fToolBarConfig := TfToolBarConfig.Create(Self);
|
||||
fToolBarConfig := TToolBarConfig.Create(Self);
|
||||
try
|
||||
ToolBar := (Coolbar.Bands.Items[ToConfig].Control as TToolBar);
|
||||
if ToolBar <> nil then
|
||||
@ -438,54 +439,48 @@ end;
|
||||
|
||||
procedure TToolbarOptionsFrame.bDefaultGeneralClick(Sender: TObject);
|
||||
begin
|
||||
if MessageDlg(lisCoolbarResetDefaults, mtConfirmation, [mbYes, mbNo], 0) = mrYes then
|
||||
begin
|
||||
cbGrabStyle.ItemIndex := 4;
|
||||
spGrabWidth.Value := 5;
|
||||
BiDiMode := bdLeftToRight;
|
||||
cbBorderStyle.ItemIndex := 1;
|
||||
Coolbar.GrabStyle := TGrabStyle(4);
|
||||
Coolbar.GrabWidth := 5;
|
||||
Coolbar.BandBorderStyle := bsSingle;
|
||||
end;
|
||||
cbGrabStyle.ItemIndex := 4;
|
||||
spGrabWidth.Value := 5;
|
||||
BiDiMode := bdLeftToRight;
|
||||
cbBorderStyle.ItemIndex := 1;
|
||||
Coolbar.GrabStyle := TGrabStyle(4);
|
||||
Coolbar.GrabWidth := 5;
|
||||
Coolbar.BandBorderStyle := bsSingle;
|
||||
end;
|
||||
|
||||
procedure TToolbarOptionsFrame.bDefaultToolbarClick(Sender: TObject);
|
||||
var
|
||||
IDEToolBar: TIDEToolBar;
|
||||
begin
|
||||
if MessageDlg(lisCoolbarResetDefaults, mtConfirmation, [mbYes, mbNo], 0) = mrYes then
|
||||
begin
|
||||
FTempList.Clear;
|
||||
//standard
|
||||
IDEToolBar := FTempList.Add;
|
||||
IDEToolBar.Position := 0;
|
||||
IDEToolBar.Break := False;
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/File/itmFileNew/itmFileNewForm');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/File/itmFileNew/itmFileNewUnit');
|
||||
IDEToolBar.ButtonNames.Add('---------------');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/File/itmFileOpenSave/itmFileOpen');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/File/itmFileOpenSave/itmFileSave');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/File/itmFileOpenSave/itmFileSaveAll');
|
||||
IDEToolBar.ButtonNames.Add('---------------');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/View/itmViewMainWindows/itmViewToggleFormUnit');
|
||||
FTempList.Clear;
|
||||
//standard
|
||||
IDEToolBar := FTempList.Add;
|
||||
IDEToolBar.Position := 0;
|
||||
IDEToolBar.Break := False;
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/File/itmFileNew/itmFileNewForm');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/File/itmFileNew/itmFileNewUnit');
|
||||
IDEToolBar.ButtonNames.Add('---------------');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/File/itmFileOpenSave/itmFileOpen');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/File/itmFileOpenSave/itmFileSave');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/File/itmFileOpenSave/itmFileSaveAll');
|
||||
IDEToolBar.ButtonNames.Add('---------------');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/View/itmViewMainWindows/itmViewToggleFormUnit');
|
||||
|
||||
//debug
|
||||
IDEToolBar := FTempList.Add;
|
||||
IDEToolBar.Position := 1;
|
||||
IDEToolBar.Break := True;
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Project/itmProjectAddRemoveSection/itmProjectViewUnits');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Project/itmProjectAddRemoveSection/itmProjectViewForms');
|
||||
IDEToolBar.ButtonNames.Add('---------------');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Project/itmProjectAddRemoveSection/itmProjectBuildMode');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuRun');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuPause');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuStop');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuStepOver');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuStepInto');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuStepOut');
|
||||
PopulateToolBar;
|
||||
end;
|
||||
//debug
|
||||
IDEToolBar := FTempList.Add;
|
||||
IDEToolBar.Position := 1;
|
||||
IDEToolBar.Break := True;
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Project/itmProjectAddRemoveSection/itmProjectViewUnits');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Project/itmProjectAddRemoveSection/itmProjectViewForms');
|
||||
IDEToolBar.ButtonNames.Add('---------------');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Project/itmProjectAddRemoveSection/itmProjectBuildMode');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuRun');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuPause');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuStop');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuStepOver');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuStepInto');
|
||||
IDEToolBar.ButtonNames.Add('IDEMainMenu/Run/itmRunnning/itmRunMenuStepOut');
|
||||
PopulateToolBar;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -316,7 +316,6 @@ resourcestring
|
||||
lisMenuInsertCVSKeyword = 'Insert CVS Keyword';
|
||||
lisMenuInsertGeneral = 'Insert General';
|
||||
lisGeneral = 'General';
|
||||
// lisNone2 = 'none';
|
||||
lisOr = 'or';
|
||||
lisNone = '%snone';
|
||||
lisUnitPaths = 'Unit paths';
|
||||
@ -4494,6 +4493,55 @@ resourcestring
|
||||
lisProjInspRemovedRequiredPackages = 'Removed required packages';
|
||||
lisProjInspProjectInspector = 'Project Inspector - %s';
|
||||
|
||||
//Coolbar
|
||||
lisCoolbarOptions = 'IDE CoolBar';
|
||||
lisCoolbarDeleteToolBar = 'Are you sure you want to delete the selected toolbar?';
|
||||
lisCoolbarSelectToolBar = 'Please select a toolbar first!';
|
||||
lisCoolbarAddSelected = 'Add selected item to toolbar';
|
||||
lisCoolbarRemoveSelected = 'Remove selected item from toolbar';
|
||||
lisCoolbarMoveSelectedUp = 'Move selected toolbar item up';
|
||||
lisCoolbarMoveSelectedDown = 'Move selected toolbar item down';
|
||||
lisCoolbarAddDivider = 'Add Divider';
|
||||
lisCoolbarClearSelection = 'Clear selection';
|
||||
lisCoolbarHelp1 = 'The "Add" button inserts a command before the ' +
|
||||
'selected Item of the Toolbar.';
|
||||
lisCoolbarHelp2 = 'If none is selected, the Item will be appended at the end ' +
|
||||
'of the Toolbar.';
|
||||
lisCoolbarHelp3 = 'You may rearrange Toolbar Items with "Move Up" and '+
|
||||
'"Move Down" buttons.';
|
||||
lisCoolbarHelp4 = 'Hint: to append an Item at the end, use "Clear selection"';
|
||||
lisToolbarConfiguration = 'Toolbar Configuration';
|
||||
lisCoolbarAvailableCommands = 'Available commands';
|
||||
lisCoolbarToolbarCommands = 'Toolbar commands';
|
||||
// Command root nodes
|
||||
lisCoolbarIDEMainMenu = 'IDE Main Menu';
|
||||
lisCoolbarSourceTab = 'Source Tab';
|
||||
lisCoolbarSourceEditor = 'Source Editor';
|
||||
lisCoolbarMessages = 'Messages';
|
||||
lisCoolbarCodeExplorer = 'Code Explorer';
|
||||
lisCoolbarCodeTemplates = 'Code Templates';
|
||||
lisCoolbarDesigner = 'Designer';
|
||||
lisCoolbarPackageEditor = 'Package Editor';
|
||||
lisCoolbarPackageEditorFiles = 'Package Editor Files';
|
||||
|
||||
lisCoolbarAddConfigDelete = 'Add/Config/Delete Toolbar(s)';
|
||||
lisCoolbarGeneralSettings = 'General Coolbar Settings';
|
||||
lisCoolbarConfigure = '&Configure';
|
||||
lisCoolbarVisible = 'Coolbar is &visible';
|
||||
lisCoolbarGrabStyle = 'Toolbars grab style';
|
||||
lisCoolbarGrabStyleItem0 = 'Simple';
|
||||
lisCoolbarGrabStyleItem1 = 'Double';
|
||||
lisCoolbarGrabStyleItem2 = 'HorLines';
|
||||
lisCoolbarGrabStyleItem3 = 'VerLines';
|
||||
lisCoolbarGrabStyleItem4 = 'Gripper';
|
||||
lisCoolbarGrabStyleItem5 = 'Button';
|
||||
lisCoolbarGrabWidth = 'Grab width';
|
||||
lisCoolbarBorderStyle = 'Toolbars border style';
|
||||
lisCoolbarBorderStyleItem0 = 'None';
|
||||
lisCoolbarBorderStyleItem1 = 'Single';
|
||||
lisCoolbarDeleteWarning = 'There must be at least one toolbar!';
|
||||
lisCoolbarRestoreDefaults = 'Restore defaults';
|
||||
|
||||
// components palette settings and list form
|
||||
lisCmpPages = 'Pages';
|
||||
lisCmpRestoreDefaults = '&Restore defaults';
|
||||
@ -5886,59 +5934,6 @@ resourcestring
|
||||
;
|
||||
lisUpdateInfo = 'Update info';
|
||||
|
||||
//Coolbar
|
||||
lisCoolbarOptions = 'CoolBar Options';
|
||||
lisCoolbarDeleteToolBar = 'Are you sure you want to delete the selected toolbar?';
|
||||
lisCoolbarSelectToolBar = 'Please select a toolbar first!';
|
||||
lisCoolbarAddSelected = 'Add selected item to toolbar';
|
||||
lisCoolbarRemoveSelected = 'Remove selected item from toolbar';
|
||||
lisCoolbarMoveSelectedUp = 'Move selected toolbar item up';
|
||||
lisCoolbarMoveSelectedDown = 'Move selected toolbar item down';
|
||||
lisCoolbarAddDivider = 'Add Divider';
|
||||
lisCoolbarClearSelection = 'Clear selection';
|
||||
lisCoolbarHelp1 = 'The "Add" button inserts a Menu Item before the ' +
|
||||
'selected Item of the Toolbar.';
|
||||
lisCoolbarHelp2 = 'If none is selected, the Item will be appended at the end ' +
|
||||
'of the Toolbar.';
|
||||
lisCoolbarHelp3 = 'You may rearrange Toolbar Items with "Move Up" and '+
|
||||
'"Move Down" buttons.';
|
||||
lisCoolbarHelp4 = 'Hint: to append an Item at the end, use "Clear selection"';
|
||||
lisEditorToolbarConfigForm = 'Toolbar Configuration';
|
||||
lisCoolbarOK = 'OK';
|
||||
lisCoolbarCancel = 'Cancel';
|
||||
lisCoolbarMenuTree = 'Available Menu Items';
|
||||
lisCoolbarToolbar = 'Toolbar Items';
|
||||
lisCoolbarIDEMainMenu = 'IDE Main Menu';
|
||||
lisCoolbarSourceTab = 'Source Tab';
|
||||
lisCoolbarSourceEditor = 'Source Editor';
|
||||
lisCoolbarMessages = 'Messages';
|
||||
lisCoolbarCodeExplorer = 'Code Explorer';
|
||||
lisCoolbarCodeTemplates = 'Code Templates';
|
||||
lisCoolbarDesigner = 'Designer';
|
||||
lisCoolbarPackageEditor = 'Package Editor';
|
||||
lisCoolbarPackageEditorFiles = 'Package Editor Files';
|
||||
lisCoolbarAddConfigDelete = 'Add/Config/Delete Toolbar(s)';
|
||||
lisCoolbarGeneralSettings = 'General Coolbar Settings';
|
||||
lisCoolbarAdd = 'Add';
|
||||
lisCoolbarConfig = 'Config';
|
||||
lisCoolbarDelete = 'Delete';
|
||||
lisCoolbarVisible = 'Coolbar is visible';
|
||||
lisCoolbarGrabStyle = 'Toolbars Grab Style';
|
||||
lisCoolbarGrabStyleItem0 = 'Simple';
|
||||
lisCoolbarGrabStyleItem1 = 'Double';
|
||||
lisCoolbarGrabStyleItem2 = 'HorLines';
|
||||
lisCoolbarGrabStyleItem3 = 'VerLines';
|
||||
lisCoolbarGrabStyleItem4 = 'Gripper';
|
||||
lisCoolbarGrabStyleItem5 = 'Button';
|
||||
lisCoolbarGrabWidth = 'Grab width';
|
||||
lisCoolbarBorderStyle = 'Toolbars Border Style';
|
||||
lisCoolbarBorderStyleItem0 = 'None';
|
||||
lisCoolbarBorderStyleItem1 = 'Single';
|
||||
lisCoolbarDefault = 'Default';
|
||||
lisCoolbarResetDefaults = 'Reset to default values?';
|
||||
lisCoolbarDeleteWarning = 'There must be at least one toolbar!';
|
||||
lismiToolbar = 'Options';
|
||||
|
||||
//Debugger Attaching dialog
|
||||
lisDADRunningProcesses = 'Running Processes';
|
||||
lisDADImageName = 'Image Name';
|
||||
|
@ -1,9 +1,9 @@
|
||||
object fToolBarConfig: TfToolBarConfig
|
||||
object ToolBarConfig: TToolBarConfig
|
||||
Left = 713
|
||||
Height = 457
|
||||
Top = 329
|
||||
Width = 772
|
||||
Caption = 'fToolBarConfig'
|
||||
Caption = 'ToolBarConfig'
|
||||
ClientHeight = 457
|
||||
ClientWidth = 772
|
||||
OnCreate = FormCreate
|
||||
@ -13,10 +13,10 @@ object fToolBarConfig: TfToolBarConfig
|
||||
object lblMenuTree: TLabel
|
||||
AnchorSideLeft.Control = TV
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
Left = 171
|
||||
Height = 15
|
||||
Left = 170
|
||||
Height = 17
|
||||
Top = 14
|
||||
Width = 71
|
||||
Width = 73
|
||||
Caption = 'lblMenuTree'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -24,10 +24,10 @@ object fToolBarConfig: TfToolBarConfig
|
||||
AnchorSideLeft.Control = lvToolbar
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = lblMenuTree
|
||||
Left = 574
|
||||
Height = 15
|
||||
Left = 573
|
||||
Height = 17
|
||||
Top = 14
|
||||
Width = 56
|
||||
Width = 58
|
||||
Caption = 'lblToolbar'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -37,7 +37,7 @@ object fToolBarConfig: TfToolBarConfig
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 415
|
||||
Height = 26
|
||||
Top = 116
|
||||
Top = 118
|
||||
Width = 22
|
||||
BorderSpacing.Top = 1
|
||||
Enabled = False
|
||||
@ -51,7 +51,7 @@ object fToolBarConfig: TfToolBarConfig
|
||||
AnchorSideTop.Control = TV
|
||||
Left = 415
|
||||
Height = 26
|
||||
Top = 89
|
||||
Top = 91
|
||||
Width = 22
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 25
|
||||
@ -66,7 +66,7 @@ object fToolBarConfig: TfToolBarConfig
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 415
|
||||
Height = 26
|
||||
Top = 167
|
||||
Top = 169
|
||||
Width = 22
|
||||
BorderSpacing.Top = 25
|
||||
Enabled = False
|
||||
@ -80,7 +80,7 @@ object fToolBarConfig: TfToolBarConfig
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 415
|
||||
Height = 26
|
||||
Top = 194
|
||||
Top = 196
|
||||
Width = 22
|
||||
BorderSpacing.Top = 1
|
||||
Enabled = False
|
||||
@ -88,96 +88,19 @@ object fToolBarConfig: TfToolBarConfig
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object pnlButtons: TPanel
|
||||
Left = 0
|
||||
Height = 42
|
||||
Top = 415
|
||||
Width = 772
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 42
|
||||
ClientWidth = 772
|
||||
Color = clGreen
|
||||
ParentColor = False
|
||||
TabOrder = 2
|
||||
object Bevel1: TBevel
|
||||
Left = 0
|
||||
Height = 2
|
||||
Top = 0
|
||||
Width = 772
|
||||
Align = alTop
|
||||
end
|
||||
object btnOK: TButton
|
||||
AnchorSideRight.Control = btnCancel
|
||||
AnchorSideBottom.Control = pnlButtons
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 604
|
||||
Height = 25
|
||||
Top = 11
|
||||
Width = 75
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Caption = 'btnOK'
|
||||
Constraints.MaxHeight = 25
|
||||
Constraints.MinHeight = 25
|
||||
Constraints.MinWidth = 75
|
||||
ModalResult = 1
|
||||
TabOrder = 0
|
||||
end
|
||||
object btnCancel: TButton
|
||||
AnchorSideRight.Control = pnlButtons
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = pnlButtons
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 685
|
||||
Height = 25
|
||||
Top = 11
|
||||
Width = 81
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Cancel = True
|
||||
Caption = 'btnCancel'
|
||||
Constraints.MaxHeight = 25
|
||||
Constraints.MinHeight = 25
|
||||
Constraints.MinWidth = 75
|
||||
ModalResult = 2
|
||||
TabOrder = 1
|
||||
end
|
||||
object btnHelp: TBitBtn
|
||||
AnchorSideBottom.Control = pnlButtons
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 16
|
||||
Height = 25
|
||||
Top = 11
|
||||
Width = 75
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Help'
|
||||
OnClick = btnHelpClick
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
object TV: TTreeView
|
||||
AnchorSideLeft.Control = FilterEdit
|
||||
AnchorSideTop.Control = FilterEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Splitter1
|
||||
AnchorSideBottom.Control = pnlButtons
|
||||
Left = 16
|
||||
Height = 345
|
||||
Top = 64
|
||||
Height = 343
|
||||
Top = 66
|
||||
Width = 381
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 3
|
||||
BorderSpacing.Bottom = 6
|
||||
DefaultItemHeight = 18
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 1
|
||||
@ -187,7 +110,7 @@ object fToolBarConfig: TfToolBarConfig
|
||||
object FilterEdit: TTreeFilterEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 16
|
||||
Height = 21
|
||||
Height = 23
|
||||
Top = 37
|
||||
Width = 192
|
||||
UseFormActivate = True
|
||||
@ -207,8 +130,8 @@ object fToolBarConfig: TfToolBarConfig
|
||||
AnchorSideBottom.Control = TV
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 400
|
||||
Height = 345
|
||||
Top = 64
|
||||
Height = 343
|
||||
Top = 66
|
||||
Width = 9
|
||||
Align = alNone
|
||||
Anchors = [akTop, akBottom]
|
||||
@ -217,10 +140,9 @@ object fToolBarConfig: TfToolBarConfig
|
||||
AnchorSideLeft.Control = btnAdd
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = TV
|
||||
AnchorSideBottom.Control = pnlButtons
|
||||
Left = 443
|
||||
Height = 314
|
||||
Top = 64
|
||||
Height = 312
|
||||
Top = 66
|
||||
Width = 318
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
@ -229,7 +151,7 @@ object fToolBarConfig: TfToolBarConfig
|
||||
item
|
||||
AutoSize = True
|
||||
Caption = 'Name'
|
||||
Width = 316
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
@ -239,7 +161,7 @@ object fToolBarConfig: TfToolBarConfig
|
||||
end>
|
||||
ScrollBars = ssAutoBoth
|
||||
ShowColumnHeaders = False
|
||||
TabOrder = 4
|
||||
TabOrder = 3
|
||||
ViewStyle = vsReport
|
||||
OnSelectItem = lvToolbarSelectItem
|
||||
end
|
||||
@ -249,7 +171,7 @@ object fToolBarConfig: TfToolBarConfig
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 415
|
||||
Height = 26
|
||||
Top = 270
|
||||
Top = 272
|
||||
Width = 22
|
||||
BorderSpacing.Top = 50
|
||||
OnClick = btnAddDividerClick
|
||||
@ -261,10 +183,10 @@ object fToolBarConfig: TfToolBarConfig
|
||||
AnchorSideTop.Control = FilterEdit
|
||||
AnchorSideRight.Control = lvToolbar
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 713
|
||||
Height = 15
|
||||
Left = 715
|
||||
Height = 17
|
||||
Top = 37
|
||||
Width = 48
|
||||
Width = 46
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'lbSelect'
|
||||
ParentColor = False
|
||||
@ -284,4 +206,28 @@ object fToolBarConfig: TfToolBarConfig
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object pnlButtons: TButtonPanel
|
||||
Left = 6
|
||||
Height = 37
|
||||
Top = 414
|
||||
Width = 760
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.DefaultCaption = True
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.DefaultCaption = True
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.DefaultCaption = True
|
||||
TabOrder = 4
|
||||
ShowButtons = [pbOK, pbCancel, pbHelp]
|
||||
ShowGlyphs = [pbOK, pbCancel, pbHelp]
|
||||
object Bevel1: TBevel
|
||||
Left = 0
|
||||
Height = 2
|
||||
Top = 0
|
||||
Width = 760
|
||||
Align = alTop
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -25,7 +25,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, Forms, Graphics, Dialogs, ExtCtrls, Buttons, StdCtrls,
|
||||
ComCtrls, Menus, TreeFilterEdit, LazarusIDEStrConsts,
|
||||
MenuIntf, IDEImagesIntf, LCLProc;
|
||||
MenuIntf, IDEImagesIntf, LCLProc, ButtonPanel;
|
||||
|
||||
type
|
||||
{ TLvItem }
|
||||
@ -34,9 +34,9 @@ type
|
||||
LvIndex: Integer;
|
||||
end;
|
||||
|
||||
{ TfToolBarConfig }
|
||||
{ TToolBarConfig }
|
||||
|
||||
TfToolBarConfig = class(TForm)
|
||||
TToolBarConfig = class(TForm)
|
||||
Bevel1: TBevel;
|
||||
btnHelp: TBitBtn;
|
||||
btnAdd: TSpeedButton;
|
||||
@ -54,7 +54,7 @@ type
|
||||
miDebug: TMenuItem;
|
||||
miHTML: TMenuItem;
|
||||
miCustom: TMenuItem;
|
||||
pnlButtons: TPanel;
|
||||
pnlButtons: TButtonPanel;
|
||||
FilterEdit: TTreeFilterEdit;
|
||||
sbAddDivider: TSpeedButton;
|
||||
btnClear: TSpeedButton;
|
||||
@ -98,7 +98,7 @@ type
|
||||
end;
|
||||
|
||||
var
|
||||
fToolBarConfig: TfToolBarConfig;
|
||||
fToolBarConfig: TToolBarConfig;
|
||||
|
||||
implementation
|
||||
|
||||
@ -110,9 +110,9 @@ uses
|
||||
const
|
||||
cDivider = '---------------';
|
||||
|
||||
{ TfToolBarConfig }
|
||||
{ TToolBarConfig }
|
||||
|
||||
procedure TfToolBarConfig.FormCreate(Sender: TObject);
|
||||
procedure TToolBarConfig.FormCreate(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
pnlButtons.Color := clBtnFace;
|
||||
@ -123,10 +123,8 @@ begin
|
||||
btnMoveUp.LoadGlyphFromResourceName(HInstance, 'arrow_up');
|
||||
btnMoveDown.LoadGlyphFromResourceName(HInstance, 'arrow_down');
|
||||
btnClear.LoadGlyphFromResourceName(HINSTANCE,'menu_close');
|
||||
btnHelp.LoadGlyphFromResourceName(HINSTANCE, 'menu_help');
|
||||
sbAddDivider.LoadGlyphFromResourceName(HINSTANCE, 'menu_divider16');
|
||||
|
||||
|
||||
btnAdd.Hint := lisCoolBarAddSelected;
|
||||
btnRemove.Hint := lisCoolBarRemoveSelected;
|
||||
btnMoveUp.Hint := lisCoolBarMoveSelectedUp;
|
||||
@ -144,37 +142,38 @@ begin
|
||||
MainList := TStringList.Create;
|
||||
MainList.OwnsObjects:= True; // it should be the default, but just to make sure...
|
||||
|
||||
pnlButtons.Helpbutton.OnClick := @btnHelpClick;
|
||||
SetupCaptions;
|
||||
LoadCategories;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.FormDestroy(Sender: TObject);
|
||||
procedure TToolBarConfig.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
MainList.Free;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.btnClearClick(Sender: TObject);
|
||||
procedure TToolBarConfig.btnClearClick(Sender: TObject);
|
||||
begin
|
||||
lvToolbar.Selected := nil;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.btnHelpClick(Sender: TObject);
|
||||
procedure TToolBarConfig.btnHelpClick(Sender: TObject);
|
||||
begin
|
||||
ShowMessageFmt('%s%s%s%s%s%s%s', [lisCoolBarHelp1, LineEnding, lisCoolBarHelp2, LineEnding,
|
||||
lisCoolBarHelp3, LineEnding, lisCoolBarHelp4]);
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.btnShowClick(Sender: TObject);
|
||||
procedure TToolBarConfig.btnShowClick(Sender: TObject);
|
||||
begin
|
||||
lvToolbar.Columns[1].Visible:= true;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.btnHideClick(Sender: TObject);
|
||||
procedure TToolBarConfig.btnHideClick(Sender: TObject);
|
||||
begin
|
||||
lvToolbar.Columns[1].Visible:= false;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.lbToolbarSelectionChange(Sender: TObject);
|
||||
procedure TToolBarConfig.lbToolbarSelectionChange(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
@ -184,7 +183,7 @@ begin
|
||||
btnMoveDown.Enabled := (i > -1) and (i < lvToolbar.Items.Count-1);
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.TVSelectionChanged(Sender: TObject);
|
||||
procedure TToolBarConfig.TVSelectionChanged(Sender: TObject);
|
||||
var
|
||||
n: TTreeNode;
|
||||
begin
|
||||
@ -192,7 +191,7 @@ begin
|
||||
btnAdd.Enabled := (Assigned(n) and Assigned(n.Data));
|
||||
end;
|
||||
|
||||
function TfToolBarConfig.GetMainListIndex(Item: TListItem): Integer;
|
||||
function TToolBarConfig.GetMainListIndex(Item: TListItem): Integer;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
@ -205,7 +204,7 @@ begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.InsertMainListItem(Item,NextItem: TListItem);
|
||||
procedure TToolBarConfig.InsertMainListItem(Item,NextItem: TListItem);
|
||||
var
|
||||
I,J: Integer;
|
||||
aMainListItem: TLvItem;
|
||||
@ -225,7 +224,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.RemoveMainListItem(Item: TListItem);
|
||||
procedure TToolBarConfig.RemoveMainListItem(Item: TListItem);
|
||||
var
|
||||
I,J: Integer;
|
||||
aMainListItem: TLvItem;
|
||||
@ -240,7 +239,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.ExchangeMainListItem(Item1, Item2: TListItem);
|
||||
procedure TToolBarConfig.ExchangeMainListItem(Item1, Item2: TListItem);
|
||||
var
|
||||
MainIndex1,MainIndex2: Integer;
|
||||
aMainListItem: TLvItem;
|
||||
@ -254,7 +253,7 @@ begin
|
||||
aMainListItem.LvIndex:= Item2.Index;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.btnAddClick(Sender: TObject);
|
||||
procedure TToolBarConfig.btnAddClick(Sender: TObject);
|
||||
var
|
||||
n: TTreeNode;
|
||||
ACaption: string;
|
||||
@ -295,7 +294,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.btnRemoveClick(Sender: TObject);
|
||||
procedure TToolBarConfig.btnRemoveClick(Sender: TObject);
|
||||
Var
|
||||
mi: TIDEMenuItem;
|
||||
n: TTreeNode;
|
||||
@ -319,7 +318,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.lvToolbarSelectItem(Sender: TObject;
|
||||
procedure TToolBarConfig.lvToolbarSelectItem(Sender: TObject;
|
||||
Item: TListItem; Selected: Boolean);
|
||||
begin
|
||||
lbToolbarSelectionChange(Sender);
|
||||
@ -328,7 +327,7 @@ begin
|
||||
btnRemove.Enabled:= btnClear.Enabled;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.btnAddDividerClick(Sender: TObject);
|
||||
procedure TToolBarConfig.btnAddDividerClick(Sender: TObject);
|
||||
var
|
||||
lvItem: TListItem;
|
||||
anIndex: Integer;
|
||||
@ -346,7 +345,7 @@ begin
|
||||
InsertMainListItem(lvItem,Nil);
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.btnMoveDownClick(Sender: TObject);
|
||||
procedure TToolBarConfig.btnMoveDownClick(Sender: TObject);
|
||||
var
|
||||
Index1,Index2: Integer;
|
||||
begin
|
||||
@ -364,7 +363,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.btnMoveUpClick(Sender: TObject);
|
||||
procedure TToolBarConfig.btnMoveUpClick(Sender: TObject);
|
||||
var
|
||||
Index1,Index2: Integer;
|
||||
begin
|
||||
@ -382,16 +381,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.SetupCaptions;
|
||||
procedure TToolBarConfig.SetupCaptions;
|
||||
begin
|
||||
Caption := lisEditorToolbarConfigForm;
|
||||
btnOK.Caption := lisCoolbarOK;
|
||||
btnCancel.Caption := lisCoolbarCancel;
|
||||
lblMenuTree.Caption := lisCoolbarMenuTree;
|
||||
lblToolbar.Caption := lisCoolbarToolbar;
|
||||
Caption := lisToolbarConfiguration;
|
||||
lblMenuTree.Caption := lisCoolbarAvailableCommands;
|
||||
lblToolbar.Caption := lisCoolbarToolbarCommands;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.LoadCategories;
|
||||
procedure TToolBarConfig.LoadCategories;
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
@ -405,7 +402,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.AddMenuItem(ParentNode: TTreeNode; Item: TIDEMenuItem; Level: Integer);
|
||||
procedure TToolBarConfig.AddMenuItem(ParentNode: TTreeNode; Item: TIDEMenuItem; Level: Integer);
|
||||
var
|
||||
n: TTreeNode;
|
||||
i: integer;
|
||||
@ -448,7 +445,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfToolBarConfig.RootNodeCaption(Item: TIDEMenuItem): string;
|
||||
function TToolBarConfig.RootNodeCaption(Item: TIDEMenuItem): string;
|
||||
var
|
||||
AName: string;
|
||||
begin
|
||||
@ -467,7 +464,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.AddListItem(Item: TIDEMenuItem; PMask: Integer);
|
||||
procedure TToolBarConfig.AddListItem(Item: TIDEMenuItem; PMask: Integer);
|
||||
var
|
||||
aListItem: TLvItem;
|
||||
begin
|
||||
@ -482,7 +479,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.AddToolBarItem(Item: TIDEMenuItem; PMask: Integer);
|
||||
procedure TToolBarConfig.AddToolBarItem(Item: TIDEMenuItem; PMask: Integer);
|
||||
Var
|
||||
n: TTreeNode;
|
||||
ACaption: string;
|
||||
@ -505,7 +502,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.AddDivider(PMask: Integer);
|
||||
procedure TToolBarConfig.AddDivider(PMask: Integer);
|
||||
var
|
||||
lvItem: TListItem;
|
||||
begin
|
||||
@ -515,7 +512,7 @@ begin
|
||||
// lvItem.SubItems.Add(IntToStr(PMask));
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.FillToolBar;
|
||||
procedure TToolBarConfig.FillToolBar;
|
||||
var
|
||||
I: Integer;
|
||||
aListItem: TLvItem;
|
||||
@ -535,7 +532,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.LoadSettings(const SL: TStringList);
|
||||
procedure TToolBarConfig.LoadSettings(const SL: TStringList);
|
||||
var
|
||||
I: Integer;
|
||||
Value: string;
|
||||
@ -558,7 +555,7 @@ begin
|
||||
FillToolBar;
|
||||
end;
|
||||
|
||||
procedure TfToolBarConfig.SaveSettings(SL: TStringList);
|
||||
procedure TToolBarConfig.SaveSettings(SL: TStringList);
|
||||
var
|
||||
lvItem: TLvItem;
|
||||
I: Integer;
|
||||
|
@ -1,3 +1,28 @@
|
||||
{
|
||||
***************************************************************************
|
||||
* *
|
||||
* 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 *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This code is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* General Public License for more details. *
|
||||
* *
|
||||
* A copy of the GNU General Public License is available on the World *
|
||||
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||
* obtain it by writing to the Free Software Foundation, *
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
Author: Balázs Székely
|
||||
Abstract:
|
||||
The implementation of IDE Coolbar.
|
||||
}
|
||||
|
||||
unit ToolbarData;
|
||||
|
||||
|
||||
@ -22,7 +47,6 @@ type
|
||||
FPosition: integer;
|
||||
FBreak: Boolean;
|
||||
FOnToolbarClick: TOnToolBarClick;
|
||||
procedure DoConfigureToolbar(Sender: TObject);
|
||||
procedure UpdateBar(Sender: TObject);
|
||||
procedure DoToolBarClick(Sender: TObject);
|
||||
procedure AddDivider;
|
||||
@ -88,12 +112,6 @@ begin
|
||||
end;
|
||||
|
||||
{ TIDEToolBar }
|
||||
procedure TIDEToolBar.DoConfigureToolbar(Sender: TObject);
|
||||
begin
|
||||
// if TEdtTbConfigForm_Frame.Execute then
|
||||
// uEditorToolbarList.ReloadAll;
|
||||
end;
|
||||
|
||||
procedure TIDEToolBar.UpdateBar(Sender: TObject);
|
||||
var
|
||||
I, J: Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user