summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-groups-text_displays.adb
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-05-13 23:05:47 +1000
committerJed Barber <jjbarber@y7mail.com>2017-05-13 23:05:47 +1000
commitf4b68da1d14d39ab4140d8c5e7fbbf45525e7e77 (patch)
tree86fa5a4d39c6d6e83f8d269ae63338257b4f9ce2 /src/fltk-widgets-groups-text_displays.adb
parent3c1e9610ac0e503787678cea31d79e3126813a2c (diff)
Text_Editor, Text_Display, Double_Window, Single_Window, Menu_Window, Window, Group widgets all now have Handle methods
Diffstat (limited to 'src/fltk-widgets-groups-text_displays.adb')
-rw-r--r--src/fltk-widgets-groups-text_displays.adb23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/fltk-widgets-groups-text_displays.adb b/src/fltk-widgets-groups-text_displays.adb
index 9c571d3..e805ff5 100644
--- a/src/fltk-widgets-groups-text_displays.adb
+++ b/src/fltk-widgets-groups-text_displays.adb
@@ -13,10 +13,20 @@ package body FLTK.Widgets.Groups.Text_Displays is
(W, D : in System.Address);
pragma Import (C, text_display_set_draw_hook, "text_display_set_draw_hook");
+ procedure text_display_set_handle_hook
+ (W, H : in System.Address);
+ pragma Import (C, text_display_set_handle_hook, "text_display_set_handle_hook");
+
procedure fl_text_display_draw
(W : in System.Address);
pragma Import (C, fl_text_display_draw, "fl_text_display_draw");
+ function fl_text_display_handle
+ (W : in System.Address;
+ E : in Interfaces.C.int)
+ return Interfaces.C.int;
+ pragma Import (C, fl_text_display_handle, "fl_text_display_handle");
+
function new_fl_text_display
(X, Y, W, H : in Interfaces.C.int;
Label : in Interfaces.C.char_array)
@@ -140,6 +150,18 @@ package body FLTK.Widgets.Groups.Text_Displays is
+ function Handle
+ (This : in out Text_Display;
+ Event : in Event_Kind)
+ return Event_Outcome is
+ begin
+ return Event_Outcome'Val
+ (fl_text_display_handle (This.Void_Ptr, Event_Kind'Pos (Event)));
+ end Handle;
+
+
+
+
procedure Finalize
(This : in out Text_Display) is
begin
@@ -173,6 +195,7 @@ package body FLTK.Widgets.Groups.Text_Displays is
(This.Void_Ptr,
Widget_Convert.To_Address (This'Unchecked_Access));
text_display_set_draw_hook (This.Void_Ptr, Draw_Hook'Address);
+ text_display_set_handle_hook (This.Void_Ptr, Handle_Hook'Address);
end return;
end Create;