diff options
author | Jed Barber <jjbarber@y7mail.com> | 2017-06-10 22:53:19 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2017-06-10 22:53:19 +1000 |
commit | 50ebd224ee7dbed4494d43fd63cdc794380a9a36 (patch) | |
tree | 521eb0ca223acc4941cb92ded0f7ad6721f562b9 /src/fltk-widgets-groups-text_displays-text_editors.adb | |
parent | 72667dc66496412f74d822967eaa9dee835daf6d (diff) |
The rest of the static keybinding procedures added to Text_Editor package
Diffstat (limited to 'src/fltk-widgets-groups-text_displays-text_editors.adb')
-rw-r--r-- | src/fltk-widgets-groups-text_displays-text_editors.adb | 388 |
1 files changed, 363 insertions, 25 deletions
diff --git a/src/fltk-widgets-groups-text_displays-text_editors.adb b/src/fltk-widgets-groups-text_displays-text_editors.adb index dc47d72..73744ca 100644 --- a/src/fltk-widgets-groups-text_displays-text_editors.adb +++ b/src/fltk-widgets-groups-text_displays-text_editors.adb @@ -32,6 +32,14 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is + procedure fl_text_editor_default + (TE : in System.Address; + K : in Interfaces.C.int); + pragma Import (C, fl_text_editor_default, "fl_text_editor_default"); + + + + procedure fl_text_editor_undo (TE : in System.Address); pragma Import (C, fl_text_editor_undo, "fl_text_editor_undo"); @@ -52,12 +60,32 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is (TE : in System.Address); pragma Import (C, fl_text_editor_delete, "fl_text_editor_delete"); + procedure fl_text_editor_select_all + (TE : in System.Address); + pragma Import (C, fl_text_editor_select_all, "fl_text_editor_select_all"); + + procedure fl_text_editor_backspace (TE : in System.Address); pragma Import (C, fl_text_editor_backspace, "fl_text_editor_backspace"); + procedure fl_text_editor_insert + (TE : in System.Address); + pragma Import (C, fl_text_editor_insert, "fl_text_editor_insert"); + + procedure fl_text_editor_enter + (TE : in System.Address); + pragma Import (C, fl_text_editor_enter, "fl_text_editor_enter"); + + procedure fl_text_editor_ignore + (TE : in System.Address); + pragma Import (C, fl_text_editor_ignore, "fl_text_editor_ignore"); + + + + procedure fl_text_editor_home (TE : in System.Address); pragma Import (C, fl_text_editor_home, "fl_text_editor_home"); @@ -66,10 +94,6 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is (TE : in System.Address); pragma Import (C, fl_text_editor_end, "fl_text_editor_end"); - procedure fl_text_editor_insert - (TE : in System.Address); - pragma Import (C, fl_text_editor_insert, "fl_text_editor_insert"); - procedure fl_text_editor_page_down (TE : in System.Address); pragma Import (C, fl_text_editor_page_down, "fl_text_editor_page_down"); @@ -97,6 +121,111 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is + procedure fl_text_editor_shift_home + (TE : in System.Address); + pragma Import (C, fl_text_editor_shift_home, "fl_text_editor_shift_home"); + + procedure fl_text_editor_shift_end + (TE : in System.Address); + pragma Import (C, fl_text_editor_shift_end, "fl_text_editor_shift_end"); + + procedure fl_text_editor_shift_page_down + (TE : in System.Address); + pragma Import (C, fl_text_editor_shift_page_down, "fl_text_editor_shift_page_down"); + + procedure fl_text_editor_shift_page_up + (TE : in System.Address); + pragma Import (C, fl_text_editor_shift_page_up, "fl_text_editor_shift_page_up"); + + procedure fl_text_editor_shift_down + (TE : in System.Address); + pragma Import (C, fl_text_editor_shift_down, "fl_text_editor_shift_down"); + + procedure fl_text_editor_shift_left + (TE : in System.Address); + pragma Import (C, fl_text_editor_shift_left, "fl_text_editor_shift_left"); + + procedure fl_text_editor_shift_right + (TE : in System.Address); + pragma Import (C, fl_text_editor_shift_right, "fl_text_editor_shift_right"); + + procedure fl_text_editor_shift_up + (TE : in System.Address); + pragma Import (C, fl_text_editor_shift_up, "fl_text_editor_shift_up"); + + + + + procedure fl_text_editor_ctrl_home + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_home, "fl_text_editor_ctrl_home"); + + procedure fl_text_editor_ctrl_end + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_end, "fl_text_editor_ctrl_end"); + + procedure fl_text_editor_ctrl_page_down + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_page_down, "fl_text_editor_ctrl_page_down"); + + procedure fl_text_editor_ctrl_page_up + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_page_up, "fl_text_editor_ctrl_page_up"); + + procedure fl_text_editor_ctrl_down + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_down, "fl_text_editor_ctrl_down"); + + procedure fl_text_editor_ctrl_left + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_left, "fl_text_editor_ctrl_left"); + + procedure fl_text_editor_ctrl_right + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_right, "fl_text_editor_ctrl_right"); + + procedure fl_text_editor_ctrl_up + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_up, "fl_text_editor_ctrl_up"); + + + + + procedure fl_text_editor_ctrl_shift_home + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_shift_home, "fl_text_editor_ctrl_shift_home"); + + procedure fl_text_editor_ctrl_shift_end + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_shift_end, "fl_text_editor_ctrl_shift_end"); + + procedure fl_text_editor_ctrl_shift_page_down + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_shift_page_down, "fl_text_editor_ctrl_shift_page_down"); + + procedure fl_text_editor_ctrl_shift_page_up + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_shift_page_up, "fl_text_editor_ctrl_shift_page_up"); + + procedure fl_text_editor_ctrl_shift_down + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_shift_down, "fl_text_editor_ctrl_shift_down"); + + procedure fl_text_editor_ctrl_shift_left + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_shift_left, "fl_text_editor_ctrl_shift_left"); + + procedure fl_text_editor_ctrl_shift_right + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_shift_right, "fl_text_editor_ctrl_shift_right"); + + procedure fl_text_editor_ctrl_shift_up + (TE : in System.Address); + pragma Import (C, fl_text_editor_ctrl_shift_up, "fl_text_editor_ctrl_shift_up"); + + + + procedure fl_text_editor_remove_key_binding (TE : in System.Address; K : in Interfaces.C.unsigned; @@ -185,108 +314,143 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is + procedure Default + (This : in out Text_Editor'Class; + Key : in Shortcut_Key) is + begin + fl_text_editor_default + (This.Void_Ptr, + Character'Pos (Key.Keypress)); + end Default; + + + + procedure Undo - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_undo (This.Void_Ptr); end Undo; procedure Cut - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_cut (This.Void_Ptr); end Cut; procedure Copy - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_copy (This.Void_Ptr); end Copy; procedure Paste - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_paste (This.Void_Ptr); end Paste; procedure Delete - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_delete (This.Void_Ptr); end Delete; + procedure Select_All + (This : in out Text_Editor'Class) is + begin + fl_text_editor_select_all (This.Void_Ptr); + end Select_All; + + procedure Backspace_Key - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_backspace (This.Void_Ptr); end Backspace_Key; + procedure Insert_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_insert (This.Void_Ptr); + end Insert_Key; + + + procedure Enter_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_enter (This.Void_Ptr); + end Enter_Key; + + + procedure Ignore_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ignore (This.Void_Ptr); + end Ignore_Key; + + + + procedure Home_Key - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_home (This.Void_Ptr); end Home_Key; procedure End_Key - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_end (This.Void_Ptr); end End_Key; - procedure Insert_Key - (This : in out Text_Editor) is - begin - fl_text_editor_insert (This.Void_Ptr); - end Insert_Key; - - procedure Page_Down_Key - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_page_down (This.Void_Ptr); end Page_Down_Key; procedure Page_Up_Key - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_page_up (This.Void_Ptr); end Page_Up_Key; procedure Down_Key - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_down (This.Void_Ptr); end Down_Key; procedure Left_Key - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_left (This.Void_Ptr); end Left_Key; procedure Right_Key - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_right (This.Void_Ptr); end Right_Key; procedure Up_Key - (This : in out Text_Editor) is + (This : in out Text_Editor'Class) is begin fl_text_editor_up (This.Void_Ptr); end Up_Key; @@ -294,6 +458,180 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is + procedure Shift_Home_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_shift_home (This.Void_Ptr); + end Shift_Home_Key; + + + procedure Shift_End_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_shift_end (This.Void_Ptr); + end Shift_End_Key; + + + procedure Shift_Page_Down_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_shift_page_down (This.Void_Ptr); + end Shift_Page_Down_Key; + + + procedure Shift_Page_Up_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_shift_page_up (This.Void_Ptr); + end Shift_Page_Up_Key; + + + procedure Shift_Down_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_shift_down (This.Void_Ptr); + end Shift_Down_Key; + + + procedure Shift_Left_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_shift_left (This.Void_Ptr); + end Shift_Left_Key; + + + procedure Shift_Right_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_shift_right (This.Void_Ptr); + end Shift_Right_Key; + + + procedure Shift_Up_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_shift_up (This.Void_Ptr); + end Shift_Up_Key; + + + + + procedure Ctrl_Home_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_home (This.Void_Ptr); + end Ctrl_Home_Key; + + + procedure Ctrl_End_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_end (This.Void_Ptr); + end Ctrl_End_Key; + + + procedure Ctrl_Page_Down_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_page_down (This.Void_Ptr); + end Ctrl_Page_Down_Key; + + + procedure Ctrl_Page_Up_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_page_up (This.Void_Ptr); + end Ctrl_Page_Up_Key; + + + procedure Ctrl_Down_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_down (This.Void_Ptr); + end Ctrl_Down_Key; + + + procedure Ctrl_Left_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_left (This.Void_Ptr); + end Ctrl_Left_Key; + + + procedure Ctrl_Right_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_right (This.Void_Ptr); + end Ctrl_Right_Key; + + + procedure Ctrl_Up_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_up (This.Void_Ptr); + end Ctrl_Up_Key; + + + + + procedure Ctrl_Shift_Home_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_shift_home (This.Void_Ptr); + end Ctrl_Shift_Home_Key; + + + procedure Ctrl_Shift_End_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_shift_end (This.Void_Ptr); + end Ctrl_Shift_End_Key; + + + procedure Ctrl_Shift_Page_Down_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_shift_page_down (This.Void_Ptr); + end Ctrl_Shift_Page_Down_Key; + + + procedure Ctrl_Shift_Page_Up_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_shift_page_up (This.Void_Ptr); + end Ctrl_Shift_Page_Up_Key; + + + procedure Ctrl_Shift_Down_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_shift_down (This.Void_Ptr); + end Ctrl_Shift_Down_Key; + + + procedure Ctrl_Shift_Left_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_shift_left (This.Void_Ptr); + end Ctrl_Shift_Left_Key; + + + procedure Ctrl_Shift_Right_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_shift_right (This.Void_Ptr); + end Ctrl_Shift_Right_Key; + + + procedure Ctrl_Shift_Up_Key + (This : in out Text_Editor'Class) is + begin + fl_text_editor_ctrl_shift_up (This.Void_Ptr); + end Ctrl_Shift_Up_Key; + + + + procedure Remove_Key_Binding (This : in out Text_Editor; Key : in Shortcut_Key) |