mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 11:36:05 +02:00
IDE: started conditionals frame
git-svn-id: trunk@23405 -
This commit is contained in:
parent
2e8a259717
commit
a44af1c9a5
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -3402,6 +3402,9 @@ ide/frames/compiler_codegen_options.pas svneol=native#text/pascal
|
|||||||
ide/frames/compiler_compilation_options.lfm svneol=native#text/plain
|
ide/frames/compiler_compilation_options.lfm svneol=native#text/plain
|
||||||
ide/frames/compiler_compilation_options.lrs svneol=native#text/pascal
|
ide/frames/compiler_compilation_options.lrs svneol=native#text/pascal
|
||||||
ide/frames/compiler_compilation_options.pas svneol=native#text/pascal
|
ide/frames/compiler_compilation_options.pas svneol=native#text/pascal
|
||||||
|
ide/frames/compiler_conditionals_options.lfm svneol=native#text/plain
|
||||||
|
ide/frames/compiler_conditionals_options.lrs svneol=native#text/plain
|
||||||
|
ide/frames/compiler_conditionals_options.pas svneol=native#text/plain
|
||||||
ide/frames/compiler_condtree.lfm svneol=native#text/plain
|
ide/frames/compiler_condtree.lfm svneol=native#text/plain
|
||||||
ide/frames/compiler_condtree.lrs svneol=native#text/pascal
|
ide/frames/compiler_condtree.lrs svneol=native#text/pascal
|
||||||
ide/frames/compiler_condtree.pas svneol=native#text/plain
|
ide/frames/compiler_condtree.pas svneol=native#text/plain
|
||||||
|
@ -181,7 +181,7 @@ type
|
|||||||
|
|
||||||
{ Conditionals }
|
{ Conditionals }
|
||||||
ConditionalPage: TPage;
|
ConditionalPage: TPage;
|
||||||
ConditionalOptionsFrame: TCompOptsConditionalsFrame;
|
ConditionalOptionsFrame: TCompOptsCondTreeFrame;
|
||||||
ConditionalsGroupBox: TGroupBox;
|
ConditionalsGroupBox: TGroupBox;
|
||||||
BuildVarsFrame: TCompOptBuildVarsFrame;
|
BuildVarsFrame: TCompOptBuildVarsFrame;
|
||||||
|
|
||||||
|
49
ide/frames/compiler_conditionals_options.lfm
Normal file
49
ide/frames/compiler_conditionals_options.lfm
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
object CompOptsConditionalsFrame: TCompOptsConditionalsFrame
|
||||||
|
Left = 0
|
||||||
|
Height = 411
|
||||||
|
Top = 0
|
||||||
|
Width = 499
|
||||||
|
ClientHeight = 411
|
||||||
|
ClientWidth = 499
|
||||||
|
TabOrder = 0
|
||||||
|
DesignLeft = 426
|
||||||
|
DesignTop = 475
|
||||||
|
object ConditionalsGroupBox: TGroupBox
|
||||||
|
Left = 0
|
||||||
|
Height = 200
|
||||||
|
Top = 0
|
||||||
|
Width = 499
|
||||||
|
Align = alTop
|
||||||
|
Caption = 'ConditionalsGroupBox'
|
||||||
|
ClientHeight = 181
|
||||||
|
ClientWidth = 495
|
||||||
|
TabOrder = 1
|
||||||
|
inline ConditionalsTreeFrame: TCompOptsCondTreeFrame
|
||||||
|
Height = 181
|
||||||
|
Width = 495
|
||||||
|
Align = alClient
|
||||||
|
ClientHeight = 181
|
||||||
|
ClientWidth = 495
|
||||||
|
Visible = True
|
||||||
|
inherited COCTreeView: TTreeView
|
||||||
|
Height = 181
|
||||||
|
Width = 495
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ConditionalsSplitter: TSplitter
|
||||||
|
Cursor = crVSplit
|
||||||
|
Left = 0
|
||||||
|
Height = 5
|
||||||
|
Top = 200
|
||||||
|
Width = 499
|
||||||
|
Align = alTop
|
||||||
|
ResizeAnchor = akTop
|
||||||
|
end
|
||||||
|
inline BuildVariablesFrame: TCompOptBuildVarsFrame
|
||||||
|
Left = 51
|
||||||
|
Top = 13
|
||||||
|
Align = alClient
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
end
|
16
ide/frames/compiler_conditionals_options.lrs
Normal file
16
ide/frames/compiler_conditionals_options.lrs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
LazarusResources.Add('TCompOptsConditionalsFrame','FORMDATA',[
|
||||||
|
'TPF0'#26'TCompOptsConditionalsFrame'#25'CompOptsConditionalsFrame'#4'Left'#2
|
||||||
|
+#0#6'Height'#3#155#1#3'Top'#2#0#5'Width'#3#243#1#12'ClientHeight'#3#155#1#11
|
||||||
|
+'ClientWidth'#3#243#1#8'TabOrder'#2#0#10'DesignLeft'#3#170#1#9'DesignTop'#3
|
||||||
|
+#219#1#0#9'TGroupBox'#20'ConditionalsGroupBox'#4'Left'#2#0#6'Height'#3#200#0
|
||||||
|
+#3'Top'#2#0#5'Width'#3#243#1#5'Align'#7#5'alTop'#7'Caption'#6#20'Conditional'
|
||||||
|
+'sGroupBox'#12'ClientHeight'#3#181#0#11'ClientWidth'#3#239#1#8'TabOrder'#2#1
|
||||||
|
+#0#244#22'TCompOptsCondTreeFrame'#21'ConditionalsTreeFrame'#6'Height'#3#181#0
|
||||||
|
+#5'Width'#3#239#1#5'Align'#7#8'alClient'#12'ClientHeight'#3#181#0#11'ClientW'
|
||||||
|
+'idth'#3#239#1#7'Visible'#9#0#241#9'TTreeView'#11'COCTreeView'#6'Height'#3
|
||||||
|
+#181#0#5'Width'#3#239#1#0#0#0#0#9'TSplitter'#20'ConditionalsSplitter'#6'Curs'
|
||||||
|
+'or'#7#8'crVSplit'#4'Left'#2#0#6'Height'#2#5#3'Top'#3#200#0#5'Width'#3#243#1
|
||||||
|
+#5'Align'#7#5'alTop'#12'ResizeAnchor'#7#5'akTop'#0#0#244#22'TCompOptBuildVar'
|
||||||
|
+'sFrame'#19'BuildVariablesFrame'#4'Left'#2'3'#3'Top'#2#13#5'Align'#7#8'alCli'
|
||||||
|
+'ent'#7'Visible'#9#0#0#0
|
||||||
|
]);
|
52
ide/frames/compiler_conditionals_options.pas
Normal file
52
ide/frames/compiler_conditionals_options.pas
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{***************************************************************************
|
||||||
|
* *
|
||||||
|
* 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 compiler_conditionals_options;
|
||||||
|
|
||||||
|
{$mode objfpc}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, FileUtil, LResources, Forms, StdCtrls, ExtCtrls,
|
||||||
|
Compiler_CondTree, Compiler_BuildVar_Options;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TCompOptsConditionalsFrame }
|
||||||
|
|
||||||
|
TCompOptsConditionalsFrame = class(TFrame)
|
||||||
|
BuildVariablesFrame: TCompOptBuildVarsFrame;
|
||||||
|
BuildVarsGroupBox: TGroupBox;
|
||||||
|
ConditionalsGroupBox: TGroupBox;
|
||||||
|
ConditionalsSplitter: TSplitter;
|
||||||
|
ConditionalsTreeFrame: TCompOptsCondTreeFrame;
|
||||||
|
private
|
||||||
|
{ private declarations }
|
||||||
|
public
|
||||||
|
{ public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
initialization
|
||||||
|
{$I compiler_conditionals_options.lrs}
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
@ -1,19 +1,19 @@
|
|||||||
object CompOptsConditionalsFrame: TCompOptsConditionalsFrame
|
object CompOptsCondTreeFrame: TCompOptsCondTreeFrame
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 170
|
Height = 170
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 385
|
Width = 385
|
||||||
ClientHeight = 166
|
ClientHeight = 170
|
||||||
ClientWidth = 381
|
ClientWidth = 385
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Visible = False
|
Visible = False
|
||||||
DesignLeft = 449
|
DesignLeft = 449
|
||||||
DesignTop = 401
|
DesignTop = 401
|
||||||
object COCTreeView: TTreeView
|
object COCTreeView: TTreeView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 166
|
Height = 170
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 381
|
Width = 385
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoExpand = True
|
AutoExpand = True
|
||||||
DefaultItemHeight = 19
|
DefaultItemHeight = 19
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
LazarusResources.Add('TCompOptsConditionalsFrame','FORMDATA',[
|
{ This is an automatically generated lazarus resource file }
|
||||||
'TPF0'#26'TCompOptsConditionalsFrame'#25'CompOptsConditionalsFrame'#4'Left'#2
|
|
||||||
+#0#6'Height'#3#170#0#3'Top'#2#0#5'Width'#3#129#1#12'ClientHeight'#3#166#0#11
|
LazarusResources.Add('TCompOptsCondTreeFrame','FORMDATA',[
|
||||||
+'ClientWidth'#3'}'#1#8'TabOrder'#2#0#7'Visible'#8#10'DesignLeft'#3#193#1#9'D'
|
'TPF0'#22'TCompOptsCondTreeFrame'#21'CompOptsCondTreeFrame'#4'Left'#2#0#6'Hei'
|
||||||
+'esignTop'#3#145#1#0#9'TTreeView'#11'COCTreeView'#4'Left'#2#0#6'Height'#3#166
|
+'ght'#3#170#0#3'Top'#2#0#5'Width'#3#129#1#12'ClientHeight'#3#170#0#11'Client'
|
||||||
+#0#3'Top'#2#0#5'Width'#3'}'#1#5'Align'#7#8'alClient'#10'AutoExpand'#9#17'Def'
|
+'Width'#3#129#1#8'TabOrder'#2#0#7'Visible'#8#10'DesignLeft'#3#193#1#9'Design'
|
||||||
+'aultItemHeight'#2#19#9'PopupMenu'#7#12'COCPopupMenu'#9'RowSelect'#9#8'TabOr'
|
+'Top'#3#145#1#0#9'TTreeView'#11'COCTreeView'#4'Left'#2#0#6'Height'#3#170#0#3
|
||||||
+'der'#2#0#8'OnEdited'#7#17'COCTreeViewEdited'#9'OnEditing'#7#18'COCTreeViewE'
|
+'Top'#2#0#5'Width'#3#129#1#5'Align'#7#8'alClient'#10'AutoExpand'#9#17'Defaul'
|
||||||
+'diting'#7'Options'#11#13'tvoAutoExpand'#17'tvoAutoItemHeight'#16'tvoHideSel'
|
+'tItemHeight'#2#19#9'PopupMenu'#7#12'COCPopupMenu'#9'RowSelect'#9#8'TabOrder'
|
||||||
+'ection'#21'tvoKeepCollapsedNodes'#12'tvoRowSelect'#14'tvoShowButtons'#12'tv'
|
+#2#0#8'OnEdited'#7#17'COCTreeViewEdited'#9'OnEditing'#7#18'COCTreeViewEditin'
|
||||||
+'oShowLines'#11'tvoShowRoot'#17'tvoShowSeparators'#11'tvoToolTips'#0#0#0#10
|
+'g'#7'Options'#11#13'tvoAutoExpand'#17'tvoAutoItemHeight'#16'tvoHideSelectio'
|
||||||
+'TPopupMenu'#12'COCPopupMenu'#7'OnPopup'#7#17'COCPopupMenuPopup'#4'left'#2'0'
|
+'n'#21'tvoKeepCollapsedNodes'#12'tvoRowSelect'#14'tvoShowButtons'#12'tvoShow'
|
||||||
+#3'top'#2'0'#0#0#0
|
+'Lines'#11'tvoShowRoot'#17'tvoShowSeparators'#11'tvoToolTips'#0#0#0#10'TPopu'
|
||||||
|
+'pMenu'#12'COCPopupMenu'#7'OnPopup'#7#17'COCPopupMenuPopup'#4'left'#2'0'#3't'
|
||||||
|
+'op'#2'0'#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -81,9 +81,9 @@ type
|
|||||||
property DefaultValue: string read FDefaultValue write FDefaultValue;
|
property DefaultValue: string read FDefaultValue write FDefaultValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCompOptsConditionalsFrame }
|
{ TCompOptsCondTreeFrame }
|
||||||
|
|
||||||
TCompOptsConditionalsFrame = class(TFrame)
|
TCompOptsCondTreeFrame = class(TFrame)
|
||||||
COCTreeView: TTreeView;
|
COCTreeView: TTreeView;
|
||||||
COCPopupMenu: TPopupMenu;
|
COCPopupMenu: TPopupMenu;
|
||||||
procedure COCPopupMenuPopup(Sender: TObject);
|
procedure COCPopupMenuPopup(Sender: TObject);
|
||||||
@ -106,49 +106,49 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{ TCompOptsConditionalsFrame }
|
{ TCompOptsCondTreeFrame }
|
||||||
|
|
||||||
procedure TCompOptsConditionalsFrame.COCPopupMenuPopup(Sender: TObject);
|
procedure TCompOptsCondTreeFrame.COCPopupMenuPopup(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
COCPopupMenu.Items.Clear;
|
COCPopupMenu.Items.Clear;
|
||||||
Editor.FillPopupMenu(COCPopupMenu);
|
Editor.FillPopupMenu(COCPopupMenu);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompOptsConditionalsFrame.COCTreeViewEdited(Sender: TObject;
|
procedure TCompOptsCondTreeFrame.COCTreeViewEdited(Sender: TObject;
|
||||||
Node: TTreeNode; var S: string);
|
Node: TTreeNode; var S: string);
|
||||||
begin
|
begin
|
||||||
Editor.TreeViewEdited(Sender,Node,S);
|
Editor.TreeViewEdited(Sender,Node,S);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompOptsConditionalsFrame.COCTreeViewEditing(Sender: TObject;
|
procedure TCompOptsCondTreeFrame.COCTreeViewEditing(Sender: TObject;
|
||||||
Node: TTreeNode; var AllowEdit: Boolean);
|
Node: TTreeNode; var AllowEdit: Boolean);
|
||||||
begin
|
begin
|
||||||
Editor.TreeViewEditing(Sender,Node,AllowEdit);
|
Editor.TreeViewEditing(Sender,Node,AllowEdit);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompOptsConditionalsFrame.SetConditionals(
|
procedure TCompOptsCondTreeFrame.SetConditionals(
|
||||||
const AValue: TCompOptConditionals);
|
const AValue: TCompOptConditionals);
|
||||||
begin
|
begin
|
||||||
Editor.Conditionals:=AValue;
|
Editor.Conditionals:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompOptsConditionalsFrame.SetAllowedValueTypes(
|
procedure TCompOptsCondTreeFrame.SetAllowedValueTypes(
|
||||||
const AValue: TCOCValueTypes);
|
const AValue: TCOCValueTypes);
|
||||||
begin
|
begin
|
||||||
Editor.AllowedValueTypes:=AValue;
|
Editor.AllowedValueTypes:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCompOptsConditionalsFrame.GetConditionals: TCompOptConditionals;
|
function TCompOptsCondTreeFrame.GetConditionals: TCompOptConditionals;
|
||||||
begin
|
begin
|
||||||
Result:=Editor.Conditionals;
|
Result:=Editor.Conditionals;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCompOptsConditionalsFrame.GetAllowedValueTypes: TCOCValueTypes;
|
function TCompOptsCondTreeFrame.GetAllowedValueTypes: TCOCValueTypes;
|
||||||
begin
|
begin
|
||||||
Result:=Editor.AllowedValueTypes;
|
Result:=Editor.AllowedValueTypes;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TCompOptsConditionalsFrame.Create(TheOwner: TComponent);
|
constructor TCompOptsCondTreeFrame.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
FEditor:=TCompOptsExprEditor.Create(Self);
|
FEditor:=TCompOptsExprEditor.Create(Self);
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
<PackageName Value="SynEdit"/>
|
<PackageName Value="SynEdit"/>
|
||||||
</Item4>
|
</Item4>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="68">
|
<Units Count="69">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="lazarus.pp"/>
|
<Filename Value="lazarus.pp"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -264,7 +264,7 @@
|
|||||||
<Unit32>
|
<Unit32>
|
||||||
<Filename Value="frames/compiler_condtree.pas"/>
|
<Filename Value="frames/compiler_condtree.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ComponentName Value="CompOptsConditionalsFrame"/>
|
<ComponentName Value="CompOptsCondTreeFrame"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Frame"/>
|
<ResourceBaseClass Value="Frame"/>
|
||||||
<UnitName Value="Compiler_CondTree"/>
|
<UnitName Value="Compiler_CondTree"/>
|
||||||
@ -512,6 +512,13 @@
|
|||||||
<ResourceBaseClass Value="Frame"/>
|
<ResourceBaseClass Value="Frame"/>
|
||||||
<UnitName Value="compiler_compilation_options"/>
|
<UnitName Value="compiler_compilation_options"/>
|
||||||
</Unit67>
|
</Unit67>
|
||||||
|
<Unit68>
|
||||||
|
<Filename Value="frames/compiler_conditionals_options.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="CompOptsConditionalsFrame"/>
|
||||||
|
<ResourceBaseClass Value="Frame"/>
|
||||||
|
<UnitName Value="compiler_conditionals_options"/>
|
||||||
|
</Unit68>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -76,7 +76,7 @@ uses
|
|||||||
SQLDBLaz, DBFLaz,
|
SQLDBLaz, DBFLaz,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
MainBase;
|
MainBase, compiler_conditionals_options;
|
||||||
|
|
||||||
{$I revision.inc}
|
{$I revision.inc}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user