From a44af1c9a578e788a35f473009665a59d3695753 Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 9 Jan 2010 14:58:39 +0000 Subject: [PATCH] IDE: started conditionals frame git-svn-id: trunk@23405 - --- .gitattributes | 3 ++ ide/compileroptionsdlg.pp | 2 +- ide/frames/compiler_conditionals_options.lfm | 49 ++++++++++++++++++ ide/frames/compiler_conditionals_options.lrs | 16 ++++++ ide/frames/compiler_conditionals_options.pas | 52 ++++++++++++++++++++ ide/frames/compiler_condtree.lfm | 10 ++-- ide/frames/compiler_condtree.lrs | 28 ++++++----- ide/frames/compiler_condtree.pas | 22 ++++----- ide/lazarus.lpi | 11 ++++- ide/lazarus.pp | 2 +- 10 files changed, 162 insertions(+), 33 deletions(-) create mode 100644 ide/frames/compiler_conditionals_options.lfm create mode 100644 ide/frames/compiler_conditionals_options.lrs create mode 100644 ide/frames/compiler_conditionals_options.pas diff --git a/.gitattributes b/.gitattributes index 12038f809f..dd06b6887c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/ide/compileroptionsdlg.pp b/ide/compileroptionsdlg.pp index 42b41d822c..96a1fef512 100644 --- a/ide/compileroptionsdlg.pp +++ b/ide/compileroptionsdlg.pp @@ -181,7 +181,7 @@ type { Conditionals } ConditionalPage: TPage; - ConditionalOptionsFrame: TCompOptsConditionalsFrame; + ConditionalOptionsFrame: TCompOptsCondTreeFrame; ConditionalsGroupBox: TGroupBox; BuildVarsFrame: TCompOptBuildVarsFrame; diff --git a/ide/frames/compiler_conditionals_options.lfm b/ide/frames/compiler_conditionals_options.lfm new file mode 100644 index 0000000000..cdeb8dd960 --- /dev/null +++ b/ide/frames/compiler_conditionals_options.lfm @@ -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 diff --git a/ide/frames/compiler_conditionals_options.lrs b/ide/frames/compiler_conditionals_options.lrs new file mode 100644 index 0000000000..dcde1f7461 --- /dev/null +++ b/ide/frames/compiler_conditionals_options.lrs @@ -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 +]); diff --git a/ide/frames/compiler_conditionals_options.pas b/ide/frames/compiler_conditionals_options.pas new file mode 100644 index 0000000000..dc24a2737b --- /dev/null +++ b/ide/frames/compiler_conditionals_options.pas @@ -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 . 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. + diff --git a/ide/frames/compiler_condtree.lfm b/ide/frames/compiler_condtree.lfm index 0de7c88e71..9c771edfbd 100644 --- a/ide/frames/compiler_condtree.lfm +++ b/ide/frames/compiler_condtree.lfm @@ -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 diff --git a/ide/frames/compiler_condtree.lrs b/ide/frames/compiler_condtree.lrs index d6281e60e1..80e1e1cfd5 100644 --- a/ide/frames/compiler_condtree.lrs +++ b/ide/frames/compiler_condtree.lrs @@ -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 ]); diff --git a/ide/frames/compiler_condtree.pas b/ide/frames/compiler_condtree.pas index f440893aee..e16f4601de 100644 --- a/ide/frames/compiler_condtree.pas +++ b/ide/frames/compiler_condtree.pas @@ -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); diff --git a/ide/lazarus.lpi b/ide/lazarus.lpi index a0b2450a4d..3d5e6f2d15 100644 --- a/ide/lazarus.lpi +++ b/ide/lazarus.lpi @@ -43,7 +43,7 @@ - + @@ -264,7 +264,7 @@ - + @@ -512,6 +512,13 @@ + + + + + + + diff --git a/ide/lazarus.pp b/ide/lazarus.pp index 01619b3085..2cc36f7856 100644 --- a/ide/lazarus.pp +++ b/ide/lazarus.pp @@ -76,7 +76,7 @@ uses SQLDBLaz, DBFLaz, {$ENDIF} {$ENDIF} - MainBase; + MainBase, compiler_conditionals_options; {$I revision.inc}