From e93b9bbc02e2791f3a35b6f077fcbb8514c28aed Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Sun, 12 Jan 2025 01:14:58 +1300 Subject: Refactored draw/handle methods in Widgets hierarchy, improved docs, added a few minor method bindings here and there --- src/fltk-widgets-groups-windows-double-overlay.ads | 40 ++++++---------------- 1 file changed, 10 insertions(+), 30 deletions(-) (limited to 'src/fltk-widgets-groups-windows-double-overlay.ads') diff --git a/src/fltk-widgets-groups-windows-double-overlay.ads b/src/fltk-widgets-groups-windows-double-overlay.ads index 097abb8..082087c 100644 --- a/src/fltk-widgets-groups-windows-double-overlay.ads +++ b/src/fltk-widgets-groups-windows-double-overlay.ads @@ -7,10 +7,6 @@ package FLTK.Widgets.Groups.Windows.Double.Overlay is - ------------- - -- Types -- - ------------- - type Overlay_Window is new Double_Window with private; type Overlay_Window_Reference (Data : not null access Overlay_Window'Class) is @@ -19,10 +15,6 @@ package FLTK.Widgets.Groups.Windows.Double.Overlay is - -------------------- - -- Constructors -- - -------------------- - package Forge is function Create @@ -40,10 +32,6 @@ package FLTK.Widgets.Groups.Windows.Double.Overlay is - --------------- - -- Display -- - --------------- - procedure Show (This : in out Overlay_Window); @@ -56,41 +44,33 @@ package FLTK.Widgets.Groups.Windows.Double.Overlay is - ------------- - -- Other -- - ------------- - function Can_Do_Overlay (This : in Overlay_Window) return Boolean; + procedure Resize + (This : in out Overlay_Window; + X, Y, W, H : in Integer); - ---------------------------------- - -- Drawing and Event Handling -- - ---------------------------------- - - procedure Draw - (This : in out Overlay_Window); + -- You must override this subprogram procedure Draw_Overlay - (This : in out Overlay_Window) is null; + (This : in out Overlay_Window); procedure Redraw_Overlay (This : in out Overlay_Window); - function Handle - (This : in out Overlay_Window; - Event : in Event_Kind) - return Event_Outcome; - private type Overlay_Window is new Double_Window with null record; + overriding procedure Initialize + (This : in out Overlay_Window); + overriding procedure Finalize (This : in out Overlay_Window); @@ -110,11 +90,11 @@ private pragma Inline (Flush); pragma Inline (Can_Do_Overlay); + pragma Inline (Resize); - pragma Inline (Draw); pragma Inline (Redraw_Overlay); - pragma Inline (Handle); end FLTK.Widgets.Groups.Windows.Double.Overlay; + -- cgit