diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/adapad.adb | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/src/adapad.adb b/src/adapad.adb index 413306f..f3c2d36 100644 --- a/src/adapad.adb +++ b/src/adapad.adb @@ -194,6 +194,19 @@ function AdaPad return Integer is + type Select_All_Callback is new Editor_Callback with null record; + Select_All_CB : aliased Select_All_Callback; + + overriding procedure Call + (This : in Select_All_Callback; + Item : in out Widget'Class) is + begin + This.Buffer.Set_Selection (0, This.Buffer.Length); + end Call; + + + + type Find_Callback is new Editor_Callback with null record; Find_CB : aliased Find_Callback; @@ -366,22 +379,23 @@ begin Bar : Menu_Cursor := Pad.Get_Menu; begin Bar.Add (Text => "&File", Flags => Flag_Submenu); - Bar.Add ("File/&New", New_CB'Access, Mod_Ctrl + 'n'); - Bar.Add ("File/&Open...", Open_CB'Access, Mod_Ctrl + 'o'); - Bar.Add ("File/&Save", Save_CB'Access, Mod_Ctrl + 's'); - Bar.Add ("File/Save &As...", Save_As_CB'Access, Mod_Shift + Mod_Ctrl + 's'); - Bar.Add ("File/&Quit", Quit_CB'Access, Mod_Ctrl + 'q'); + Bar.Add ("File/&New", New_CB'Access, Mod_Ctrl + 'n'); + Bar.Add ("File/&Open...", Open_CB'Access, Mod_Ctrl + 'o'); + Bar.Add ("File/&Save", Save_CB'Access, Mod_Ctrl + 's'); + Bar.Add ("File/Save &As...", Save_As_CB'Access, Mod_Shift + Mod_Ctrl + 's', Flag_Divider); + Bar.Add ("File/&Quit", Quit_CB'Access, Mod_Ctrl + 'q'); Bar.Add (Text => "&Edit", Flags => Flag_Submenu); - Bar.Add ("Edit/&Undo", Undo_CB'Access, Mod_Ctrl + 'z'); - Bar.Add ("Edit/Cu&t", Cut_CB'Access, Mod_Ctrl + 'x'); - Bar.Add ("Edit/&Copy", Copy_CB'Access, Mod_Ctrl + 'c'); - Bar.Add ("Edit/&Paste", Paste_CB'Access, Mod_Ctrl + 'v'); - Bar.Add ("Edit/&Delete", Delete_CB'Access); + Bar.Add ("Edit/&Undo", Undo_CB'Access, Mod_Ctrl + 'z', Flag_Divider); + Bar.Add ("Edit/Cu&t", Cut_CB'Access, Mod_Ctrl + 'x'); + Bar.Add ("Edit/&Copy", Copy_CB'Access, Mod_Ctrl + 'c'); + Bar.Add ("Edit/&Paste", Paste_CB'Access, Mod_Ctrl + 'v'); + Bar.Add ("Edit/&Delete", Delete_CB'Access, No_Key, Flag_Divider); + Bar.Add ("Edit/Select &All", Select_All_CB'Access, Mod_Ctrl + 'a'); Bar.Add (Text => "&Search", Flags => Flag_Submenu); - Bar.Add ("Search/&Find...", Find_CB'Access, Mod_Ctrl + 'f'); - Bar.Add ("Search/&Replace...", Replace_CB'Access, Mod_Ctrl + 'h'); + Bar.Add ("Search/&Find...", Find_CB'Access, Mod_Ctrl + 'f'); + Bar.Add ("Search/&Replace...", Replace_CB'Access, Mod_Ctrl + 'h'); Bar.Add (Text => "&Help", Flags => Flag_Submenu); Bar.Add ("Help/&About", About_CB'Access); |