From f28f819c721fa5a317e23b3cc1eefb938115b47a Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Wed, 5 Oct 2016 15:44:17 +1100 Subject: Added logo, made find/replace/about windows attention grabbing --- fltk-widgets.adb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'fltk-widgets.adb') diff --git a/fltk-widgets.adb b/fltk-widgets.adb index 0a159c7..c6ab5c0 100644 --- a/fltk-widgets.adb +++ b/fltk-widgets.adb @@ -5,6 +5,7 @@ with Interfaces.C.Strings; with System; with System.Address_To_Access_Conversions; with FLTK.Widgets.Groups; use FLTK.Widgets.Groups; +with FLTK.Images; use type System.Address; @@ -105,6 +106,10 @@ package body FLTK.Widgets is X, Y : in Interfaces.C.int); pragma Import (C, fl_widget_position, "fl_widget_position"); + procedure fl_widget_set_image + (W, I : in System.Address); + pragma Import (C, fl_widget_set_image, "fl_widget_set_image"); + @@ -319,5 +324,28 @@ package body FLTK.Widgets is end Reposition; + + + function Get_Image + (This : in Widget) + return access FLTK.Images.Image'Class is + begin + return This.Current_Image; + end Get_Image; + + + + + procedure Set_Image + (This : in out Widget; + Pic : in out FLTK.Images.Image'Class) is + begin + This.Current_Image := Pic'Unchecked_Access; + fl_widget_set_image + (This.Void_Ptr, + Wrapper (Pic).Void_Ptr); + end Set_Image; + + end FLTK.Widgets; -- cgit