- Timestamp:
- Aug 14, 2024, 1:05:13 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 6 added
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Core.lfm
r150 r153 769 769 end 770 770 object ThemeManager: TThemeManager 771 Left = 36 2771 Left = 369 772 772 Top = 209 773 773 end -
trunk/Core.pas
r152 r153 121 121 TFormEx.PersistentForm := PersistentForm1; 122 122 123 FormMain := TFormMain.Create(nil);123 Application.CreateForm(TFormMain, FormMain); 124 124 FormMain.Show; 125 125 end; … … 132 132 FreeAndNil(Project); 133 133 FreeAndNil(StoredDimension); 134 FreeAndNil(FormMain);135 134 end; 136 135 … … 258 257 procedure TCore.TargetLogExecute(Lines: TStrings); 259 258 begin 260 261 259 end; 262 260 … … 269 267 if (DesignDPI.X <> DPI.X) or (DesignDPI.Y <> DPI.Y) then begin 270 268 //ApplyToAll(DesignDPI); 271 for I := 0 to Screen.FormCount - 1 do269 { for I := 0 to Screen.FormCount - 1 do 272 270 if (Screen.Forms[I].WindowState = wsNormal) or 273 271 (Screen.Forms[I].WindowState = wsMinimized) then begin … … 275 273 ScaleDimensions(Screen.Forms[I], StoredDimension); 276 274 end; 277 ScaleImageList(ImageListMain, DesignDPI);275 } ScaleImageList(ImageListMain, DesignDPI); 278 276 end; 279 277 end; -
trunk/Forms/FormConsole.lfm
r151 r153 1 1 object FormConsole: TFormConsole 2 Left = 4493 Height = 7274 Top = 2615 Width = 9752 Left = 779 3 Height = 689 4 Top = 375 5 Width = 1002 6 6 Caption = 'Console' 7 ClientHeight = 727 8 ClientWidth = 975 7 ClientHeight = 689 8 ClientWidth = 1002 9 DesignTimePPI = 144 9 10 OnClose = FormClose 10 11 OnCreate = FormCreate … … 12 13 OnShow = FormShow 13 14 Position = poMainFormCenter 14 LCLVersion = ' 1.5'15 LCLVersion = '3.4.0.0' 15 16 object Memo1: TMemo 16 17 Left = 4 17 Height = 6 7418 Top = 4819 Width = 9 6618 Height = 628 19 Top = 56 20 Width = 993 20 21 Align = alCustom 21 22 Anchors = [akTop, akLeft, akRight, akBottom] 22 BorderSpacing.Around = 223 Font.Name = ' DejaVu Sans Mono'23 BorderSpacing.Around = 3 24 Font.Name = 'Courier New' 24 25 ParentFont = False 25 26 ReadOnly = True … … 28 29 end 29 30 object ButtonAbort: TButton 30 Left = 8 9531 Height = 2532 Top = 833 Width = 7531 Left = 883 32 Height = 38 33 Top = 10 34 Width = 112 34 35 Anchors = [akTop, akRight] 35 36 Caption = 'Abort' 37 TabOrder = 1 36 38 OnClick = ButtonAbortClick 37 TabOrder = 138 39 end 39 40 object EditCommand: TEdit 40 41 Left = 4 41 Height = 3542 Top = 743 Width = 8 8442 Height = 43 43 Top = 10 44 Width = 868 44 45 Anchors = [akTop, akLeft, akRight] 45 46 ReadOnly = True … … 50 51 Interval = 1 51 52 OnTimer = Timer1Timer 52 left = 7253 top = 11253 Left = 108 54 Top = 168 54 55 end 55 56 end -
trunk/Forms/FormConsole.pas
r151 r153 102 102 Process.Parameters.Assign(Parameters); 103 103 Process.Executable := Executable; 104 CommandLine := Executable + ' ' + StringReplace(Parameters.Text, LineEnding, ' ', [rfReplaceAll]); 104 CommandLine := Executable + ' ' + StringReplace(Parameters.Text, LineEnding, 105 ' ', [rfReplaceAll]); 105 106 if CommandLine[Length(CommandLine)] = LineEnding then 106 107 SetLength(CommandLine, Length(CommandLine) - 1); … … 117 118 SetLength(Buffer, Count); 118 119 Text := Text + Buffer; 120 {$IFDEF UNIX} 121 Text := StringReplace(Text, #10#13, LineEnding, [rfReplaceAll]); 122 {$ENDIF} 119 123 while Pos(LineEnding, Text) > 0 do begin 120 124 Line := Copy(Text, 1, Pos(LineEnding, Text) - 1); … … 130 134 SetLength(Buffer, Count); 131 135 Text := Text + Buffer; 136 {$IFDEF UNIX} 137 Text := StringReplace(Text, #10#13, LineEnding, [rfReplaceAll]); 138 {$ENDIF} 132 139 while Pos(LineEnding, Text) > 0 do begin 133 140 Line := Copy(Text, 1, Pos(LineEnding, Text) - 1); -
trunk/Forms/FormInput.lfm
r149 r153 1 1 object FormInput: TFormInput 2 Left = 2562 Left = 1040 3 3 Height = 360 4 Top = 324 Top = 540 5 5 Width = 480 6 6 Caption = 'Input' … … 16 16 Align = alClient 17 17 BorderSpacing.Around = 6 18 Font.Height = -1819 18 Font.Name = 'Courier New' 20 19 ParentFont = False -
trunk/Forms/FormMain.lfm
r150 r153 9 9 DesignTimePPI = 144 10 10 Menu = MainMenu1 11 OnActivate = FormActivate 11 12 OnClose = FormClose 12 13 OnCloseQuery = FormCloseQuery … … 325 326 end 326 327 end 328 object MenuItem23: TMenuItem 329 Caption = 'View' 330 object MenuItem26: TMenuItem 331 Action = AFullScreen 332 end 333 end 327 334 object MenuItem9: TMenuItem 328 335 Caption = 'Run' … … 388 395 object ActionList1: TActionList 389 396 Images = Core.ImageListMain 390 Left = 26 1397 Left = 264 391 398 Top = 230 392 399 object AProjectOpen: TAction … … 452 459 Caption = 'Help' 453 460 ImageIndex = 6 461 OnExecute = AHelpExecute 454 462 end 455 463 object AProgramPause: TAction … … 500 508 end 501 509 object AOptions: TAction 502 Category = ' View'510 Category = 'Tools' 503 511 Caption = 'Options' 504 512 ImageIndex = 2 … … 534 542 Caption = 'Compile multiple...' 535 543 OnExecute = AProgramCompileMultipleExecute 544 end 545 object AFullScreen: TAction 546 Category = 'View' 547 Caption = 'Full screen' 548 OnExecute = AFullScreenExecute 549 ShortCut = 122 536 550 end 537 551 end -
trunk/Forms/FormMain.lrj
r145 r153 10 10 {"hash":131987540,"name":"tformmain.menuitemopenrecent.caption","sourcebytes":[79,112,101,110,32,114,101,99,101,110,116],"value":"Open recent"}, 11 11 {"hash":310020,"name":"tformmain.menuitem24.caption","sourcebytes":[69,100,105,116],"value":"Edit"}, 12 {"hash":380871,"name":"tformmain.menuitem23.caption","sourcebytes":[86,105,101,119],"value":"View"}, 12 13 {"hash":22974,"name":"tformmain.menuitem9.caption","sourcebytes":[82,117,110],"value":"Run"}, 13 14 {"hash":94932420,"name":"tformmain.menuitemtarget.caption","sourcebytes":[84,97,114,103,101,116],"value":"Target"}, … … 37 38 {"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 39 {"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..."} 40 {"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..."}, 41 {"hash":131549534,"name":"tformmain.afullscreen.caption","sourcebytes":[70,117,108,108,32,115,99,114,101,101,110],"value":"Full screen"} 40 42 ]} -
trunk/Forms/FormMain.pas
r152 r153 14 14 15 15 TFormMain = class(TFormEx) 16 AFullScreen: TAction; 16 17 AProgramCompileMultiple: TAction; 17 18 AViewLog: TAction; … … 55 56 MenuItem21: TMenuItem; 56 57 MenuItem22: TMenuItem; 58 MenuItem23: TMenuItem; 57 59 MenuItem24: TMenuItem; 58 60 MenuItem25: TMenuItem; 61 MenuItem26: TMenuItem; 59 62 MenuItem27: TMenuItem; 60 63 MenuItem28: TMenuItem; … … 117 120 procedure ABreakpointToggleExecute(Sender: TObject); 118 121 procedure AExitExecute(Sender: TObject); 122 procedure AFullScreenExecute(Sender: TObject); 123 procedure AHelpExecute(Sender: TObject); 119 124 procedure AOptionsExecute(Sender: TObject); 120 125 procedure AProgramCompileExecute(Sender: TObject); … … 138 143 procedure AViewInterpreterExecute(Sender: TObject); 139 144 procedure AViewLogExecute(Sender: TObject); 145 procedure FormActivate(Sender: TObject); 140 146 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 141 147 procedure FormCloseQuery(Sender: TObject; var CanClose: boolean); … … 176 182 177 183 uses 178 Core, TargetInterpreter, BFTarget, Common, FormAbout ;184 Core, TargetInterpreter, BFTarget, Common, FormAbout, FormHelp; 179 185 180 186 resourcestring … … 342 348 AShowSourcePosition.Enabled := CurrentTarget.Compiled; 343 349 AShowTargetPosition.Enabled := CurrentTarget.Compiled; 350 AFullScreen.Checked := FullScreen; 344 351 end; 345 352 UpdateStatusBar; … … 453 460 end; 454 461 462 procedure TFormMain.FormActivate(Sender: TObject); 463 begin 464 AFullScreen.Checked := FullScreen; 465 end; 466 455 467 procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction); 456 468 begin … … 469 481 begin 470 482 Close; 483 end; 484 485 procedure TFormMain.AFullScreenExecute(Sender: TObject); 486 begin 487 FullScreen := not FullScreen; 488 AFullScreen.Checked := FullScreen; 489 TFormEx.PersistentForm.Save(Self); 490 TFormEx.PersistentForm.SetFullScreen(FullScreen); 491 UpdateInterface; 492 end; 493 494 procedure TFormMain.AHelpExecute(Sender: TObject); 495 var 496 FormHelp: TFormHelp; 497 begin 498 FormHelp := TFormHelp.Create(nil); 499 FormHelp.ShowModal; 500 FormHelp.Free; 471 501 end; 472 502 -
trunk/Forms/FormMemory.lfm
r149 r153 1 1 object FormMemory: TFormMemory 2 Left = 5653 Height = 4014 Top = 1685 Width = 1 0392 Left = 705 3 Height = 866 4 Top = 287 5 Width = 1150 6 6 Caption = 'Memory' 7 ClientHeight = 4018 ClientWidth = 1 0397 ClientHeight = 866 8 ClientWidth = 1150 9 9 DesignTimePPI = 144 10 10 LCLVersion = '3.4.0.0' … … 13 13 Height = 26 14 14 Top = 6 15 Width = 1 02715 Width = 1138 16 16 Align = alTop 17 17 BorderSpacing.Around = 6 … … 22 22 object ListViewMemory: TListView 23 23 Left = 6 24 Height = 35724 Height = 822 25 25 Top = 38 26 Width = 1 02726 Width = 1138 27 27 Align = alClient 28 28 BorderSpacing.Around = 6 … … 38 38 item 39 39 Caption = 'Text' 40 Width = 39740 Width = 508 41 41 end> 42 Font.Height = -1843 42 Font.Name = 'Courier New' 44 43 OwnerData = True -
trunk/Forms/FormOptions.lfm
r149 r153 1 1 object FormOptions: TFormOptions 2 Left = 4012 Left = 916 3 3 Height = 427 4 Top = 2364 Top = 506 5 5 Width = 728 6 6 Caption = 'Options' … … 9 9 DesignTimePPI = 144 10 10 OnCreate = FormCreate 11 LCLVersion = ' 2.2.6.0'11 LCLVersion = '3.4.0.0' 12 12 object ButtonOk: TButton 13 13 Left = 631 … … 96 96 AutoSize = False 97 97 Caption = 'Automatic DPI' 98 ParentFont = False 99 TabOrder = 2 98 100 OnChange = CheckBoxDPIAutoChange 99 ParentFont = False100 TabOrder = 2101 101 end 102 102 object LabelDPI: TLabel … … 196 196 'Normal' 197 197 ) 198 OnSelect = CheckBoxDPIAutoChange199 198 ParentFont = False 200 199 Style = csDropDownList 201 200 TabOrder = 0 201 OnSelect = CheckBoxDPIAutoChange 202 202 end 203 203 object CheckBoxOptimizeAddSub: TCheckBox … … 225 225 Width = 142 226 226 Caption = 'Copy multiply' 227 ParentFont = False 228 TabOrder = 3 227 229 OnChange = CheckBoxOptimizeCopyMultiplyChange 228 ParentFont = False229 TabOrder = 3230 230 end 231 231 object CheckBoxOptimizeRelativeIndexes: TCheckBox … … 235 235 Width = 162 236 236 Caption = 'Relative indexes' 237 ParentFont = False 238 TabOrder = 4 237 239 OnChange = CheckBoxOptimizeRelativeIndexesChange 238 ParentFont = False239 TabOrder = 4240 240 end 241 241 object Label2: TLabel -
trunk/Forms/FormOutput.lfm
r149 r153 1 1 object FormOutput: TFormOutput 2 Left = 7363 Height = 3434 Top = 5025 Width = 6402 Left = 814 3 Height = 544 4 Top = 448 5 Width = 932 6 6 Caption = 'Output' 7 ClientHeight = 3438 ClientWidth = 6407 ClientHeight = 544 8 ClientWidth = 932 9 9 DesignTimePPI = 144 10 10 LCLVersion = '3.4.0.0' … … 13 13 Height = 26 14 14 Top = 4 15 Width = 63215 Width = 924 16 16 Align = alTop 17 17 BorderSpacing.Around = 4 … … 21 21 object MemoOutput: TMemo 22 22 Left = 4 23 Height = 30523 Height = 506 24 24 Top = 34 25 Width = 63225 Width = 924 26 26 Align = alClient 27 27 BorderSpacing.Around = 4 28 Font.Height = -1229 28 Font.Name = 'Courier New' 30 29 ParentFont = False -
trunk/Forms/FormSourceCode.lfm
r150 r153 17 17 Width = 672 18 18 Align = alClient 19 Font.Height = -1620 19 Font.Name = 'Courier New' 21 20 Font.Pitch = fpFixed … … 27 26 OnKeyUp = MemoSourceKeyUp 28 27 OnMouseDown = MemoSourceMouseDown 29 Gutter.Width = 8 028 Gutter.Width = 84 30 29 Gutter.MouseActions = <> 31 30 RightGutter.Width = 0 … … 481 480 end 482 481 object SynGutterLineNumber1: TSynGutterLineNumber 483 Width = 2 1482 Width = 25 484 483 MouseActions = <> 485 484 MarkupInfo.Background = clBtnFace -
trunk/Forms/FormTargetCode.lfm
r149 r153 1 1 object FormTargetCode: TFormTargetCode 2 Left = 5552 Left = 913 3 3 Height = 522 4 Top = 3794 Top = 459 5 5 Width = 734 6 6 Caption = 'Target code' … … 15 15 Width = 734 16 16 Align = alClient 17 Font.Height = -1617 Font.Height = 13 18 18 Font.Name = 'Courier New' 19 19 Font.Pitch = fpFixed … … 23 23 PopupMenu = PopupMenuTarget 24 24 TabOrder = 0 25 Gutter.Width = 8125 Gutter.Width = 77 26 26 Gutter.MouseActions = <> 27 27 RightGutter.Width = 0 … … 476 476 end 477 477 object SynGutterLineNumber1: TSynGutterLineNumber 478 Width = 21478 Width = 17 479 479 MouseActions = <> 480 480 MarkupInfo.Background = clBtnFace -
trunk/Forms/FormTargetOptions.lfm
r149 r153 1 1 object FormTargetOptions: TFormTargetOptions 2 Left = 6673 Height = 2 424 Top = 6135 Width = 5862 Left = 987 3 Height = 216 4 Top = 599 5 Width = 609 6 6 Caption = 'Target options' 7 ClientHeight = 2 428 ClientWidth = 5867 ClientHeight = 216 8 ClientWidth = 609 9 9 DesignTimePPI = 144 10 LCLVersion = ' 2.0.10.0'10 LCLVersion = '3.4.0.0' 11 11 object Edit1: TEdit 12 12 Left = 10 13 Height = 4 213 Height = 43 14 14 Top = 38 15 Width = 4 6915 Width = 492 16 16 Anchors = [akTop, akLeft, akRight] 17 17 ParentFont = False … … 20 20 object Label1: TLabel 21 21 Left = 10 22 Height = 2 422 Height = 26 23 23 Top = 8 24 24 Width = 155 … … 28 28 end 29 29 object ButtonCompiler: TButton 30 Left = 48930 Left = 512 31 31 Height = 37 32 32 Top = 42 … … 34 34 Anchors = [akTop, akRight] 35 35 Caption = 'Select...' 36 OnClick = ButtonCompilerClick37 36 ParentFont = False 38 37 TabOrder = 1 38 OnClick = ButtonCompilerClick 39 39 end 40 40 object ButtonExecute: TButton 41 Left = 48941 Left = 512 42 42 Height = 37 43 43 Top = 115 … … 45 45 Anchors = [akTop, akRight] 46 46 Caption = 'Select...' 47 OnClick = ButtonExecuteClick48 47 ParentFont = False 49 48 TabOrder = 2 49 OnClick = ButtonExecuteClick 50 50 end 51 51 object Edit2: TEdit 52 52 Left = 10 53 Height = 4 253 Height = 43 54 54 Top = 115 55 Width = 4 6955 Width = 492 56 56 Anchors = [akTop, akLeft, akRight] 57 57 ParentFont = False … … 60 60 object Label2: TLabel 61 61 Left = 10 62 Height = 2 462 Height = 26 63 63 Top = 86 64 64 Width = 151 … … 68 68 end 69 69 object ButtonOk: TButton 70 Left = 4 6370 Left = 486 71 71 Height = 37 72 Top = 1 9172 Top = 165 73 73 Width = 109 74 74 Anchors = [akRight, akBottom] … … 79 79 end 80 80 object ButtonCancel: TButton 81 Left = 3 2881 Left = 351 82 82 Height = 37 83 Top = 1 9183 Top = 165 84 84 Width = 109 85 85 Anchors = [akRight, akBottom] … … 89 89 TabOrder = 5 90 90 end 91 object OpenDialog1: TOpenDialog92 DefaultExt = '.exe'93 Filter = 'Program (*.exe)|*.exe|JakÃœkoliv soubor (*.*)|*.*'94 Left = 11895 Top = 14596 end97 91 end -
trunk/Languages/LazFuck.cs.po
r152 r153 23 23 msgstr " kroků/s" 24 24 25 #: formhelp.shelpfeatures 26 msgid "" 27 "Features:\n" 28 "* Graphical code editor with color syntax highlighting\n" 29 "* Cross-compilation to Delphi, Free Pascal, Python, Java, C, C#, PHP, Rust and Javascript\n" 30 "* Interpreter with debugger" 31 msgstr "" 32 "Vlastnosti:\n" 33 "* GrafickÃœ editor kódu s barevnÃœm zvÃœraznÄnÃm\n" 34 "* KÅÃÅŸovÃœ pÅekladaÄ do jazyků Delphi, Free Pascal, Python, Java, C, C#, PHP, Rust a Javascript\n" 35 "* Interpretr s ladiÄem" 36 37 #: formhelp.shelpsummary 38 msgid "LazFuck is a GUI application for writing, executing, compiling and debugging programs written in famous BrainFuck esoteric programming language." 39 msgstr "LazFuck je GUI aplikace pro psanÃ, spouÅ¡tÄnÃ, pÅekládánà a ladÄnà programů napsanÃœch ve slavném esoterickém programovacÃm jazyku BrainFuck." 40 25 41 #: formmain.schanged 26 42 msgctxt "formmain.schanged" … … 231 247 msgstr "VÃœsledek" 232 248 249 #: tformconsole.buttonabort.caption 250 msgid "Abort" 251 msgstr "PÅeruÅ¡it" 252 253 #: tformconsole.caption 254 msgid "Console" 255 msgstr "Konzola" 256 233 257 #: tformcpu.caption 234 258 msgid "CPU" … … 271 295 msgstr " " 272 296 297 #: tformhelp.caption 298 msgctxt "tformhelp.caption" 299 msgid "Help" 300 msgstr "NápovÄda" 301 273 302 #: tforminput.caption 274 303 msgid "Input" … … 297 326 msgstr "UkonÄit" 298 327 328 #: tformmain.afullscreen.caption 329 msgid "Full screen" 330 msgstr "Celá obrazovka" 331 299 332 #: tformmain.ahelp.caption 300 333 msgctxt "tformmain.ahelp.caption" … … 407 440 msgstr "Nástroje" 408 441 442 #: tformmain.menuitem23.caption 443 msgid "View" 444 msgstr "ZobrazenÃ" 445 409 446 #: tformmain.menuitem24.caption 410 447 msgctxt "tformmain.menuitem24.caption" -
trunk/Languages/LazFuck.pot
r152 r153 13 13 msgstr "" 14 14 15 #: formhelp.shelpfeatures 16 msgid "" 17 "Features:\n" 18 "* Graphical code editor with color syntax highlighting\n" 19 "* Cross-compilation to Delphi, Free Pascal, Python, Java, C, C#, PHP, Rust and Javascript\n" 20 "* Interpreter with debugger" 21 msgstr "" 22 23 #: formhelp.shelpsummary 24 msgid "LazFuck is a GUI application for writing, executing, compiling and debugging programs written in famous BrainFuck esoteric programming language." 25 msgstr "" 26 15 27 #: formmain.schanged 16 28 msgctxt "formmain.schanged" … … 221 233 msgstr "" 222 234 235 #: tformconsole.buttonabort.caption 236 msgid "Abort" 237 msgstr "" 238 239 #: tformconsole.caption 240 msgid "Console" 241 msgstr "" 242 223 243 #: tformcpu.caption 224 244 msgid "CPU" … … 261 281 msgstr "" 262 282 283 #: tformhelp.caption 284 msgctxt "tformhelp.caption" 285 msgid "Help" 286 msgstr "" 287 263 288 #: tforminput.caption 264 289 msgid "Input" … … 287 312 msgstr "" 288 313 314 #: tformmain.afullscreen.caption 315 msgid "Full screen" 316 msgstr "" 317 289 318 #: tformmain.ahelp.caption 290 319 msgctxt "tformmain.ahelp.caption" … … 397 426 msgstr "" 398 427 428 #: tformmain.menuitem23.caption 429 msgid "View" 430 msgstr "" 431 399 432 #: tformmain.menuitem24.caption 400 433 msgctxt "tformmain.menuitem24.caption" -
trunk/LazFuck.lpi
r152 r153 97 97 </Item4> 98 98 </RequiredPackages> 99 <Units Count="3 1">99 <Units Count="32"> 100 100 <Unit0> 101 101 <Filename Value="LazFuck.lpr"/> … … 264 264 <IsPartOfProject Value="True"/> 265 265 <ComponentName Value="FormConsole"/> 266 <HasResources Value="True"/> 266 267 <ResourceBaseClass Value="Form"/> 267 268 </Unit30> 269 <Unit31> 270 <Filename Value="Forms\FormHelp.pas"/> 271 <IsPartOfProject Value="True"/> 272 <ComponentName Value="FormHelp"/> 273 <ResourceBaseClass Value="Form"/> 274 </Unit31> 268 275 </Units> 269 276 </ProjectOptions> -
trunk/LazFuck.lpr
r151 r153 1 1 program LazFuck; 2 3 {$mode objfpc}{$H+}4 2 5 3 uses … … 11 9 Forms, Target, FormCPU, FormMain, FormOutput, FormInput, FormMemory, 12 10 FormMessages, FormSourceCode, FormTargetCode, FormConsole, Core, Common, 13 SysUtils, BFCodeTools, TargetRust ;11 SysUtils, BFCodeTools, TargetRust, FormHelp; 14 12 15 13 {$R *.res} -
trunk/Packages/Common/Common.pas
r148 r153 53 53 function ComputerName: string; 54 54 procedure DeleteFiles(APath, AFileSpec: string); 55 function EndsWith(Text, What: string): Boolean; 55 56 function Explode(Separator: Char; Data: string): TStringArray; 56 57 procedure ExecuteProgram(Executable: string; Parameters: array of string); … … 87 88 procedure SearchFiles(AList: TStrings; Dir: string; 88 89 FilterMethod: TFilterMethod = nil; FileNameMethod: TFileNameMethod = nil); 90 procedure SortStrings(Strings: TStrings); 89 91 function SplitString(var Text: string; Count: Word): string; 90 92 function StripTags(const S: string): string; 93 function StartsWith(Text, What: string): Boolean; 91 94 function TryHexToInt(Data: string; out Value: Integer): Boolean; 92 95 function TryBinToInt(Data: string; out Value: Integer): Boolean; 93 procedure SortStrings(Strings: TStrings);94 96 95 97 96 98 implementation 99 100 function StartsWith(Text, What: string): Boolean; 101 begin 102 Result := Copy(Text, 1, Length(Text)) = What; 103 end; 104 105 function EndsWith(Text, What: string): Boolean; 106 begin 107 Result := Copy(Text, Length(Text) - Length(What) + 1, MaxInt) = What; 108 end; 97 109 98 110 function BinToInt(BinStr : string) : Int64; -
trunk/Packages/Common/FindFile.pas
r145 r153 75 75 constructor TFindFile.Create(AOwner: TComponent); 76 76 begin 77 inherited Create(AOwner);77 inherited; 78 78 Path := IncludeTrailingBackslash(UTF8Encode(GetCurrentDir)); 79 79 FileMask := FilterAll; -
trunk/Packages/Common/FormEx.pas
r148 r153 13 13 private 14 14 FCounter: Integer; static; 15 FFirstShow: Boolean; 15 16 protected 16 17 procedure DoShow; override; … … 19 20 procedure DoDestroy; override; 20 21 public 22 FullScreen: Boolean; 21 23 PersistentForm: TPersistentForm; static; 22 24 ThemeManager: TThemeManager; static; … … 44 46 begin 45 47 inherited; 46 PersistentForm.Load(Self); 48 if not FFirstShow and (not (csDesigning in ComponentState)) then begin 49 FFirstShow := True; 50 PersistentForm.Load(Self); 51 FullScreen := PersistentForm.FormFullScreen; 52 end; 47 53 end; 48 54 … … 68 74 end; 69 75 70 PersistentForm.Load(Self);71 76 Translator.TranslateComponentRecursive(Self); 72 77 ThemeManager.UseTheme(Self); … … 77 82 procedure TFormEx.DoClose(var CloseAction: TCloseAction); 78 83 begin 79 PersistentForm.Save(Self); 84 if (not (csDesigning in ComponentState)) then begin 85 PersistentForm.FormFullScreen := FullScreen; 86 PersistentForm.Save(Self); 87 end; 80 88 inherited; 81 89 end; -
trunk/Packages/Common/ListViewSort.pas
r145 r153 136 136 constructor TListViewEx.Create(TheOwner: TComponent); 137 137 begin 138 inherited Create(TheOwner);138 inherited; 139 139 Filter := TListViewFilter.Create(Self); 140 140 Filter.Parent := Self; … … 172 172 constructor TListViewFilter.Create(AOwner: TComponent); 173 173 begin 174 inherited Create(AOwner);174 inherited; 175 175 FStringGrid1 := TStringGrid.Create(Self); 176 176 FStringGrid1.Align := alClient; -
trunk/Packages/Common/PersistentForm.pas
r145 r153 16 16 FMinVisiblePart: Integer; 17 17 FRegistryContext: TRegistryContext; 18 FResizeEventOccured: Boolean; 18 19 procedure LoadControl(Control: TControl); 19 20 procedure SaveControl(Control: TControl); 21 procedure WindowStateChange(Sender: TObject); 20 22 public 21 23 FormRestoredSize: TRect; … … 301 303 302 304 procedure TPersistentForm.SetFullScreen(State: Boolean); 305 {$IFDEF UNIX} 306 var 307 OldHandler: TNotifyEvent; 308 var 309 I: Integer; 310 {$ENDIF} 303 311 begin 304 312 if State then begin … … 312 320 end; 313 321 FormWindowState := Form.WindowState; 314 Form.WindowState := wsMaximized;315 Form.WindowState := wsNormal;316 ShowWindow(Form.Handle, SW_SHOWFULLSCREEN);317 322 {$IFDEF WINDOWS} 318 323 Form.BorderStyle := bsNone; 319 324 {$ENDIF} 325 Form.WindowState := wsFullscreen; 326 {$IFDEF UNIX} 327 // Workaround on Linux, WindowState is rewriten by WMSize event to wsNormal. 328 // We need for that even to occure 329 OldHandler := Form.OnWindowStateChange; 330 Form.OnWindowStateChange := WindowStateChange; 331 FResizeEventOccured := False; 332 for I := 0 to 10 do begin 333 if FResizeEventOccured then Break; 334 Application.ProcessMessages; 335 Sleep(1); 336 end; 337 Form.OnWindowStateChange := OldHandler; 338 FormFullScreen := True; 339 {$ENDIF} 320 340 end else begin 321 341 FormFullScreen := False; 342 Form.WindowState := wsNormal; 322 343 {$IFDEF WINDOWS} 323 344 Form.BorderStyle := bsSizeable; 324 345 {$ENDIF} 325 ShowWindow(Form.Handle, SW_SHOWNORMAL);326 346 if FormWindowState = wsNormal then begin 327 347 Form.WindowState := wsNormal; … … 335 355 end; 336 356 357 procedure TPersistentForm.WindowStateChange(Sender: TObject); 358 begin 359 Form.WindowState := wsFullscreen; 360 FResizeEventOccured := True; 361 end; 362 337 363 end. -
trunk/Packages/Common/PixelPointer.pas
r148 r153 18 18 function GetRGB: Cardinal; inline; 19 19 public 20 class function CreateRGB(R, G, B: Byte): TPixel32; static; 21 class function CreateRGBA(R, G, B, A: Byte): TPixel32; static; 20 22 property RGB: Cardinal read GetRGB write SetRGB; 21 23 case Integer of … … 104 106 end; 105 107 108 class function TPixel32.CreateRGB(R, G, B: Byte): TPixel32; 109 begin 110 Result.R := R; 111 Result.G := G; 112 Result.B := B; 113 Result.A := 0; 114 end; 115 116 class function TPixel32.CreateRGBA(R, G, B, A: Byte): TPixel32; 117 begin 118 Result.R := R; 119 Result.G := G; 120 Result.B := B; 121 Result.A := A; 122 end; 123 106 124 procedure TPixel32.SetRGB(AValue: Cardinal); 107 125 begin -
trunk/Packages/Common/Pool.pas
r145 r153 57 57 try 58 58 Lock.Acquire; 59 inherited SetTotalCount(AValue);59 inherited; 60 60 finally 61 61 Lock.Release; … … 67 67 try 68 68 Lock.Acquire; 69 Result := inherited GetUsedCount;69 Result := inherited; 70 70 finally 71 71 Lock.Release; … … 88 88 end; 89 89 end; 90 Result := inherited Acquire;90 Result := inherited; 91 91 finally 92 92 Lock.Release; … … 98 98 try 99 99 Lock.Acquire; 100 inherited Release(Item);100 inherited; 101 101 finally 102 102 Lock.Release; … … 113 113 begin 114 114 TotalCount := 0; 115 Lock.Free;115 FreeAndNil(Lock); 116 116 inherited; 117 117 end; -
trunk/Packages/Common/RegistryEx.pas
r145 r153 133 133 //CloseKey; 134 134 {$ENDIF} 135 Result := inherited OpenKey(Key, CanCreate);135 Result := inherited; 136 136 end; 137 137 -
trunk/Packages/Common/StopWatch.pas
r145 r153 13 13 TStopWatch = class 14 14 private 15 fFrequency: TLargeInteger;16 fIsRunning: Boolean;17 fIsHighResolution: Boolean;18 fStartCount, fStopCount: TLargeInteger;19 procedure SetTickStamp(var lInt : TLargeInteger);15 FFrequency: TLargeInteger; 16 FIsRunning: Boolean; 17 FIsHighResolution: Boolean; 18 FStartCount, fStopCount: TLargeInteger; 19 procedure SetTickStamp(var Value: TLargeInteger); 20 20 function GetElapsedTicks: TLargeInteger; 21 21 function GetElapsedMiliseconds: TLargeInteger; 22 22 function GetElapsed: string; 23 23 public 24 constructor Create(const startOnCreate: Boolean = False) ;24 constructor Create(const StartOnCreate: Boolean = False) ; 25 25 procedure Start; 26 26 procedure Stop; 27 property IsHighResolution : Boolean read fIsHighResolution;28 property ElapsedTicks 29 property ElapsedMiliseconds 30 property Elapsed 31 property IsRunning : Boolean read fIsRunning;27 property IsHighResolution: Boolean read FIsHighResolution; 28 property ElapsedTicks: TLargeInteger read GetElapsedTicks; 29 property ElapsedMiliseconds: TLargeInteger read GetElapsedMiliseconds; 30 property Elapsed: string read GetElapsed; 31 property IsRunning: Boolean read FIsRunning; 32 32 end; 33 33 … … 35 35 implementation 36 36 37 constructor TStopWatch.Create(const startOnCreate : boolean = false);37 constructor TStopWatch.Create(const StartOnCreate: Boolean = False); 38 38 begin 39 inherited Create; 40 41 fIsRunning := False; 39 FIsRunning := False; 42 40 43 41 {$IFDEF WINDOWS} 44 42 fIsHighResolution := QueryPerformanceFrequency(fFrequency) ; 45 43 {$ELSE} 46 fIsHighResolution := False;44 FIsHighResolution := False; 47 45 {$ENDIF} 48 if NOT fIsHighResolution then fFrequency := MSecsPerSec;46 if NOT FIsHighResolution then FFrequency := MSecsPerSec; 49 47 50 48 if StartOnCreate then Start; … … 53 51 function TStopWatch.GetElapsedTicks: TLargeInteger; 54 52 begin 55 Result := fStopCount - fStartCount;53 Result := FStopCount - FStartCount; 56 54 end; 57 55 58 procedure TStopWatch.SetTickStamp(var lInt : TLargeInteger);56 procedure TStopWatch.SetTickStamp(var Value: TLargeInteger); 59 57 begin 60 if fIsHighResolution then58 if FIsHighResolution then 61 59 {$IFDEF Windows} 62 QueryPerformanceCounter( lInt)60 QueryPerformanceCounter(Value) 63 61 {$ELSE} 64 62 {$ENDIF} 65 63 else 66 lInt := MilliSecondOf(Now);64 Value := MilliSecondOf(Now); 67 65 end; 68 66 69 67 function TStopWatch.GetElapsed: string; 70 68 var 71 dt: TDateTime;69 Elapsed: TDateTime; 72 70 begin 73 dt:= ElapsedMiliseconds / MSecsPerSec / SecsPerDay;74 result := Format('%d days, %s', [Trunc(dt), FormatDateTime('hh:nn:ss.z', Frac(dt))]) ;71 Elapsed := ElapsedMiliseconds / MSecsPerSec / SecsPerDay; 72 Result := Format('%d days, %s', [Trunc(Elapsed), FormatDateTime('hh:nn:ss.z', Frac(Elapsed))]) ; 75 73 end; 76 74 77 75 function TStopWatch.GetElapsedMiliseconds: TLargeInteger; 78 76 begin 79 Result := (MSecsPerSec * (fStopCount - fStartCount)) div fFrequency;77 Result := (MSecsPerSec * (fStopCount - FStartCount)) div FFrequency; 80 78 end; 81 79 82 80 procedure TStopWatch.Start; 83 81 begin 84 SetTickStamp( fStartCount);85 fIsRunning := True;82 SetTickStamp(FStartCount); 83 FIsRunning := True; 86 84 end; 87 85 88 86 procedure TStopWatch.Stop; 89 87 begin 90 SetTickStamp( fStopCount);91 fIsRunning := False;88 SetTickStamp(FStopCount); 89 FIsRunning := False; 92 90 end; 93 91 -
trunk/Packages/Common/Threading.pas
r145 r153 188 188 constructor TThreadList.Create; 189 189 begin 190 inherited Create;190 inherited; 191 191 end; 192 192 -
trunk/Target/TargetCSharp.pas
r145 r153 30 30 FSourceExtension := '.cs'; 31 31 FCompiledExtension := '.exe'; 32 FRunExtension := ' ';32 FRunExtension := '.exe'; 33 33 FImageIndex := 27; 34 34 FCapabilities := [tcCompile, tcRun]; -
trunk/Target/TargetJava.pas
r145 r153 30 30 FSourceExtension := '.java'; 31 31 FCompiledExtension := '.class'; 32 FRunExtension := ' ';32 FRunExtension := '.class'; 33 33 FImageIndex := 24; 34 34 FCapabilities := [tcCompile, tcRun];
Note:
See TracChangeset
for help on using the changeset viewer.