Changeset 154 for trunk/Forms


Ignore:
Timestamp:
Aug 14, 2024, 10:51:18 PM (3 months ago)
Author:
chronos
Message:
  • Added: Key shortcuts form to see all available actions and their key shortcuts.
Location:
trunk/Forms
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormMain.lfm

    r153 r154  
    388388        Action = AHelp
    389389      end
     390      object MenuItem29: TMenuItem
     391        Action = AKeyShortcuts
     392      end
    390393      object MenuItem14: TMenuItem
    391394        Action = AAbout
     
    453456    end
    454457    object AAbout: TAction
     458      Category = 'Help'
    455459      Caption = 'About'
    456460      OnExecute = AAboutExecute
    457461    end
    458462    object AHelp: TAction
     463      Category = 'Help'
    459464      Caption = 'Help'
    460465      ImageIndex = 6
     
    514519    end
    515520    object AViewCompilers: TAction
    516       Category = 'View'
     521      Category = 'Tools'
    517522      Caption = 'Compilers'
    518523      OnExecute = AViewCompilersExecute
     
    534539    end
    535540    object AViewLog: TAction
    536       Category = 'View'
     541      Category = 'Tools'
    537542      Caption = 'Log'
    538543      OnExecute = AViewLogExecute
     
    546551      Category = 'View'
    547552      Caption = 'Full screen'
     553      ImageIndex = 31
    548554      OnExecute = AFullScreenExecute
    549555      ShortCut = 122
     556    end
     557    object AKeyShortcuts: TAction
     558      Category = 'Help'
     559      Caption = 'Key shortcuts'
     560      ImageIndex = 32
     561      OnExecute = AKeyShortcutsExecute
    550562    end
    551563  end
  • trunk/Forms/FormMain.lrj

    r153 r154  
    3939{"hash":21335,"name":"tformmain.aviewlog.caption","sourcebytes":[76,111,103],"value":"Log"},
    4040{"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"}
     41{"hash":131549534,"name":"tformmain.afullscreen.caption","sourcebytes":[70,117,108,108,32,115,99,114,101,101,110],"value":"Full screen"},
     42{"hash":122803571,"name":"tformmain.akeyshortcuts.caption","sourcebytes":[75,101,121,32,115,104,111,114,116,99,117,116,115],"value":"Key shortcuts"}
    4243]}
  • trunk/Forms/FormMain.pas

    r153 r154  
    77  Graphics, Dialogs, Menus, ActnList, ComCtrls, ExtCtrls, Target, Registry,
    88  LazFileUtils, FormOptions, FormMessages, FormTargets, FormCompileMultiple,
    9   FormOutput, FormMemory, FormSourceCode, FormTargetCode, FormLog, FormEx;
     9  FormOutput, FormMemory, FormSourceCode, FormTargetCode, FormLog, FormEx,
     10  FormKeyShortcuts;
    1011
    1112type
     
    1415
    1516  TFormMain = class(TFormEx)
     17    AKeyShortcuts: TAction;
    1618    AFullScreen: TAction;
    1719    AProgramCompileMultiple: TAction;
     
    6264    MenuItem27: TMenuItem;
    6365    MenuItem28: TMenuItem;
     66    MenuItem29: TMenuItem;
    6467    MenuItem30: TMenuItem;
    6568    MenuItem31: TMenuItem;
     
    122125    procedure AFullScreenExecute(Sender: TObject);
    123126    procedure AHelpExecute(Sender: TObject);
     127    procedure AKeyShortcutsExecute(Sender: TObject);
    124128    procedure AOptionsExecute(Sender: TObject);
    125129    procedure AProgramCompileExecute(Sender: TObject);
     
    159163    FormSourceCode: TFormSourceCode;
    160164    FormTargetCode: TFormTargetCode;
     165    FormKeyShortcuts: TFormKeyShortcuts;
    161166    procedure AProjectOpenRecentExecute(Sender: TObject);
    162167    procedure MenuItemTargetClick(Sender: TObject);
     
    406411  FreeAndNil(FormOutput);
    407412  FreeAndNil(FormTargetCode);
     413  if Assigned(FormKeyShortcuts) then FreeAndNil(FormKeyShortcuts);
    408414end;
    409415
     
    497503begin
    498504  FormHelp := TFormHelp.Create(nil);
    499   FormHelp.ShowModal;
    500   FormHelp.Free;
     505  try
     506    FormHelp.ShowModal;
     507  finally
     508    FormHelp.Free;
     509  end;
     510end;
     511
     512procedure TFormMain.AKeyShortcutsExecute(Sender: TObject);
     513begin
     514  if not Assigned(FormKeyShortcuts) then FormKeyShortcuts := TFormKeyShortcuts.Create(nil);
     515  FormKeyShortcuts.SourceComponents.Clear;
     516  FormKeyShortcuts.SourceComponents.Add(Self);
     517  FormKeyShortcuts.Show;
    501518end;
    502519
  • trunk/Forms/FormSourceCode.lfm

    r153 r154  
    1717    Width = 672
    1818    Align = alClient
     19    Font.Height = 13
    1920    Font.Name = 'Courier New'
    2021    Font.Pitch = fpFixed
     
    2627    OnKeyUp = MemoSourceKeyUp
    2728    OnMouseDown = MemoSourceMouseDown
    28     Gutter.Width = 84
     29    Gutter.Width = 76
    2930    Gutter.MouseActions = <>
    3031    RightGutter.Width = 0
     
    480481      end
    481482      object SynGutterLineNumber1: TSynGutterLineNumber
    482         Width = 25
     483        Width = 17
    483484        MouseActions = <>
    484485        MarkupInfo.Background = clBtnFace
Note: See TracChangeset for help on using the changeset viewer.