Changeset 133 for trunk/Forms
- Timestamp:
- Mar 4, 2022, 10:57:08 PM (3 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r131 r133 1 1 object FormMain: TFormMain 2 2 Left = 430 3 Height = 7 033 Height = 732 4 4 Top = 249 5 Width = 10 325 Width = 1075 6 6 Caption = 'LazFuck' 7 ClientHeight = 6 698 ClientWidth = 10 329 DesignTimePPI = 1 447 ClientHeight = 697 8 ClientWidth = 1075 9 DesignTimePPI = 150 10 10 Menu = MainMenu1 11 11 OnClose = FormClose … … 18 18 object StatusBarMain: TStatusBar 19 19 Left = 0 20 Height = 2 721 Top = 6 4222 Width = 10 3220 Height = 28 21 Top = 669 22 Width = 1075 23 23 Panels = < 24 24 item 25 Width = 8 425 Width = 88 26 26 end 27 27 item 28 Width = 8 428 Width = 88 29 29 end 30 30 item 31 Width = 9631 Width = 100 32 32 end> 33 33 ParentFont = False … … 36 36 object ToolBarMain: TToolBar 37 37 Left = 0 38 Height = 3 338 Height = 34 39 39 Top = 0 40 Width = 10 3240 Width = 1075 41 41 Images = Core.ImageListMain 42 42 ParentFont = False … … 50 50 end 51 51 object ToolButton2: TToolButton 52 Left = 3 652 Left = 37 53 53 Top = 2 54 54 Action = AProjectOpen … … 57 57 end 58 58 object ToolButton3: TToolButton 59 Left = 8959 Left = 92 60 60 Top = 2 61 61 Action = AProjectSave 62 62 end 63 63 object ToolButton4: TToolButton 64 Left = 12 464 Left = 128 65 65 Top = 2 66 66 Action = AProjectClose 67 67 end 68 68 object ToolButton5: TToolButton 69 Left = 19470 Height = 3 369 Left = 200 70 Height = 34 71 71 Top = 2 72 72 Style = tbsSeparator 73 73 end 74 74 object ToolButton6: TToolButton 75 Left = 2 3775 Left = 244 76 76 Top = 2 77 77 Action = AProgramRun 78 78 end 79 79 object ToolButton7: TToolButton 80 Left = 20 280 Left = 208 81 81 Top = 2 82 82 Action = AProgramCompile 83 83 end 84 84 object ToolButton8: TToolButton 85 Left = 1 5985 Left = 164 86 86 Top = 2 87 87 Action = AOptions 88 88 end 89 89 object ToolButton9: TToolButton 90 Left = 3 4290 Left = 352 91 91 Top = 2 92 92 Action = ABreakpointToggle 93 93 end 94 94 object ToolButton10: TToolButton 95 Left = 2 7295 Left = 280 96 96 Top = 2 97 97 Action = AProgramPause 98 98 end 99 99 object ToolButton11: TToolButton 100 Left = 3 07100 Left = 316 101 101 Top = 2 102 102 Action = AProgramStop 103 103 end 104 104 object ToolButton12: TToolButton 105 Left = 3 77105 Left = 388 106 106 Top = 2 107 107 Action = AProgramStepOver 108 108 end 109 109 object ToolButton13: TToolButton 110 Left = 4 12110 Left = 424 111 111 Top = 2 112 112 Action = AProgramStepInto 113 113 end 114 114 object ToolButton14: TToolButton 115 Left = 4 47115 Left = 460 116 116 Top = 2 117 117 Action = AProgramStepOut 118 118 end 119 119 object ToolButton15: TToolButton 120 Left = 4 82120 Left = 496 121 121 Top = 2 122 122 Action = AProgramRunToCursor 123 123 end 124 124 object ToolButtonTarget: TToolButton 125 Left = 5 17125 Left = 532 126 126 Hint = 'Target select' 127 127 Top = 2 … … 132 132 end 133 133 object PageControlRight: TPageControl 134 Left = 5 60135 Height = 6 09136 Top = 3 3137 Width = 4 72134 Left = 583 135 Height = 635 136 Top = 34 137 Width = 492 138 138 ActivePage = TabSheetDebug 139 139 Align = alRight … … 144 144 object TabSheetDebug: TTabSheet 145 145 Caption = 'Debug' 146 ClientHeight = 6 05147 ClientWidth = 390146 ClientHeight = 631 147 ClientWidth = 405 148 148 ParentFont = False 149 149 object PanelInput: TPanel 150 150 Left = 0 151 Height = 77151 Height = 80 152 152 Top = 0 153 Width = 390153 Width = 405 154 154 Align = alTop 155 155 BevelOuter = bvNone … … 161 161 Left = 0 162 162 Height = 6 163 Top = 77164 Width = 390163 Top = 80 164 Width = 405 165 165 Align = alTop 166 166 ResizeAnchor = akTop … … 168 168 object PanelOutput: TPanel 169 169 Left = 0 170 Height = 3 11171 Top = 8 3172 Width = 390170 Height = 324 171 Top = 86 172 Width = 405 173 173 Align = alTop 174 174 BevelOuter = bvNone … … 180 180 Left = 0 181 181 Height = 6 182 Top = 394183 Width = 390182 Top = 410 183 Width = 405 184 184 Align = alTop 185 185 ResizeAnchor = akTop … … 187 187 object PanelCPU: TPanel 188 188 Left = 0 189 Height = 10 3190 Top = 4 00191 Width = 390189 Height = 107 190 Top = 416 191 Width = 405 192 192 Align = alTop 193 193 BevelOuter = bvNone … … 199 199 Left = 0 200 200 Height = 6 201 Top = 5 03202 Width = 390201 Top = 523 202 Width = 405 203 203 Align = alTop 204 204 ResizeAnchor = akTop … … 206 206 object PanelMemory: TPanel 207 207 Left = 0 208 Height = 96209 Top = 5 09210 Width = 390208 Height = 102 209 Top = 529 210 Width = 405 211 211 Align = alClient 212 212 BevelOuter = bvNone … … 217 217 end 218 218 object Splitter1: TSplitter 219 Left = 5 54220 Height = 6 09221 Top = 3 3219 Left = 577 220 Height = 635 221 Top = 34 222 222 Width = 6 223 223 Align = alRight … … 226 226 object PanelLeft: TPanel 227 227 Left = 0 228 Height = 6 09229 Top = 3 3230 Width = 5 54228 Height = 635 229 Top = 34 230 Width = 577 231 231 Align = alClient 232 232 BevelOuter = bvNone 233 ClientHeight = 6 09234 ClientWidth = 5 54233 ClientHeight = 635 234 ClientWidth = 577 235 235 ParentFont = False 236 236 TabOrder = 4 237 237 object PageControlMain: TPageControl 238 238 Left = 0 239 Height = 4 61239 Height = 481 240 240 Top = 0 241 Width = 5 54241 Width = 577 242 242 ActivePage = TabSheetSource 243 243 Align = alClient … … 256 256 object PageControlBottom: TPageControl 257 257 Left = 0 258 Height = 14 2259 Top = 4 67260 Width = 5 54258 Height = 148 259 Top = 487 260 Width = 577 261 261 ActivePage = TabSheetMessages 262 262 Align = alBottom … … 274 274 Left = 0 275 275 Height = 6 276 Top = 4 61277 Width = 5 54276 Top = 481 277 Width = 577 278 278 Align = alBottom 279 279 ResizeAnchor = akBottom … … 282 282 object MainMenu1: TMainMenu 283 283 Images = Core.ImageListMain 284 Left = 2 59285 Top = 16 0284 Left = 270 285 Top = 167 286 286 object MenuItem1: TMenuItem 287 Caption = ' Project'287 Caption = 'File' 288 288 object MenuItem8: TMenuItem 289 289 Action = AProjectNew … … 311 311 end 312 312 end 313 object MenuItem24: TMenuItem 314 Caption = 'Edit' 315 object MenuItem25: TMenuItem 316 Action = FormSourceCode.AFormatSource 317 end 318 object MenuItem27: TMenuItem 319 Action = FormSourceCode.AShrinkSource 320 end 321 object MenuItem28: TMenuItem 322 Action = FormSourceCode.AGenerateNumber 323 end 324 end 313 325 object MenuItem9: TMenuItem 314 Caption = ' Program'326 Caption = 'Run' 315 327 object MenuItem11: TMenuItem 316 328 Action = AProgramCompile 317 329 end 330 object MenuItem20: TMenuItem 331 Action = AProgramCompileMultiple 332 end 318 333 object MenuItemTarget: TMenuItem 319 334 Caption = 'Target' … … 347 362 end 348 363 end 349 object MenuItem 24: TMenuItem364 object MenuItem18: TMenuItem 350 365 Caption = 'Tools' 351 object MenuItem25: TMenuItem352 Action = FormSourceCode.AFormatSource353 end354 object MenuItem27: TMenuItem355 Action = FormSourceCode.AShrinkSource356 end357 object MenuItem28: TMenuItem358 Action = FormSourceCode.AGenerateNumber359 end360 end361 object MenuItem18: TMenuItem362 Caption = 'View'363 366 object MenuItem22: TMenuItem 364 367 Action = AOptions … … 383 386 object ActionList1: TActionList 384 387 Images = Core.ImageListMain 385 Left = 2 59386 Top = 2 30388 Left = 270 389 Top = 240 387 390 object AProjectOpen: TAction 388 391 Category = 'Project' … … 525 528 OnExecute = AViewLogExecute 526 529 end 530 object AProgramCompileMultiple: TAction 531 Category = 'Program' 532 Caption = 'Compile multiple...' 533 OnExecute = AProgramCompileMultipleExecute 534 end 527 535 end 528 536 object OpenDialog1: TOpenDialog 529 537 DefaultExt = '.b' 530 538 Filter = 'BrainFuck (*.b)|*.b|Any file (*.*)|*.*' 531 Left = 67532 Top = 2 21539 Left = 70 540 Top = 230 533 541 end 534 542 object SaveDialog1: TSaveDialog 535 543 DefaultExt = '.b' 536 544 Filter = 'BrainFuck (*.b)|*.b|Any file (*.*)|*.*' 537 Left = 67538 Top = 288545 Left = 70 546 Top = 300 539 547 end 540 548 object TimerRefresh: TTimer 541 549 OnTimer = TimerRefreshTimer 542 Left = 67543 Top = 3 55550 Left = 70 551 Top = 370 544 552 end 545 553 object PopupMenuRecentFiles: TPopupMenu 546 Left = 67547 Top = 77554 Left = 70 555 Top = 80 548 556 end 549 557 object PopupMenuTargets: TPopupMenu 550 Left = 67 551 Top = 143 558 Images = Core.ImageListMain 559 Left = 70 560 Top = 149 552 561 end 553 562 end -
trunk/Forms/UFormMain.lrj
r113 r133 7 7 {"hash":205270389,"name":"tformmain.tabsheettarget.caption","sourcebytes":[84,97,114,103,101,116,32,99,111,100,101],"value":"Target code"}, 8 8 {"hash":212433139,"name":"tformmain.tabsheetmessages.caption","sourcebytes":[77,101,115,115,97,103,101,115],"value":"Messages"}, 9 {"hash": 127273972,"name":"tformmain.menuitem1.caption","sourcebytes":[80,114,111,106,101,99,116],"value":"Project"},9 {"hash":315429,"name":"tformmain.menuitem1.caption","sourcebytes":[70,105,108,101],"value":"File"}, 10 10 {"hash":131987540,"name":"tformmain.menuitemopenrecent.caption","sourcebytes":[79,112,101,110,32,114,101,99,101,110,116],"value":"Open recent"}, 11 {"hash":127264813,"name":"tformmain.menuitem9.caption","sourcebytes":[80,114,111,103,114,97,109],"value":"Program"}, 11 {"hash":310020,"name":"tformmain.menuitem24.caption","sourcebytes":[69,100,105,116],"value":"Edit"}, 12 {"hash":22974,"name":"tformmain.menuitem9.caption","sourcebytes":[82,117,110],"value":"Run"}, 12 13 {"hash":94932420,"name":"tformmain.menuitemtarget.caption","sourcebytes":[84,97,114,103,101,116],"value":"Target"}, 13 {"hash":5989939,"name":"tformmain.menuitem24.caption","sourcebytes":[84,111,111,108,115],"value":"Tools"}, 14 {"hash":380871,"name":"tformmain.menuitem18.caption","sourcebytes":[86,105,101,119],"value":"View"}, 14 {"hash":5989939,"name":"tformmain.menuitem18.caption","sourcebytes":[84,111,111,108,115],"value":"Tools"}, 15 15 {"hash":322608,"name":"tformmain.menuitem10.caption","sourcebytes":[72,101,108,112],"value":"Help"}, 16 16 {"hash":353982,"name":"tformmain.aprojectopen.caption","sourcebytes":[79,112,101,110],"value":"Open"}, … … 36 36 {"hash":248107685,"name":"tformmain.ashowsourceposition.caption","sourcebytes":[83,104,111,119,32,112,111,115,105,116,105,111,110,32,105,110,32,115,111,117,114,99,101],"value":"Show position in source"}, 37 37 {"hash":78944612,"name":"tformmain.aprogramshowexecutionpoint.caption","sourcebytes":[83,104,111,119,32,101,120,101,99,117,116,105,111,110,32,112,111,105,110,116],"value":"Show execution point"}, 38 {"hash":21335,"name":"tformmain.aviewlog.caption","sourcebytes":[76,111,103],"value":"Log"} 38 {"hash":21335,"name":"tformmain.aviewlog.caption","sourcebytes":[76,111,103],"value":"Log"}, 39 {"hash":226669790,"name":"tformmain.aprogramcompilemultiple.caption","sourcebytes":[67,111,109,112,105,108,101,32,109,117,108,116,105,112,108,101,46,46,46],"value":"Compile multiple..."} 39 40 ]} -
trunk/Forms/UFormMain.pas
r128 r133 15 15 16 16 TFormMain = class(TForm) 17 AProgramCompileMultiple: TAction; 17 18 AViewLog: TAction; 18 19 AProgramShowExecutionPoint: TAction; … … 52 53 MenuItem19: TMenuItem; 53 54 MenuItem2: TMenuItem; 55 MenuItem20: TMenuItem; 54 56 MenuItem22: TMenuItem; 55 57 MenuItem24: TMenuItem; … … 117 119 procedure AOptionsExecute(Sender: TObject); 118 120 procedure AProgramCompileExecute(Sender: TObject); 121 procedure AProgramCompileMultipleExecute(Sender: TObject); 119 122 procedure AProgramPauseExecute(Sender: TObject); 120 123 procedure AProgramRunToCursorExecute(Sender: TObject); … … 171 174 UCore, UFormCPU, UFormOptions, UFormMessages, UFormTargets, UFormOutput, UFormInput, 172 175 UFormMemory, UFormSourceCode, UFormTargetCode, UTargetInterpretter, UFormLog, 173 UBFTarget, UCommon ;176 UBFTarget, UCommon, UFormCompileMultiple; 174 177 175 178 resourcestring … … 206 209 FormSourceCode.UpdateTheme; 207 210 end; 211 Core.Messages.OnChange := FormMain.MessagesChanged; 208 212 end; 209 213 … … 227 231 AProgramShowExecutionPoint.Execute; 228 232 if Core.CurrentTarget.State = rsStopped then 229 Core. CurrentTarget.Messages.AddMessage(SProgramStopped);233 Core.Messages.AddMessage(SProgramStopped); 230 234 end; 231 235 … … 405 409 if not Core.CurrentTarget.Compiled then AProgramCompile.Execute; 406 410 Core.CurrentTarget.Run; 407 Core. CurrentTarget.Messages.AddMessage(SProgramStarted);411 Core.Messages.AddMessage(SProgramStarted); 408 412 end; 409 413 … … 432 436 procedure TFormMain.AViewCompilersExecute(Sender: TObject); 433 437 begin 434 if not Assigned(FormTargets) then FormTargets := TFormTargets.Create(Self); 435 FormTargets.Show; 438 with TFormTargets.Create(nil) do 439 try 440 ShowModal; 441 finally 442 Free; 443 end; 436 444 end; 437 445 … … 493 501 with Core.CurrentTarget do 494 502 try 503 Core.Messages.Clear; 495 504 AProgramStop.Execute; 496 505 SourceCode := FormSourceCode.SynEditSource.Text; … … 499 508 if Core.CurrentTarget is TBFTarget then 500 509 TBFTarget(Core.CurrentTarget).Optimizations := Core.Optimizations; 501 Core.CurrentTarget.Messages.AddMessage(SCompileStart); 510 DebugEnabled := Core.DebugEnabled; 511 Core.Messages.AddMessage(SCompileStart); 502 512 Application.ProcessMessages; 503 513 Compile; 504 Core. CurrentTarget.Messages.AppendMessage(SDone);514 Core.Messages.AppendMessage(SDone); 505 515 FormTargetCode.SynEditTarget.Text := TargetCode; 506 516 FormTargetCode.SetHighlighter(Core.CurrentTarget.SourceExtension); … … 509 519 on E: Exception do 510 520 MessageDlg(SError, E.Message, mtError, [mbOk], 0); 521 end; 522 end; 523 524 procedure TFormMain.AProgramCompileMultipleExecute(Sender: TObject); 525 var 526 I: Integer; 527 begin 528 AProgramStop.Execute; 529 with TFormCompileMultiple.Create(nil) do 530 try 531 Targets := Core.Targets; 532 if ShowModal = mrOk then begin 533 Core.Messages.Clear; 534 for I := 0 to Targets.Count - 1 do 535 with Targets[I] do 536 if Selected then 537 try 538 AProgramStop.Execute; 539 SourceCode := FormSourceCode.SynEditSource.Text; 540 ProjectFileName := Core.Project.FileName; 541 ProgramName := ExtractFileNameOnly(Core.Project.FileName); 542 if Targets[I] is TBFTarget then 543 TBFTarget(Targets[I]).Optimizations := Core.Optimizations; 544 DebugEnabled := Core.DebugEnabled; 545 Core.Messages.AddMessage(Name + ' ' + SCompileStart); 546 Application.ProcessMessages; 547 Compile; 548 Core.Messages.AppendMessage(SDone); 549 FormTargetCode.SynEditTarget.Text := TargetCode; 550 FormTargetCode.SetHighlighter(Core.CurrentTarget.SourceExtension); 551 UpdateInterface; 552 except 553 on E: Exception do 554 MessageDlg(SError, E.Message, mtError, [mbOk], 0); 555 end; 556 end; 557 finally 558 Free; 511 559 end; 512 560 end; -
trunk/Forms/UFormMessages.pas
r131 r133 37 37 procedure TFormMessages.ListView1Data(Sender: TObject; Item: TListItem); 38 38 begin 39 with Core .CurrentTargetdo39 with Core do 40 40 if (Item.Index >= 0) and (Item.Index < Messages.Count) then 41 with TMessage(Messages[Item.Index])do begin41 with Messages[Item.Index] do begin 42 42 Item.Caption := Text; 43 43 Item.Data := Messages[Item.Index]; … … 51 51 procedure TFormMessages.Reload; 52 52 begin 53 ListView1.Items.Count := Core. CurrentTarget.Messages.Count;53 ListView1.Items.Count := Core.Messages.Count; 54 54 ListView1.Refresh; 55 55 end; -
trunk/Forms/UFormSourceCode.lfm
r128 r133 591 591 object ActionList1: TActionList 592 592 Images = Core.ImageListMain 593 Left = 15 4593 Left = 152 594 594 Top = 67 595 595 object AGenerateNumber: TAction -
trunk/Forms/UFormTargets.lfm
r103 r133 1 1 object FormTargets: TFormTargets 2 Left = 29 23 Height = 4 134 Top = 1 385 Width = 6892 Left = 294 3 Height = 430 4 Top = 172 5 Width = 718 6 6 Caption = 'Compilers' 7 ClientHeight = 413 8 ClientWidth = 689 9 DesignTimePPI = 144 7 ClientHeight = 430 8 ClientWidth = 718 9 DesignTimePPI = 150 10 OnClose = FormClose 10 11 OnCreate = FormCreate 11 12 OnShow = FormShow 12 LCLVersion = '2. 0.0.4'13 LCLVersion = '2.2.0.4' 13 14 object ListView1: TListView 14 15 Left = 10 15 Height = 39316 Height = 410 16 17 Top = 10 17 Width = 67218 Width = 701 18 19 Anchors = [akTop, akLeft, akRight, akBottom] 19 20 Columns = < 20 21 item 21 22 Caption = 'Name' 22 Width = 9623 Width = 100 23 24 end 24 25 item 25 26 Caption = 'Execution path' 26 Width = 2 4027 Width = 250 27 28 end 28 29 item 29 30 Caption = 'Compiler path' 30 Width = 3 1331 Width = 336 31 32 end> 32 33 OwnerData = True -
trunk/Forms/UFormTargets.pas
r115 r133 14 14 TFormTargets = class(TForm) 15 15 ListView1: TListView; 16 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 16 17 procedure FormCreate(Sender: TObject); 17 18 procedure FormShow(Sender: TObject); … … 39 40 procedure TFormTargets.FormShow(Sender: TObject); 40 41 begin 42 Core.PersistentForm1.Load(Self); 41 43 ReloadList; 42 44 end; … … 46 48 Core.Translator.TranslateComponentRecursive(Self); 47 49 Core.ThemeManager.UseTheme(Self); 50 end; 51 52 procedure TFormTargets.FormClose(Sender: TObject; var CloseAction: TCloseAction 53 ); 54 begin 55 Core.PersistentForm1.Save(Self); 48 56 end; 49 57
Note:
See TracChangeset
for help on using the changeset viewer.