diff options
author | Jed Barber <jjbarber@y7mail.com> | 2016-11-18 21:24:27 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2016-11-18 21:24:27 +1100 |
commit | 5d88963cd203f30b79433e34e5c89bfcf8abfe60 (patch) | |
tree | b1ad21448acadf0ab20fd156a97e880601e18f72 /fltk-widgets-groups-text_displays-text_editors.adb | |
parent | 0c231d7e045b0ae92f7cf8db1329843010940d3e (diff) |
Moved Shortcut_Key type to FLTK.Enums, added function to remove key bindings from Text_Editors
Diffstat (limited to 'fltk-widgets-groups-text_displays-text_editors.adb')
-rw-r--r-- | fltk-widgets-groups-text_displays-text_editors.adb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fltk-widgets-groups-text_displays-text_editors.adb b/fltk-widgets-groups-text_displays-text_editors.adb index ce7684c..0172128 100644 --- a/fltk-widgets-groups-text_displays-text_editors.adb +++ b/fltk-widgets-groups-text_displays-text_editors.adb @@ -38,6 +38,12 @@ 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_remove_key_binding + (TE : in System.Address; + K : in Interfaces.C.unsigned; + M : in Interfaces.C.unsigned_long); + pragma Import (C, fl_text_editor_remove_key_binding, "fl_text_editor_remove_key_binding"); + @@ -120,5 +126,20 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is end Delete; + + + procedure Remove_Key_Binding + (This : in out Text_Editor; + Key : in Shortcut_Key) + is + use type Interfaces.C.unsigned_long; + begin + fl_text_editor_remove_key_binding + (This.Void_Ptr, + Character'Pos (Key.Keypress), + Interfaces.C.unsigned_long (Key.Modifier) * 65536); + end Remove_Key_Binding; + + end FLTK.Widgets.Groups.Text_Displays.Text_Editors; |