diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-12 01:14:58 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-01-12 01:14:58 +1300 |
commit | e93b9bbc02e2791f3a35b6f077fcbb8514c28aed (patch) | |
tree | 3661530027db6809a9cbad7b2477416009e00787 /src/fltk-widgets-groups-windows-double-cairo.adb | |
parent | 53aa8144851913994b963ed611cca8885b8f9a9e (diff) |
Refactored draw/handle methods in Widgets hierarchy, improved docs, added a few minor method bindings here and there
Diffstat (limited to 'src/fltk-widgets-groups-windows-double-cairo.adb')
-rw-r--r-- | src/fltk-widgets-groups-windows-double-cairo.adb | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/fltk-widgets-groups-windows-double-cairo.adb b/src/fltk-widgets-groups-windows-double-cairo.adb index 61ea232..eeeab90 100644 --- a/src/fltk-widgets-groups-windows-double-cairo.adb +++ b/src/fltk-widgets-groups-windows-double-cairo.adb @@ -134,6 +134,14 @@ package body FLTK.Widgets.Groups.Windows.Double.Cairo is end Extra_Init; + procedure Initialize + (This : in out Cairo_Window) is + begin + This.Draw_Ptr := fl_cairo_window_draw'Address; + This.Handle_Ptr := fl_cairo_window_handle'Address; + end Initialize; + + package body Forge is function Create @@ -202,20 +210,10 @@ package body FLTK.Widgets.Groups.Windows.Double.Cairo is procedure Draw (This : in out Cairo_Window) is begin - fl_cairo_window_draw (This.Void_Ptr); + Double_Window (This).Draw; end Draw; - function Handle - (This : in out Cairo_Window; - Event : in Event_Kind) - return Event_Outcome is - begin - return Event_Outcome'Val - (fl_cairo_window_handle (This.Void_Ptr, Event_Kind'Pos (Event))); - end Handle; - - end FLTK.Widgets.Groups.Windows.Double.Cairo; |