summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-05-24 20:32:27 +1000
committerJed Barber <jjbarber@y7mail.com>2017-05-24 20:32:27 +1000
commit4a4bb20c15fdb43df7914dfa7aea090a9ad7fe9a (patch)
tree9237ed7c1cfcc6b46ca101276facf2c9493a208f
parente13794b5de63e7fb085dff6e495130e541a3a19e (diff)
Slight code formatting cleanup, updated to-do
-rw-r--r--src/adapad.adb46
-rw-r--r--src/windows-about.ads14
-rw-r--r--to_do.txt3
3 files changed, 30 insertions, 33 deletions
diff --git a/src/adapad.adb b/src/adapad.adb
index 6986713..2eee6bb 100644
--- a/src/adapad.adb
+++ b/src/adapad.adb
@@ -304,7 +304,8 @@ package body Adapad is
Result := Result + 1;
end loop;
Editor.Set_Insert_Position (Restore_Position);
- FLTK.Dialogs.Message_Box ("There are " & Integer'Image (Result) & " words in the document.");
+ FLTK.Dialogs.Message_Box
+ ("There are " & Integer'Image (Result) & " words in the document.");
end Count_CB;
@@ -626,42 +627,41 @@ package body Adapad is
begin
- -- definitely need to work out a better tabular structure for this code block
declare
use FLTK;
use FLTK.Widgets.Menus;
Bar : Menu_Cursor := Editor.Get_Menu_Bar;
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 (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', Flag_Divider);
- Bar.Add ("File/&Quit", Quit_CB'Access, Mod_Ctrl + 'q');
+ 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', Flag_Inactive);
+ Bar.Add (Text => "&Edit", Flags => Flag_Submenu);
+ Bar.Add ("Edit/&Undo", Undo_CB'Access, Mod_Ctrl + 'z', Flag_Inactive);
Bar.Add ("Edit/&Redo", Redo_CB'Access, Mod_Shift + Mod_Ctrl + 'z', Flag_Inactive + Flag_Divider);
- Bar.Add ("Edit/Cu&t", Cut_CB'Access, Mod_Ctrl + 'x', Flag_Inactive);
- Bar.Add ("Edit/&Copy", Copy_CB'Access, Mod_Ctrl + 'c', Flag_Inactive);
- Bar.Add ("Edit/&Paste", Paste_CB'Access, Mod_Ctrl + 'v');
- Bar.Add ("Edit/&Delete", Delete_CB'Access, No_Key, Flag_Inactive + Flag_Divider);
- Bar.Add ("Edit/Select &All", Select_All_CB'Access, Mod_Ctrl + 'a');
+ Bar.Add ("Edit/Cu&t", Cut_CB'Access, Mod_Ctrl + 'x', Flag_Inactive);
+ Bar.Add ("Edit/&Copy", Copy_CB'Access, Mod_Ctrl + 'c', Flag_Inactive);
+ Bar.Add ("Edit/&Paste", Paste_CB'Access, Mod_Ctrl + 'v');
+ Bar.Add ("Edit/&Delete", Delete_CB'Access, No_Key, Flag_Inactive + 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/Find &Next", Find_Next_CB'Access, Mod_Ctrl + 'g', Flag_Inactive);
+ Bar.Add ("Search/&Find...", Find_CB'Access, Mod_Ctrl + 'f');
+ Bar.Add ("Search/Find &Next", Find_Next_CB'Access, Mod_Ctrl + 'g', Flag_Inactive);
Bar.Add ("Search/Find &Previous", Find_Prev_CB'Access, Mod_Shift + Mod_Ctrl + 'g', Flag_Inactive);
- Bar.Add ("Search/&Replace...", Replace_CB'Access, Mod_Ctrl + 'h', Flag_Divider);
- Bar.Add ("Search/Jump To...", Jump_CB'Access, Mod_Ctrl + 'j');
- Bar.Add ("Search/Word Count", Count_CB'Access);
+ Bar.Add ("Search/&Replace...", Replace_CB'Access, Mod_Ctrl + 'h', Flag_Divider);
+ Bar.Add ("Search/Jump To...", Jump_CB'Access, Mod_Ctrl + 'j');
+ Bar.Add ("Search/Word Count", Count_CB'Access);
Bar.Add (Text => "&Options", Flags => Flag_Submenu);
- Bar.Add ("Options/&Word Wrap", Wrap_CB'Access, No_Key, Flag_Toggle);
- Bar.Add ("Options/&Line Numbers", Lines_CB'Access, No_Key, Flag_Toggle);
+ Bar.Add ("Options/&Word Wrap", Wrap_CB'Access, No_Key, Flag_Toggle);
+ Bar.Add ("Options/&Line Numbers", Lines_CB'Access, No_Key, Flag_Toggle);
- Bar.Add (Text => "&Help", Flags => Flag_Submenu);
- Bar.Add ("Help/&About", About_CB'Access);
+ Bar.Add (Text => "&Help", Flags => Flag_Submenu);
+ Bar.Add ("Help/&About", About_CB'Access);
end;
diff --git a/src/windows-about.ads b/src/windows-about.ads
index 9396825..0d605f9 100644
--- a/src/windows-about.ads
+++ b/src/windows-about.ads
@@ -30,13 +30,13 @@ private
type About_Window is new FLTK.Widgets.Groups.Windows.Double.Double_Window with
- record
- Picture : FLTK.Widgets.Boxes.Box;
- Heading : FLTK.Widgets.Boxes.Box;
- Blurb : FLTK.Widgets.Boxes.Box;
- Author : FLTK.Widgets.Boxes.Box;
- Dismiss : FLTK.Widgets.Buttons.Enter.Enter_Button;
- end record;
+ record
+ Picture : FLTK.Widgets.Boxes.Box;
+ Heading : FLTK.Widgets.Boxes.Box;
+ Blurb : FLTK.Widgets.Boxes.Box;
+ Author : FLTK.Widgets.Boxes.Box;
+ Dismiss : FLTK.Widgets.Buttons.Enter.Enter_Button;
+ end record;
end Windows.About;
diff --git a/to_do.txt b/to_do.txt
index 17e8a9a..629b540 100644
--- a/to_do.txt
+++ b/to_do.txt
@@ -3,9 +3,6 @@
To Do:
- suppress unnecessary left/right scrollbar
-- clean up menu widget code, adapad menu and callback code, change_vector code
-- make shortcut_key types private somehow
-- introduce maybe type to eliminate out parameters in search_forward/search_backward
- eliminate image/text_buffer runtime warnings
- add license