mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 08:57:47 +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.lrs 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.lrs svneol=native#text/pascal
|
||||
ide/frames/compiler_condtree.pas svneol=native#text/plain
|
||||
|
@ -181,7 +181,7 @@ type
|
||||
|
||||
{ Conditionals }
|
||||
ConditionalPage: TPage;
|
||||
ConditionalOptionsFrame: TCompOptsConditionalsFrame;
|
||||
ConditionalOptionsFrame: TCompOptsCondTreeFrame;
|
||||
ConditionalsGroupBox: TGroupBox;
|
||||
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
|
||||
Height = 170
|
||||
Top = 0
|
||||
Width = 385
|
||||
ClientHeight = 166
|
||||
ClientWidth = 381
|
||||
ClientHeight = 170
|
||||
ClientWidth = 385
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
DesignLeft = 449
|
||||
DesignTop = 401
|
||||
object COCTreeView: TTreeView
|
||||
Left = 0
|
||||
Height = 166
|
||||
Height = 170
|
||||
Top = 0
|
||||
Width = 381
|
||||
Width = 385
|
||||
Align = alClient
|
||||
AutoExpand = True
|
||||
DefaultItemHeight = 19
|
||||
|
@ -1,14 +1,16 @@
|
||||
LazarusResources.Add('TCompOptsConditionalsFrame','FORMDATA',[
|
||||
'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
|
||||
+'ClientWidth'#3'}'#1#8'TabOrder'#2#0#7'Visible'#8#10'DesignLeft'#3#193#1#9'D'
|
||||
+'esignTop'#3#145#1#0#9'TTreeView'#11'COCTreeView'#4'Left'#2#0#6'Height'#3#166
|
||||
+#0#3'Top'#2#0#5'Width'#3'}'#1#5'Align'#7#8'alClient'#10'AutoExpand'#9#17'Def'
|
||||
+'aultItemHeight'#2#19#9'PopupMenu'#7#12'COCPopupMenu'#9'RowSelect'#9#8'TabOr'
|
||||
+'der'#2#0#8'OnEdited'#7#17'COCTreeViewEdited'#9'OnEditing'#7#18'COCTreeViewE'
|
||||
+'diting'#7'Options'#11#13'tvoAutoExpand'#17'tvoAutoItemHeight'#16'tvoHideSel'
|
||||
+'ection'#21'tvoKeepCollapsedNodes'#12'tvoRowSelect'#14'tvoShowButtons'#12'tv'
|
||||
+'oShowLines'#11'tvoShowRoot'#17'tvoShowSeparators'#11'tvoToolTips'#0#0#0#10
|
||||
+'TPopupMenu'#12'COCPopupMenu'#7'OnPopup'#7#17'COCPopupMenuPopup'#4'left'#2'0'
|
||||
+#3'top'#2'0'#0#0#0
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TCompOptsCondTreeFrame','FORMDATA',[
|
||||
'TPF0'#22'TCompOptsCondTreeFrame'#21'CompOptsCondTreeFrame'#4'Left'#2#0#6'Hei'
|
||||
+'ght'#3#170#0#3'Top'#2#0#5'Width'#3#129#1#12'ClientHeight'#3#170#0#11'Client'
|
||||
+'Width'#3#129#1#8'TabOrder'#2#0#7'Visible'#8#10'DesignLeft'#3#193#1#9'Design'
|
||||
+'Top'#3#145#1#0#9'TTreeView'#11'COCTreeView'#4'Left'#2#0#6'Height'#3#170#0#3
|
||||
+'Top'#2#0#5'Width'#3#129#1#5'Align'#7#8'alClient'#10'AutoExpand'#9#17'Defaul'
|
||||
+'tItemHeight'#2#19#9'PopupMenu'#7#12'COCPopupMenu'#9'RowSelect'#9#8'TabOrder'
|
||||
+#2#0#8'OnEdited'#7#17'COCTreeViewEdited'#9'OnEditing'#7#18'COCTreeViewEditin'
|
||||
+'g'#7'Options'#11#13'tvoAutoExpand'#17'tvoAutoItemHeight'#16'tvoHideSelectio'
|
||||
+'n'#21'tvoKeepCollapsedNodes'#12'tvoRowSelect'#14'tvoShowButtons'#12'tvoShow'
|
||||
+'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;
|
||||
end;
|
||||
|
||||
{ TCompOptsConditionalsFrame }
|
||||
{ TCompOptsCondTreeFrame }
|
||||
|
||||
TCompOptsConditionalsFrame = class(TFrame)
|
||||
TCompOptsCondTreeFrame = class(TFrame)
|
||||
COCTreeView: TTreeView;
|
||||
COCPopupMenu: TPopupMenu;
|
||||
procedure COCPopupMenuPopup(Sender: TObject);
|
||||
@ -106,49 +106,49 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
{ TCompOptsConditionalsFrame }
|
||||
{ TCompOptsCondTreeFrame }
|
||||
|
||||
procedure TCompOptsConditionalsFrame.COCPopupMenuPopup(Sender: TObject);
|
||||
procedure TCompOptsCondTreeFrame.COCPopupMenuPopup(Sender: TObject);
|
||||
begin
|
||||
COCPopupMenu.Items.Clear;
|
||||
Editor.FillPopupMenu(COCPopupMenu);
|
||||
end;
|
||||
|
||||
procedure TCompOptsConditionalsFrame.COCTreeViewEdited(Sender: TObject;
|
||||
procedure TCompOptsCondTreeFrame.COCTreeViewEdited(Sender: TObject;
|
||||
Node: TTreeNode; var S: string);
|
||||
begin
|
||||
Editor.TreeViewEdited(Sender,Node,S);
|
||||
end;
|
||||
|
||||
procedure TCompOptsConditionalsFrame.COCTreeViewEditing(Sender: TObject;
|
||||
procedure TCompOptsCondTreeFrame.COCTreeViewEditing(Sender: TObject;
|
||||
Node: TTreeNode; var AllowEdit: Boolean);
|
||||
begin
|
||||
Editor.TreeViewEditing(Sender,Node,AllowEdit);
|
||||
end;
|
||||
|
||||
procedure TCompOptsConditionalsFrame.SetConditionals(
|
||||
procedure TCompOptsCondTreeFrame.SetConditionals(
|
||||
const AValue: TCompOptConditionals);
|
||||
begin
|
||||
Editor.Conditionals:=AValue;
|
||||
end;
|
||||
|
||||
procedure TCompOptsConditionalsFrame.SetAllowedValueTypes(
|
||||
procedure TCompOptsCondTreeFrame.SetAllowedValueTypes(
|
||||
const AValue: TCOCValueTypes);
|
||||
begin
|
||||
Editor.AllowedValueTypes:=AValue;
|
||||
end;
|
||||
|
||||
function TCompOptsConditionalsFrame.GetConditionals: TCompOptConditionals;
|
||||
function TCompOptsCondTreeFrame.GetConditionals: TCompOptConditionals;
|
||||
begin
|
||||
Result:=Editor.Conditionals;
|
||||
end;
|
||||
|
||||
function TCompOptsConditionalsFrame.GetAllowedValueTypes: TCOCValueTypes;
|
||||
function TCompOptsCondTreeFrame.GetAllowedValueTypes: TCOCValueTypes;
|
||||
begin
|
||||
Result:=Editor.AllowedValueTypes;
|
||||
end;
|
||||
|
||||
constructor TCompOptsConditionalsFrame.Create(TheOwner: TComponent);
|
||||
constructor TCompOptsCondTreeFrame.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
FEditor:=TCompOptsExprEditor.Create(Self);
|
||||
|
@ -43,7 +43,7 @@
|
||||
<PackageName Value="SynEdit"/>
|
||||
</Item4>
|
||||
</RequiredPackages>
|
||||
<Units Count="68">
|
||||
<Units Count="69">
|
||||
<Unit0>
|
||||
<Filename Value="lazarus.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -264,7 +264,7 @@
|
||||
<Unit32>
|
||||
<Filename Value="frames/compiler_condtree.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="CompOptsConditionalsFrame"/>
|
||||
<ComponentName Value="CompOptsCondTreeFrame"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="Compiler_CondTree"/>
|
||||
@ -512,6 +512,13 @@
|
||||
<ResourceBaseClass Value="Frame"/>
|
||||
<UnitName Value="compiler_compilation_options"/>
|
||||
</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>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
@ -76,7 +76,7 @@ uses
|
||||
SQLDBLaz, DBFLaz,
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
MainBase;
|
||||
MainBase, compiler_conditionals_options;
|
||||
|
||||
{$I revision.inc}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user