diff options
author | Jed Barber <jjbarber@y7mail.com> | 2016-09-11 01:40:45 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2016-09-11 01:40:45 +1000 |
commit | 249933f4573a7b812334a24c734cf2630a9bf9fc (patch) | |
tree | 52d9c95117ef93ff4159aceb79bda46888adedd9 /fltk-widgets.ads | |
parent | e9add081b396a0cbfdf59df9d340afe44d9b9544 (diff) |
WIDGET CALLBACKS!!!
Diffstat (limited to 'fltk-widgets.ads')
-rw-r--r-- | fltk-widgets.ads | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fltk-widgets.ads b/fltk-widgets.ads index 3f02302..1c21ca4 100644 --- a/fltk-widgets.ads +++ b/fltk-widgets.ads @@ -14,6 +14,12 @@ package FLTK.Widgets is with Implicit_Dereference => Data; + type Widget_Callback is interface; + procedure Call + (This : in Widget_Callback; + Item : in out Widget'Class) is abstract; + + -- would like to move this definition to FLTK.Widgets.Groups somehow type Group_Cursor (Data : access FLTK.Widgets.Groups.Group'Class) is limited null record with Implicit_Dereference => Data; @@ -85,10 +91,18 @@ package FLTK.Widgets is Label : in Label_Kind); + procedure Set_Callback + (This : in out Widget; + Func : not null access Widget_Callback'Class); + + private - type Widget is abstract new Wrapper with null record; + type Widget is abstract new Wrapper with + record + Callback : access Widget_Callback'Class; + end record; package Widget_Convert is new System.Address_To_Access_Conversions (Widget'Class); |