Changeset 61 for trunk/IDE/Forms
- Timestamp:
- Jul 17, 2012, 9:15:42 AM (12 years ago)
- Location:
- trunk/IDE/Forms
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/UFormMain.lfm
r60 r61 116 116 Top = 26 117 117 Width = 200 118 ActivePage = TabSheet TargetProject118 ActivePage = TabSheetExternalProducer 119 119 Align = alRight 120 TabIndex = 2120 TabIndex = 3 121 121 TabOrder = 3 122 122 TabPosition = tpRight … … 129 129 object TabSheetTargetProject: TTabSheet 130 130 Caption = 'Target project' 131 end 132 object TabSheetExternalProducer: TTabSheet 133 Caption = 'External producer' 131 134 end 132 135 end -
trunk/IDE/Forms/UFormMain.lrt
r50 r61 3 3 TFORMMAIN.TABSHEETCODETREE.CAPTION=Code Tree 4 4 TFORMMAIN.TABSHEETTARGETPROJECT.CAPTION=Target project 5 TFORMMAIN.TABSHEETEXTERNALPRODUCER.CAPTION=External producer 5 6 TFORMMAIN.TABSHEETMESSAGES.CAPTION=Messages 6 7 TFORMMAIN.TABSHEETBREAKPOINTS.CAPTION=Breakpoints -
trunk/IDE/Forms/UFormMain.pas
r60 r61 90 90 Splitter2: TSplitter; 91 91 Splitter3: TSplitter; 92 TabSheetExternalProducer: TTabSheet; 92 93 TabSheetProject: TTabSheet; 93 94 TabSheetCodeTree: TTabSheet; … … 143 144 procedure UpdateMenu; 144 145 procedure UpdateTitle; 146 procedure ProducerProcessOutput(Text: string); 145 147 public 146 148 procedure LoadFromRegistry(Root: HKEY; Key: string); … … 162 164 UCore, UFormMessages, UFormSourceCode, UFormProject, UCommon, UFormAbout, UFormOptions, 163 165 UFormTargets, UTarget, UExecutor, UFormProjectNew, 164 UFormTargetProject ;166 UFormTargetProject, UFormExternalProducerOutput; 165 167 166 168 { TFormMain } … … 189 191 Compiler.Compile; 190 192 TargetProject.Files.LoadFromList(Compiler.TargetFiles.Files); 193 TargetProject.MainSource := TProjectFile(TargetProject.Files.First); 191 194 FormTargetProject.UpdateInterface; 195 196 FormExternalProducerOutput.Memo1.Clear; 197 if Assigned(Compiler.Target.Producer) then 198 with Compiler.Target.Producer do begin 199 FormExternalProducerOutput.Memo1.Lines.Add(CompilerPath + ' ' + Format(CompilerParameters, [TargetProject.MainSource.AbsoluteFileName])); 200 ExternalExecute(CompilerPath + ' ' + Format(CompilerParameters, [TargetProject.MainSource.AbsoluteFileName])); 201 end; 192 202 end; 193 203 FormProject.TreeViewProjectChange(Self, FormProject.TreeViewProject.Selected); … … 344 354 FormTargetCode.Align := alClient; 345 355 FormTargetCode.Show; 356 FormExternalProducerOutput.ManualDock(TabSheetExternalProducer, nil, alClient); 357 FormExternalProducerOutput.Align := alClient; 358 FormExternalProducerOutput.Show; 346 359 PageControlRight.TabIndex := 0; 347 360 PageControlBottom.TabIndex := 0; … … 446 459 end; 447 460 461 procedure TFormMain.ProducerProcessOutput(Text: string); 462 begin 463 FormExternalProducerOutput.Memo1.Lines.Add(Text); 464 end; 465 448 466 procedure TFormMain.FormClose(Sender: TObject; var Action: TCloseAction); 449 467 begin … … 453 471 454 472 procedure TFormMain.FormCreate(Sender: TObject); 455 begin 473 var 474 I: Integer; 475 begin 476 with Core.Compiler.Targets do 477 for I := 0 to Count - 1 do 478 with TTarget(Items[I]) do 479 if Assigned(Producer) then 480 Producer.OnProcessOutput := ProducerProcessOutput; 456 481 end; 457 482 … … 517 542 if FormProjectNew.ShowModal = mrOk then begin 518 543 if Assigned(FormProjectNew.ListView1.Selected) then begin 519 Core.ProjectNew; 544 if TProjectTemplate(FormProjectNew.ListView1.Selected.Data).IsProject then 545 Core.ProjectNew; 520 546 TProjectTemplate(FormProjectNew.ListView1.Selected.Data).InitProject(Core.Project); 521 547 end; -
trunk/IDE/Forms/UFormProject.lfm
r57 r61 19 19 TabOrder = 0 20 20 OnChange = TreeViewProjectChange 21 OnDblClick = TreeViewProjectDblClick 21 22 Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw] 22 23 end -
trunk/IDE/Forms/UFormProject.pas
r56 r61 29 29 procedure AShowExecute(Sender: TObject); 30 30 procedure TreeViewProjectChange(Sender: TObject; Node: TTreeNode); 31 procedure TreeViewProjectDblClick(Sender: TObject); 31 32 private 32 33 procedure UpdateProjectFiles(Node: TTreeNode; Files: TProjectFileList); … … 46 47 UCore, UFormMain, UFormSourceCode, UFormTargetCode, UFormCodeTree; 47 48 49 resourcestring 50 SRenameSourceFile = 'Rename source file'; 51 SEnterNewFileName = 'Enter new file name'; 52 48 53 { TFormProject } 49 54 … … 54 59 if Assigned(Node) then begin 55 60 if TProjectFile(Node.Data) is TProjectFile then begin 56 ProjectFile := TProjectFile(Node.Data);57 SynEditSource.Lines.Assign(TProjectFile(Node.Data).Source);61 TreeViewProject.PopupMenu := PopupMenuFile; 62 AShow.Execute; 58 63 (* if FileExists(TProjectFile(Node.Data).ProducedFileName) then 59 64 CompiledForm.SynEdit1.Lines.LoadFromFile(FileName) else … … 78 83 //CodeTreeForm.TreeView1.Assign(TProducerTreeView(Compiler.Producer).TreeView); 79 84 *) 80 end; 85 end else 86 TreeViewProject.PopupMenu := nil; 81 87 end; 88 end; 89 90 procedure TFormProject.TreeViewProjectDblClick(Sender: TObject); 91 begin 92 AShow.Execute; 82 93 end; 83 94 … … 95 106 procedure TFormProject.ADeleteExecute(Sender: TObject); 96 107 begin 97 108 if Assigned(TreeViewProject.Selected) then 109 Core.Project.Files.Remove(TreeViewProject.Selected.Data); 110 UpdateProjectTree; 98 111 end; 99 112 100 113 procedure TFormProject.ARenameExecute(Sender: TObject); 114 var 115 NewName: string; 101 116 begin 102 117 if Assigned(TreeViewProject.Selected) then begin 118 NewName := TProjectFile(TreeViewProject.Selected.Data).FileName; 119 if InputQuery(SRenameSourceFile, SEnterNewFileName, NewName) then 120 TProjectFile(TreeViewProject.Selected.Data).FileName := NewName; 121 UpdateProjectTree; 122 end; 103 123 end; 104 124 105 125 procedure TFormProject.AShowExecute(Sender: TObject); 106 126 begin 107 127 if Assigned(TreeViewProject.Selected) then 128 FormSourceCode.SynEditSource.Lines.Assign(TProjectFile(TreeViewProject.Selected.Data).Source); 108 129 end; 109 130 -
trunk/IDE/Forms/UFormProjectNew.pas
r57 r61 74 74 with Core do 75 75 for I := 0 to ProjectTemplates.Count - 1 do 76 with TProjectTemplate(ProjectTemplates[I]) do begin 76 with TProjectTemplate(ProjectTemplates[I]) do 77 if (not Assigned(Core.Project) and IsProject) or Assigned(Core.Project) then begin 77 78 NewItem := ListView1.Items.Add; 78 79 NewItem.Caption := Name;
Note:
See TracChangeset
for help on using the changeset viewer.