diff options
Diffstat (limited to 'src/fltk-widgets.adb')
-rw-r--r-- | src/fltk-widgets.adb | 67 |
1 files changed, 62 insertions, 5 deletions
diff --git a/src/fltk-widgets.adb b/src/fltk-widgets.adb index 91495e9..629f90e 100644 --- a/src/fltk-widgets.adb +++ b/src/fltk-widgets.adb @@ -6,6 +6,7 @@ with System; with System.Address_To_Access_Conversions; with FLTK.Widgets.Groups; with FLTK.Images; +use type Interfaces.C.int; use type System.Address; @@ -38,6 +39,29 @@ package body FLTK.Widgets is pragma Import (C, free_fl_widget, "free_fl_widget"); + procedure fl_widget_activate + (W : in System.Address); + pragma Import (C, fl_widget_activate, "fl_widget_activate"); + + procedure fl_widget_deactivate + (W : in System.Address); + pragma Import (C, fl_widget_deactivate, "fl_widget_deactivate"); + + function fl_widget_active + (W : in System.Address) + return Interfaces.C.int; + pragma Import (C, fl_widget_active, "fl_widget_active"); + + function fl_widget_active_r + (W : in System.Address) + return Interfaces.C.int; + pragma Import (C, fl_widget_active_r, "fl_widget_active_r"); + + function fl_widget_get_parent + (W : in System.Address) + return System.Address; + pragma Import (C, fl_widget_get_parent, "fl_widget_get_parent"); + function fl_widget_get_box (W : in System.Address) return Interfaces.C.int; @@ -88,11 +112,6 @@ package body FLTK.Widgets is L : in Interfaces.C.int); pragma Import (C, fl_widget_set_label_type, "fl_widget_set_label_type"); - function fl_widget_get_parent - (W : in System.Address) - return System.Address; - pragma Import (C, fl_widget_get_parent, "fl_widget_get_parent"); - procedure fl_widget_set_callback (W, C : in System.Address); pragma Import (C, fl_widget_set_callback, "fl_widget_set_callback"); @@ -209,6 +228,44 @@ package body FLTK.Widgets is + procedure Activate + (This : in out Widget) is + begin + fl_widget_activate (This.Void_Ptr); + end Activate; + + + + + procedure Deactivate + (This : in out Widget) is + begin + fl_widget_deactivate (This.Void_Ptr); + end Deactivate; + + + + + function Is_Active + (This : in Widget) + return Boolean is + begin + return fl_widget_active (This.Void_Ptr) /= 0; + end Is_Active; + + + + + function Is_Tree_Active + (This : in Widget) + return Boolean is + begin + return fl_widget_active_r (This.Void_Ptr) /= 0; + end Is_Tree_Active; + + + + function Parent (This : in Widget) return access FLTK.Widgets.Groups.Group'Class |