Changeset 62 for branches/Transpascal/Forms
- Timestamp:
- Oct 15, 2010, 7:09:49 AM (15 years ago)
- Location:
- branches/Transpascal/Forms
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Transpascal/Forms/UCodeForm.lfm
r61 r62 69 69 Priority = 0 70 70 end> 71 Highlighter = SynPasSyn1 71 72 Keystrokes = < 72 73 item -
branches/Transpascal/Forms/UMainForm.lfm
r61 r62 1 1 object MainForm: TMainForm 2 Left = 1 143 Height = 50 44 Top = 1 225 Width = 8612 Left = 142 3 Height = 501 4 Top = 113 5 Width = 695 6 6 Caption = 'Transpascal IDE' 7 ClientHeight = 5048 ClientWidth = 8617 ClientHeight = 482 8 ClientWidth = 695 9 9 Font.Height = -11 10 10 Font.Name = 'Tahoma' … … 20 20 Left = 0 21 21 Height = 5 22 Top = 4 8023 Width = 86122 Top = 477 23 Width = 695 24 24 Align = alBottom 25 25 ResizeAnchor = akBottom … … 27 27 object DockPanel: TPanel 28 28 Left = 0 29 Height = 45 429 Height = 451 30 30 Top = 26 31 Width = 86131 Width = 695 32 32 Align = alClient 33 33 BevelOuter = bvNone … … 38 38 Height = 26 39 39 Top = 0 40 Width = 86140 Width = 695 41 41 Caption = 'ToolBar1' 42 42 TabOrder = 2 … … 47 47 Width = 100 48 48 ItemHeight = 13 49 ItemIndex = 1 50 Items.Strings = ( 51 'Pascal' 52 'C' 53 'AS8051' 54 'XML' 55 ) 56 Style = csDropDownList 49 57 TabOrder = 0 50 Text = 'C omboBox1'58 Text = 'C' 51 59 end 52 60 object Button1: TButton -
branches/Transpascal/Forms/UMainForm.pas
r61 r62 9 9 Dialogs, StdCtrls, UCompiler, UProducerAsm8051, 10 10 UProducerC, ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, UProducerTreeView, 11 UProducerPascal, Contnrs, UProject, FileUtil, Menus, ActnList, UCoolDocking; 11 UProducerPascal, Contnrs, UProject, FileUtil, Menus, ActnList, UCoolDocking, 12 UCompiledForm, UCodeTreeForm; 12 13 13 14 const … … 51 52 procedure Splitter2CanResize(Sender: TObject; var NewSize: Integer; 52 53 var Accept: Boolean); 53 procedure TreeViewProjectChange(Sender: TObject; Node: TTreeNode);54 54 private 55 55 procedure LoadErrorMessages; 56 56 procedure UpdateProjectTree; 57 57 procedure UpdateProjectGroup(Node: TTreeNode; Group: TProjectGroup); 58 function GetSource(Name: string; Source: TStringList): Boolean;59 58 procedure DockInit; 60 59 public 61 60 Project: TProject; 62 ProducerControl: TControl;63 61 Compiler: TCompiler; 62 function GetSource(Name: string; Source: TStringList): Boolean; 64 63 end; 65 64 … … 80 79 I: Integer; 81 80 begin 82 ProducerControl.Free;83 81 if ComboBox1.ItemIndex = 0 then begin 84 82 Compiler.Producer.Free; … … 96 94 Compiler.Producer.Free; 97 95 Compiler.Producer := TProducerTreeView.Create; 98 ProducerControl := TTreeView.Create(Self);99 ProducerControl.Parent := DockPanel;100 ProducerControl.Align := alClient;101 // TProducerTreeView(Compiler.Producer).TreeView := TTreeView(ProducerControl);102 96 end; 103 97 … … 107 101 with TProjectFile(Project.Items[0]) do begin 108 102 Compiler.Compile(Parent.GetDir + Name, Source); 109 end;110 111 if ComboBox1.ItemIndex = 0 then begin112 ProducerControl := TMemo.Create(Self);113 ProducerControl.Parent := DockPanel;114 ProducerControl.Align := alClient;115 ProducerControl.Font.Name := 'Courier New';116 TMemo(ProducerControl).ScrollBars := ssAutoBoth;117 end else118 if ComboBox1.ItemIndex = 1 then begin119 ProducerControl := TMemo.Create(Self);120 ProducerControl.Parent := DockPanel;121 ProducerControl.Align := alClient;122 ProducerControl.Font.Name := 'Courier New';123 TMemo(ProducerControl).ScrollBars := ssAutoBoth;124 end else125 if ComboBox1.ItemIndex = 2 then begin126 ProducerControl := TMemo.Create(Self);127 ProducerControl.Parent := DockPanel;128 ProducerControl.Align := alClient;129 ProducerControl.Font.Name := 'Courier New';130 TMemo(ProducerControl).ScrollBars := ssAutoBoth;131 end else132 if ComboBox1.ItemIndex = 3 then begin133 103 end; 134 104 … … 219 189 var 220 190 Container1: TCoolDockConjoinForm; 191 Container2: TCoolDockConjoinForm; 221 192 begin 222 193 ProjectManager.ManualDock(DockPanel, nil, alLeft); … … 228 199 Container1.ManualDock(DockPanel, nil, alRight); 229 200 230 CodeForm.ManualDock(Container1.Panel, nil, alTop); 231 CodeForm.Show; 201 CodeTreeForm.ManualDock(DockPanel, nil, alLeft); 202 CodeTreeForm.Show; 203 Container1.Parent.Parent.Width := MainForm.Width; 204 205 Container2 := TCoolDockManager(DockPanel.DockManager).CreateContainer(alRight); 206 Container2.Caption := 'Panel'; 207 Container2.Name := 'Tools2'; 208 Container2.ManualDock(Container1.Panel, nil, alRight); 209 232 210 MessagesForm.ManualDock(Container1.Panel, nil, alBottom); 233 211 MessagesForm.Show; 234 212 213 CodeForm.ManualDock(Container2.Panel, nil, alTop); 214 CodeForm.Show; 215 216 CompiledForm.ManualDock(Container2.Panel, nil, alTop); 217 CompiledForm.Show; 218 219 TCoolDockManager(Container2.Panel.DockManager).DockStyle := dsTabs; 220 235 221 ProjectManager.Parent.Parent.Width := 200; 236 Co deForm.Parent.Parent.Height := MainForm.Height;222 Container2.Parent.Parent.Height := MainForm.Height; 237 223 end; 238 224 -
branches/Transpascal/Forms/UProjectManager.pas
r61 r62 1 1 unit UProjectManager; 2 3 {$mode objfpc}{$H+}4 2 5 3 interface … … 30 28 31 29 uses 32 UMainForm, UCodeForm ;30 UMainForm, UCodeForm, UCompiledForm, UCodeTreeForm, UProducerTreeView; 33 31 34 32 { TProjectManager } … … 45 43 FileName := Compiler.CompiledFolder + DirectorySeparator + 46 44 Compiler.Producer.ClassName + DirectorySeparator + ExtractFileNameOnly(TProjectFile(Node.Data).Name) + Compiler.Producer.FileExtension; 47 if ProducerControl is TMemo then48 45 if FileExists(FileName) then 49 TMemo(ProducerControl).Lines.LoadFromFile(FileName) else 50 TMemo(ProducerControl).Lines.Clear; 51 //if ProducerControl is TTreeView then 52 // TTreeView(ProducerControl).Assign(TProjectFile(Node.Data).ProducedCode); 46 CompiledForm.SynEdit1.Lines.LoadFromFile(FileName) else 47 CompiledForm.SynEdit1.Lines.Clear; 48 49 // Load code tree view 50 Compiler.Producer.Free; 51 Compiler.Producer := TProducerTreeView.Create; 52 Compiler.Init; 53 Compiler.Parser.OnGetSource := GetSource; 54 with TProjectFile(Project.Items[0]) do begin 55 Compiler.Compile(Parent.GetDir + Name, Source); 56 end; 57 //CodeTreeForm.TreeView1.Assign(TProducerTreeView(Compiler.Producer).TreeView); 53 58 end; 54 59 end;
Note:
See TracChangeset
for help on using the changeset viewer.