mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 11:20:33 +02:00
ide: add code explorer figures options
git-svn-id: trunk@19483 -
This commit is contained in:
parent
3e6aaa1f49
commit
d4351f1cae
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -2613,6 +2613,9 @@ ide/frames/backup_options.pas svneol=native#text/pascal
|
||||
ide/frames/codeexplorer_categories_options.lfm svneol=native#text/plain
|
||||
ide/frames/codeexplorer_categories_options.lrs svneol=native#text/pascal
|
||||
ide/frames/codeexplorer_categories_options.pas svneol=native#text/pascal
|
||||
ide/frames/codeexplorer_figures_options.lfm svneol=native#text/plain
|
||||
ide/frames/codeexplorer_figures_options.lrs svneol=native#text/pascal
|
||||
ide/frames/codeexplorer_figures_options.pas svneol=native#text/pascal
|
||||
ide/frames/codeexplorer_update_options.lfm svneol=native#text/plain
|
||||
ide/frames/codeexplorer_update_options.lrs svneol=native#text/pascal
|
||||
ide/frames/codeexplorer_update_options.pas svneol=native#text/pascal
|
||||
|
@ -4,8 +4,8 @@ inherited CodeExplorerCategoriesOptionsFrame: TCodeExplorerCategoriesOptionsFram
|
||||
ClientHeight = 300
|
||||
ClientWidth = 400
|
||||
TabOrder = 0
|
||||
DesignLeft = 154
|
||||
DesignTop = 203
|
||||
DesignLeft = 22
|
||||
DesignTop = 29
|
||||
object CategoriesCheckGroup: TCheckGroup[0]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
|
@ -3,17 +3,17 @@
|
||||
LazarusResources.Add('TCodeExplorerCategoriesOptionsFrame','FORMDATA',[
|
||||
'TPF0'#241'#TCodeExplorerCategoriesOptionsFrame"CodeExplorerCategoriesOptions'
|
||||
+'Frame'#6'Height'#3','#1#5'Width'#3#144#1#12'ClientHeight'#3','#1#11'ClientW'
|
||||
+'idth'#3#144#1#8'TabOrder'#2#0#10'DesignLeft'#3#154#0#9'DesignTop'#3#203#0#0
|
||||
+#242#2#0#11'TCheckGroup'#20'CategoriesCheckGroup'#22'AnchorSideLeft.Control'
|
||||
+#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'
|
||||
+#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Cont'
|
||||
+'rol'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#0#6'Heig'
|
||||
+'ht'#3','#1#3'Top'#2#0#5'Width'#3#144#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'a'
|
||||
+'kRight'#8'akBottom'#0#8'AutoFill'#9#7'Caption'#6#20'CategoriesCheckGroup'#28
|
||||
+'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'C'
|
||||
+'hildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing'
|
||||
+'.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHoriz'
|
||||
+'ontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChi'
|
||||
+'lds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSiz'
|
||||
+'ing.ControlsPerLine'#2#1#8'TabOrder'#2#0#0#0#0
|
||||
+'idth'#3#144#1#8'TabOrder'#2#0#10'DesignLeft'#2#22#9'DesignTop'#2#29#0#242#2
|
||||
+#0#11'TCheckGroup'#20'CategoriesCheckGroup'#22'AnchorSideLeft.Control'#7#5'O'
|
||||
+'wner'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5
|
||||
+'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'
|
||||
+#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#3
|
||||
+','#1#3'Top'#2#0#5'Width'#3#144#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'
|
||||
+#8'akBottom'#0#8'AutoFill'#9#7'Caption'#6#20'CategoriesCheckGroup'#28'ChildS'
|
||||
+'izing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSi'
|
||||
+'zing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.Enlar'
|
||||
+'geVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'
|
||||
+#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18
|
||||
+'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Cont'
|
||||
+'rolsPerLine'#2#1#8'TabOrder'#2#0#0#0#0
|
||||
]);
|
||||
|
@ -34,8 +34,6 @@ type
|
||||
|
||||
TCodeExplorerCategoriesOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
CategoriesCheckGroup: TCheckGroup;
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
function GetTitle: String; override;
|
||||
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
||||
@ -59,7 +57,7 @@ var
|
||||
c: TCodeExplorerCategory;
|
||||
begin
|
||||
CategoriesCheckGroup.Caption := lisCEOnlyUsedInCategoryMode;
|
||||
for c:=FirstCodeExplorerCategory to high(TCodeExplorerCategory) do
|
||||
for c := FirstCodeExplorerCategory to high(TCodeExplorerCategory) do
|
||||
CategoriesCheckGroup.Items.Add(CodeExplorerLocalizedString(c));
|
||||
end;
|
||||
|
||||
|
35
ide/frames/codeexplorer_figures_options.lfm
Normal file
35
ide/frames/codeexplorer_figures_options.lfm
Normal file
@ -0,0 +1,35 @@
|
||||
object CodeExplorerFiguresOptionsFrame: TCodeExplorerFiguresOptionsFrame
|
||||
Left = 0
|
||||
Height = 300
|
||||
Top = 0
|
||||
Width = 400
|
||||
ClientHeight = 300
|
||||
ClientWidth = 400
|
||||
TabOrder = 0
|
||||
DesignLeft = 744
|
||||
DesignTop = 181
|
||||
object FigureCategoriesCheckGroup: TCheckGroup
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 300
|
||||
Top = 0
|
||||
Width = 400
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
AutoFill = True
|
||||
Caption = 'FigureCategoriesCheckGroup'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
19
ide/frames/codeexplorer_figures_options.lrs
Normal file
19
ide/frames/codeexplorer_figures_options.lrs
Normal file
@ -0,0 +1,19 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TCodeExplorerFiguresOptionsFrame','FORMDATA',[
|
||||
'TPF0 TCodeExplorerFiguresOptionsFrame'#31'CodeExplorerFiguresOptionsFrame'#4
|
||||
+'Left'#2#0#6'Height'#3','#1#3'Top'#2#0#5'Width'#3#144#1#12'ClientHeight'#3','
|
||||
+#1#11'ClientWidth'#3#144#1#8'TabOrder'#2#0#10'DesignLeft'#3#232#2#9'DesignTo'
|
||||
+'p'#3#181#0#0#11'TCheckGroup'#26'FigureCategoriesCheckGroup'#22'AnchorSideLe'
|
||||
+'ft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRi'
|
||||
+'ght.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSi'
|
||||
+'deBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Lef'
|
||||
+'t'#2#0#6'Height'#3','#1#3'Top'#2#0#5'Width'#3#144#1#7'Anchors'#11#5'akTop'#6
|
||||
+'akLeft'#7'akRight'#8'akBottom'#0#8'AutoFill'#9#7'Caption'#6#26'FigureCatego'
|
||||
+'riesCheckGroup'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBott'
|
||||
+'omSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildRes'
|
||||
+'ize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'Chil'
|
||||
+'dSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertica'
|
||||
+'l'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopTo'
|
||||
+'Bottom'#27'ChildSizing.ControlsPerLine'#2#1#8'TabOrder'#2#0#0#0#0
|
||||
]);
|
98
ide/frames/codeexplorer_figures_options.pas
Normal file
98
ide/frames/codeexplorer_figures_options.pas
Normal file
@ -0,0 +1,98 @@
|
||||
{
|
||||
***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************
|
||||
}
|
||||
unit codeexplorer_figures_options;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms,
|
||||
IDEOptionsIntf, LazarusIDEStrConsts, CodeExplOpts, ExtCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TCodeExplorerFiguresOptionsFrame }
|
||||
|
||||
TCodeExplorerFiguresOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
FigureCategoriesCheckGroup: TCheckGroup;
|
||||
public
|
||||
function GetTitle: String; override;
|
||||
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
||||
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
|
||||
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
|
||||
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TCodeExplorerFiguresOptionsFrame }
|
||||
|
||||
function TCodeExplorerFiguresOptionsFrame.GetTitle: String;
|
||||
begin
|
||||
Result := lisCEFigures;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerFiguresOptionsFrame.Setup(
|
||||
ADialog: TAbstractOptionsEditorDialog);
|
||||
var
|
||||
c: TCEFigureCategory;
|
||||
begin
|
||||
FigureCategoriesCheckGroup.Caption := lisCEShowFigures;
|
||||
for c := Low(TCEFigureCategory) to High(TCEFigureCategory) do
|
||||
FigureCategoriesCheckGroup.Items.Add(CodeExplorerLocalizedString(c));
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerFiguresOptionsFrame.ReadSettings(
|
||||
AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
c: TCEFigureCategory;
|
||||
begin
|
||||
with AOptions as TCodeExplorerOptions do
|
||||
for c := Low(TCEFigureCategory) to High(TCEFigureCategory) do
|
||||
FigureCategoriesCheckGroup.Checked[ord(c)] := c in Figures;
|
||||
end;
|
||||
|
||||
procedure TCodeExplorerFiguresOptionsFrame.WriteSettings(
|
||||
AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
NewCategories: TCEFigureCategories;
|
||||
c: TCEFigureCategory;
|
||||
begin
|
||||
NewCategories := [];
|
||||
for c := Low(TCEFigureCategory) to high(TCEFigureCategory) do
|
||||
if FigureCategoriesCheckGroup.Checked[ord(c)] then
|
||||
Include(NewCategories, c);
|
||||
with AOptions as TCodeExplorerOptions do
|
||||
Figures := NewCategories;
|
||||
end;
|
||||
|
||||
class function TCodeExplorerFiguresOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TCodeExplorerOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I codeexplorer_figures_options.lrs}
|
||||
RegisterIDEOptionsEditor(GroupCodeExplorer, TCodeExplorerFiguresOptionsFrame, cdeOptionsFigures);
|
||||
|
||||
end.
|
||||
|
@ -40,7 +40,7 @@
|
||||
<PackageName Value="SynEdit"/>
|
||||
</Item4>
|
||||
</RequiredPackages>
|
||||
<Units Count="65">
|
||||
<Units Count="66">
|
||||
<Unit0>
|
||||
<Filename Value="lazarus.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -500,6 +500,13 @@
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="codeexplorer_categories_options"/>
|
||||
</Unit64>
|
||||
<Unit65>
|
||||
<Filename Value="frames/codeexplorer_figures_options.pas"/>
|
||||
<ComponentName Value="CodeExplorerFiguresOptionsFrame"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="codeexplorer_figures_options"/>
|
||||
</Unit65>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
@ -4129,6 +4129,7 @@ resourcestring
|
||||
lisUnusedUnits = 'Unused units';
|
||||
lisRemoveSelectedUnits = 'Remove selected units';
|
||||
lisRemoveAllUnits = 'Remove all units';
|
||||
lisCEShowFigures = 'Show figures';
|
||||
lisCELongProcedures = 'Long procedures';
|
||||
lisCEManyParameters = 'Many parameters';
|
||||
lisCEUnnamedConstants = 'Unnamed constants';
|
||||
|
@ -127,7 +127,7 @@ uses
|
||||
codetools_space_options, codetools_identifiercompletion_options,
|
||||
debugger_general_options, debugger_eventlog_options,
|
||||
debugger_language_exceptions_options, debugger_signals_options,
|
||||
codeexplorer_update_options, codeexplorer_categories_options,
|
||||
codeexplorer_update_options, codeexplorer_categories_options, codeexplorer_figures_options,
|
||||
PublishModule, EnvironmentOpts, TransferMacros, KeyMapping,
|
||||
IDETranslations, IDEProcs, ExtToolDialog, ExtToolEditDlg, OutputFilter, JumpHistoryView,
|
||||
BuildLazDialog, MiscOptions, InputHistory, UnitDependencies, ClipBoardHistory,
|
||||
|
Loading…
Reference in New Issue
Block a user