Changeset 153 for trunk/Forms


Ignore:
Timestamp:
Aug 14, 2024, 1:05:13 PM (4 months ago)
Author:
chronos
Message:
  • Added: Full screen switching support.
  • Added: Help form.
  • Modified: Updated Common package.
  • Fixed: Execution of compiled Java and C# programs.
  • Fixed: Removed interlanced empty lines in Console form on Unix.
Location:
trunk/Forms
Files:
4 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormConsole.lfm

    r151 r153  
    11object FormConsole: TFormConsole
    2   Left = 449
    3   Height = 727
    4   Top = 261
    5   Width = 975
     2  Left = 779
     3  Height = 689
     4  Top = 375
     5  Width = 1002
    66  Caption = 'Console'
    7   ClientHeight = 727
    8   ClientWidth = 975
     7  ClientHeight = 689
     8  ClientWidth = 1002
     9  DesignTimePPI = 144
    910  OnClose = FormClose
    1011  OnCreate = FormCreate
     
    1213  OnShow = FormShow
    1314  Position = poMainFormCenter
    14   LCLVersion = '1.5'
     15  LCLVersion = '3.4.0.0'
    1516  object Memo1: TMemo
    1617    Left = 4
    17     Height = 674
    18     Top = 48
    19     Width = 966
     18    Height = 628
     19    Top = 56
     20    Width = 993
    2021    Align = alCustom
    2122    Anchors = [akTop, akLeft, akRight, akBottom]
    22     BorderSpacing.Around = 2
    23     Font.Name = 'DejaVu Sans Mono'
     23    BorderSpacing.Around = 3
     24    Font.Name = 'Courier New'
    2425    ParentFont = False
    2526    ReadOnly = True
     
    2829  end
    2930  object ButtonAbort: TButton
    30     Left = 895
    31     Height = 25
    32     Top = 8
    33     Width = 75
     31    Left = 883
     32    Height = 38
     33    Top = 10
     34    Width = 112
    3435    Anchors = [akTop, akRight]
    3536    Caption = 'Abort'
     37    TabOrder = 1
    3638    OnClick = ButtonAbortClick
    37     TabOrder = 1
    3839  end
    3940  object EditCommand: TEdit
    4041    Left = 4
    41     Height = 35
    42     Top = 7
    43     Width = 884
     42    Height = 43
     43    Top = 10
     44    Width = 868
    4445    Anchors = [akTop, akLeft, akRight]
    4546    ReadOnly = True
     
    5051    Interval = 1
    5152    OnTimer = Timer1Timer
    52     left = 72
    53     top = 112
     53    Left = 108
     54    Top = 168
    5455  end
    5556end
  • trunk/Forms/FormConsole.pas

    r151 r153  
    102102    Process.Parameters.Assign(Parameters);
    103103    Process.Executable := Executable;
    104     CommandLine := Executable + ' ' + StringReplace(Parameters.Text, LineEnding, ' ', [rfReplaceAll]);
     104    CommandLine := Executable + ' ' + StringReplace(Parameters.Text, LineEnding,
     105      ' ', [rfReplaceAll]);
    105106    if CommandLine[Length(CommandLine)] = LineEnding then
    106107      SetLength(CommandLine, Length(CommandLine) - 1);
     
    117118        SetLength(Buffer, Count);
    118119        Text := Text + Buffer;
     120        {$IFDEF UNIX}
     121        Text := StringReplace(Text, #10#13, LineEnding, [rfReplaceAll]);
     122        {$ENDIF}
    119123        while Pos(LineEnding, Text) > 0 do begin
    120124          Line := Copy(Text, 1, Pos(LineEnding, Text) - 1);
     
    130134        SetLength(Buffer, Count);
    131135        Text := Text + Buffer;
     136        {$IFDEF UNIX}
     137        Text := StringReplace(Text, #10#13, LineEnding, [rfReplaceAll]);
     138        {$ENDIF}
    132139        while Pos(LineEnding, Text) > 0 do begin
    133140          Line := Copy(Text, 1, Pos(LineEnding, Text) - 1);
  • trunk/Forms/FormInput.lfm

    r149 r153  
    11object FormInput: TFormInput
    2   Left = 256
     2  Left = 1040
    33  Height = 360
    4   Top = 32
     4  Top = 540
    55  Width = 480
    66  Caption = 'Input'
     
    1616    Align = alClient
    1717    BorderSpacing.Around = 6
    18     Font.Height = -18
    1918    Font.Name = 'Courier New'
    2019    ParentFont = False
  • trunk/Forms/FormMain.lfm

    r150 r153  
    99  DesignTimePPI = 144
    1010  Menu = MainMenu1
     11  OnActivate = FormActivate
    1112  OnClose = FormClose
    1213  OnCloseQuery = FormCloseQuery
     
    325326      end
    326327    end
     328    object MenuItem23: TMenuItem
     329      Caption = 'View'
     330      object MenuItem26: TMenuItem
     331        Action = AFullScreen
     332      end
     333    end
    327334    object MenuItem9: TMenuItem
    328335      Caption = 'Run'
     
    388395  object ActionList1: TActionList
    389396    Images = Core.ImageListMain
    390     Left = 261
     397    Left = 264
    391398    Top = 230
    392399    object AProjectOpen: TAction
     
    452459      Caption = 'Help'
    453460      ImageIndex = 6
     461      OnExecute = AHelpExecute
    454462    end
    455463    object AProgramPause: TAction
     
    500508    end
    501509    object AOptions: TAction
    502       Category = 'View'
     510      Category = 'Tools'
    503511      Caption = 'Options'
    504512      ImageIndex = 2
     
    534542      Caption = 'Compile multiple...'
    535543      OnExecute = AProgramCompileMultipleExecute
     544    end
     545    object AFullScreen: TAction
     546      Category = 'View'
     547      Caption = 'Full screen'
     548      OnExecute = AFullScreenExecute
     549      ShortCut = 122
    536550    end
    537551  end
  • trunk/Forms/FormMain.lrj

    r145 r153  
    1010{"hash":131987540,"name":"tformmain.menuitemopenrecent.caption","sourcebytes":[79,112,101,110,32,114,101,99,101,110,116],"value":"Open recent"},
    1111{"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"},
    1213{"hash":22974,"name":"tformmain.menuitem9.caption","sourcebytes":[82,117,110],"value":"Run"},
    1314{"hash":94932420,"name":"tformmain.menuitemtarget.caption","sourcebytes":[84,97,114,103,101,116],"value":"Target"},
     
    3738{"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"},
    3839{"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"}
    4042]}
  • trunk/Forms/FormMain.pas

    r152 r153  
    1414
    1515  TFormMain = class(TFormEx)
     16    AFullScreen: TAction;
    1617    AProgramCompileMultiple: TAction;
    1718    AViewLog: TAction;
     
    5556    MenuItem21: TMenuItem;
    5657    MenuItem22: TMenuItem;
     58    MenuItem23: TMenuItem;
    5759    MenuItem24: TMenuItem;
    5860    MenuItem25: TMenuItem;
     61    MenuItem26: TMenuItem;
    5962    MenuItem27: TMenuItem;
    6063    MenuItem28: TMenuItem;
     
    117120    procedure ABreakpointToggleExecute(Sender: TObject);
    118121    procedure AExitExecute(Sender: TObject);
     122    procedure AFullScreenExecute(Sender: TObject);
     123    procedure AHelpExecute(Sender: TObject);
    119124    procedure AOptionsExecute(Sender: TObject);
    120125    procedure AProgramCompileExecute(Sender: TObject);
     
    138143    procedure AViewInterpreterExecute(Sender: TObject);
    139144    procedure AViewLogExecute(Sender: TObject);
     145    procedure FormActivate(Sender: TObject);
    140146    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    141147    procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
     
    176182
    177183uses
    178   Core, TargetInterpreter, BFTarget, Common, FormAbout;
     184  Core, TargetInterpreter, BFTarget, Common, FormAbout, FormHelp;
    179185
    180186resourcestring
     
    342348    AShowSourcePosition.Enabled := CurrentTarget.Compiled;
    343349    AShowTargetPosition.Enabled := CurrentTarget.Compiled;
     350    AFullScreen.Checked := FullScreen;
    344351  end;
    345352  UpdateStatusBar;
     
    453460end;
    454461
     462procedure TFormMain.FormActivate(Sender: TObject);
     463begin
     464  AFullScreen.Checked := FullScreen;
     465end;
     466
    455467procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    456468begin
     
    469481begin
    470482  Close;
     483end;
     484
     485procedure TFormMain.AFullScreenExecute(Sender: TObject);
     486begin
     487  FullScreen := not FullScreen;
     488  AFullScreen.Checked := FullScreen;
     489  TFormEx.PersistentForm.Save(Self);
     490  TFormEx.PersistentForm.SetFullScreen(FullScreen);
     491  UpdateInterface;
     492end;
     493
     494procedure TFormMain.AHelpExecute(Sender: TObject);
     495var
     496  FormHelp: TFormHelp;
     497begin
     498  FormHelp := TFormHelp.Create(nil);
     499  FormHelp.ShowModal;
     500  FormHelp.Free;
    471501end;
    472502
  • trunk/Forms/FormMemory.lfm

    r149 r153  
    11object FormMemory: TFormMemory
    2   Left = 565
    3   Height = 401
    4   Top = 168
    5   Width = 1039
     2  Left = 705
     3  Height = 866
     4  Top = 287
     5  Width = 1150
    66  Caption = 'Memory'
    7   ClientHeight = 401
    8   ClientWidth = 1039
     7  ClientHeight = 866
     8  ClientWidth = 1150
    99  DesignTimePPI = 144
    1010  LCLVersion = '3.4.0.0'
     
    1313    Height = 26
    1414    Top = 6
    15     Width = 1027
     15    Width = 1138
    1616    Align = alTop
    1717    BorderSpacing.Around = 6
     
    2222  object ListViewMemory: TListView
    2323    Left = 6
    24     Height = 357
     24    Height = 822
    2525    Top = 38
    26     Width = 1027
     26    Width = 1138
    2727    Align = alClient
    2828    BorderSpacing.Around = 6
     
    3838      item
    3939        Caption = 'Text'
    40         Width = 397
     40        Width = 508
    4141      end>
    42     Font.Height = -18
    4342    Font.Name = 'Courier New'
    4443    OwnerData = True
  • trunk/Forms/FormOptions.lfm

    r149 r153  
    11object FormOptions: TFormOptions
    2   Left = 401
     2  Left = 916
    33  Height = 427
    4   Top = 236
     4  Top = 506
    55  Width = 728
    66  Caption = 'Options'
     
    99  DesignTimePPI = 144
    1010  OnCreate = FormCreate
    11   LCLVersion = '2.2.6.0'
     11  LCLVersion = '3.4.0.0'
    1212  object ButtonOk: TButton
    1313    Left = 631
     
    9696          AutoSize = False
    9797          Caption = 'Automatic DPI'
     98          ParentFont = False
     99          TabOrder = 2
    98100          OnChange = CheckBoxDPIAutoChange
    99           ParentFont = False
    100           TabOrder = 2
    101101        end
    102102        object LabelDPI: TLabel
     
    196196            'Normal'
    197197          )
    198           OnSelect = CheckBoxDPIAutoChange
    199198          ParentFont = False
    200199          Style = csDropDownList
    201200          TabOrder = 0
     201          OnSelect = CheckBoxDPIAutoChange
    202202        end
    203203        object CheckBoxOptimizeAddSub: TCheckBox
     
    225225          Width = 142
    226226          Caption = 'Copy multiply'
     227          ParentFont = False
     228          TabOrder = 3
    227229          OnChange = CheckBoxOptimizeCopyMultiplyChange
    228           ParentFont = False
    229           TabOrder = 3
    230230        end
    231231        object CheckBoxOptimizeRelativeIndexes: TCheckBox
     
    235235          Width = 162
    236236          Caption = 'Relative indexes'
     237          ParentFont = False
     238          TabOrder = 4
    237239          OnChange = CheckBoxOptimizeRelativeIndexesChange
    238           ParentFont = False
    239           TabOrder = 4
    240240        end
    241241        object Label2: TLabel
  • trunk/Forms/FormOutput.lfm

    r149 r153  
    11object FormOutput: TFormOutput
    2   Left = 736
    3   Height = 343
    4   Top = 502
    5   Width = 640
     2  Left = 814
     3  Height = 544
     4  Top = 448
     5  Width = 932
    66  Caption = 'Output'
    7   ClientHeight = 343
    8   ClientWidth = 640
     7  ClientHeight = 544
     8  ClientWidth = 932
    99  DesignTimePPI = 144
    1010  LCLVersion = '3.4.0.0'
     
    1313    Height = 26
    1414    Top = 4
    15     Width = 632
     15    Width = 924
    1616    Align = alTop
    1717    BorderSpacing.Around = 4
     
    2121  object MemoOutput: TMemo
    2222    Left = 4
    23     Height = 305
     23    Height = 506
    2424    Top = 34
    25     Width = 632
     25    Width = 924
    2626    Align = alClient
    2727    BorderSpacing.Around = 4
    28     Font.Height = -12
    2928    Font.Name = 'Courier New'
    3029    ParentFont = False
  • trunk/Forms/FormSourceCode.lfm

    r150 r153  
    1717    Width = 672
    1818    Align = alClient
    19     Font.Height = -16
    2019    Font.Name = 'Courier New'
    2120    Font.Pitch = fpFixed
     
    2726    OnKeyUp = MemoSourceKeyUp
    2827    OnMouseDown = MemoSourceMouseDown
    29     Gutter.Width = 80
     28    Gutter.Width = 84
    3029    Gutter.MouseActions = <>
    3130    RightGutter.Width = 0
     
    481480      end
    482481      object SynGutterLineNumber1: TSynGutterLineNumber
    483         Width = 21
     482        Width = 25
    484483        MouseActions = <>
    485484        MarkupInfo.Background = clBtnFace
  • trunk/Forms/FormTargetCode.lfm

    r149 r153  
    11object FormTargetCode: TFormTargetCode
    2   Left = 555
     2  Left = 913
    33  Height = 522
    4   Top = 379
     4  Top = 459
    55  Width = 734
    66  Caption = 'Target code'
     
    1515    Width = 734
    1616    Align = alClient
    17     Font.Height = -16
     17    Font.Height = 13
    1818    Font.Name = 'Courier New'
    1919    Font.Pitch = fpFixed
     
    2323    PopupMenu = PopupMenuTarget
    2424    TabOrder = 0
    25     Gutter.Width = 81
     25    Gutter.Width = 77
    2626    Gutter.MouseActions = <>
    2727    RightGutter.Width = 0
     
    476476      end
    477477      object SynGutterLineNumber1: TSynGutterLineNumber
    478         Width = 21
     478        Width = 17
    479479        MouseActions = <>
    480480        MarkupInfo.Background = clBtnFace
  • trunk/Forms/FormTargetOptions.lfm

    r149 r153  
    11object FormTargetOptions: TFormTargetOptions
    2   Left = 667
    3   Height = 242
    4   Top = 613
    5   Width = 586
     2  Left = 987
     3  Height = 216
     4  Top = 599
     5  Width = 609
    66  Caption = 'Target options'
    7   ClientHeight = 242
    8   ClientWidth = 586
     7  ClientHeight = 216
     8  ClientWidth = 609
    99  DesignTimePPI = 144
    10   LCLVersion = '2.0.10.0'
     10  LCLVersion = '3.4.0.0'
    1111  object Edit1: TEdit
    1212    Left = 10
    13     Height = 42
     13    Height = 43
    1414    Top = 38
    15     Width = 469
     15    Width = 492
    1616    Anchors = [akTop, akLeft, akRight]
    1717    ParentFont = False
     
    2020  object Label1: TLabel
    2121    Left = 10
    22     Height = 24
     22    Height = 26
    2323    Top = 8
    2424    Width = 155
     
    2828  end
    2929  object ButtonCompiler: TButton
    30     Left = 489
     30    Left = 512
    3131    Height = 37
    3232    Top = 42
     
    3434    Anchors = [akTop, akRight]
    3535    Caption = 'Select...'
    36     OnClick = ButtonCompilerClick
    3736    ParentFont = False
    3837    TabOrder = 1
     38    OnClick = ButtonCompilerClick
    3939  end
    4040  object ButtonExecute: TButton
    41     Left = 489
     41    Left = 512
    4242    Height = 37
    4343    Top = 115
     
    4545    Anchors = [akTop, akRight]
    4646    Caption = 'Select...'
    47     OnClick = ButtonExecuteClick
    4847    ParentFont = False
    4948    TabOrder = 2
     49    OnClick = ButtonExecuteClick
    5050  end
    5151  object Edit2: TEdit
    5252    Left = 10
    53     Height = 42
     53    Height = 43
    5454    Top = 115
    55     Width = 469
     55    Width = 492
    5656    Anchors = [akTop, akLeft, akRight]
    5757    ParentFont = False
     
    6060  object Label2: TLabel
    6161    Left = 10
    62     Height = 24
     62    Height = 26
    6363    Top = 86
    6464    Width = 151
     
    6868  end
    6969  object ButtonOk: TButton
    70     Left = 463
     70    Left = 486
    7171    Height = 37
    72     Top = 191
     72    Top = 165
    7373    Width = 109
    7474    Anchors = [akRight, akBottom]
     
    7979  end
    8080  object ButtonCancel: TButton
    81     Left = 328
     81    Left = 351
    8282    Height = 37
    83     Top = 191
     83    Top = 165
    8484    Width = 109
    8585    Anchors = [akRight, akBottom]
     
    8989    TabOrder = 5
    9090  end
    91   object OpenDialog1: TOpenDialog
    92     DefaultExt = '.exe'
    93     Filter = 'Program (*.exe)|*.exe|JakÃœkoliv soubor (*.*)|*.*'
    94     Left = 118
    95     Top = 145
    96   end
    9791end
Note: See TracChangeset for help on using the changeset viewer.