From 5d88963cd203f30b79433e34e5c89bfcf8abfe60 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Fri, 18 Nov 2016 21:24:27 +1100 Subject: Moved Shortcut_Key type to FLTK.Enums, added function to remove key bindings from Text_Editors --- fltk-widgets-groups-text_displays-text_editors.adb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'fltk-widgets-groups-text_displays-text_editors.adb') 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; -- cgit