From 1cd018b440f80601f60908c2e5675413f5c77e25 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 15 May 2018 14:52:00 +1000 Subject: Finished and polished FLTK.Widgets.Menus, fixed some off-by-one errors in Groups --- src/fltk-menu_items.adb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/fltk-menu_items.adb') diff --git a/src/fltk-menu_items.adb b/src/fltk-menu_items.adb index a94293f..4c0e78c 100644 --- a/src/fltk-menu_items.adb +++ b/src/fltk-menu_items.adb @@ -161,6 +161,18 @@ package body FLTK.Menu_Items is pragma Import (C, fl_menu_item_set_shortcut, "fl_menu_item_set_shortcut"); pragma Inline (fl_menu_item_set_shortcut); + function fl_menu_item_get_flags + (MI : in System.Address) + return Interfaces.C.unsigned_long; + pragma Import (C, fl_menu_item_get_flags, "fl_menu_item_get_flags"); + pragma Inline (fl_menu_item_get_flags); + + procedure fl_menu_item_set_flags + (MI : in System.Address; + F : in Interfaces.C.unsigned_long); + pragma Import (C, fl_menu_item_set_flags, "fl_menu_item_set_flags"); + pragma Inline (fl_menu_item_set_flags); + @@ -414,6 +426,22 @@ package body FLTK.Menu_Items is end Set_Shortcut; + function Get_Flags + (Item : in Menu_Item) + return Menu_Flag is + begin + return Menu_Flag (fl_menu_item_get_flags (Item.Void_Ptr)); + end Get_Flags; + + + procedure Set_Flags + (Item : in out Menu_Item; + To : in Menu_Flag) is + begin + fl_menu_item_set_flags (Item.Void_Ptr, Interfaces.C.unsigned_long (To)); + end Set_Flags; + + procedure Activate -- cgit