diff options
author | Jed Barber <jjbarber@y7mail.com> | 2016-09-15 03:41:54 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2016-09-15 03:41:54 +1000 |
commit | bfcc3811a3ce55cafa6f7809d0d92c87238ea032 (patch) | |
tree | 6727c02fc76f00580ce7a238ea9cb5f2656e7918 /src/fltk_binding/fltk-menu_items.adb | |
parent | 6c61d634be9aa3cd30c1bf0254eee5d36a37eeb5 (diff) |
Menu callbacks working, also some quick testing code that'll probably get deleted later because wynaut
Diffstat (limited to 'src/fltk_binding/fltk-menu_items.adb')
-rw-r--r-- | src/fltk_binding/fltk-menu_items.adb | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/src/fltk_binding/fltk-menu_items.adb b/src/fltk_binding/fltk-menu_items.adb deleted file mode 100644 index 254de5f..0000000 --- a/src/fltk_binding/fltk-menu_items.adb +++ /dev/null @@ -1,108 +0,0 @@ - - -with Interfaces.C; -with System; -use type System.Address; - - -package body FLTK.Menu_Items is - - - function Shortcut - (Key : Pressable_Key) - return Shortcut_Key is - begin - return This : Shortcut_Key do - This.Modifier := Mod_None; - This.Keypress := Key; - end return; - end Shortcut; - - - function "+" - (Left, Right : in Modifier_Key) - return Modifier_Key is - begin - return Left or Right; - end "+"; - - - function "+" - (Left : in Modifier_Key; - Right : in Pressable_Key) - return Shortcut_Key is - begin - return This : Shortcut_Key do - This.Modifier := Left; - This.Keypress := Right; - end return; - end "+"; - - - function "+" - (Left : in Modifier_Key; - Right : in Shortcut_Key) - return Shortcut_Key is - begin - return This : Shortcut_Key do - This.Modifier := Left or Right.Modifier; - This.Keypress := Right.Keypress; - end return; - end "+"; - - - - - function "+" - (Left, Right : in Menu_Flag) - return Menu_Flag is - begin - return Left or Right; - end "+"; - - - - - function new_fl_menu_item - (Text : in Interfaces.C.char_array; - CBack : in System.Address; - -- Data : in System.Address; - Key : in Interfaces.C.unsigned_long; - Flags : in Interfaces.C.unsigned_short) - return System.Address; - pragma Import (C, new_fl_menu_item, "new_fl_menu_item"); - - procedure free_fl_menu_item - (M : in System.Address); - pragma Import (C, free_fl_menu_item, "free_fl_menu_item"); - - - - - procedure Finalize - (This : in out Menu_Item) is - begin - Finalize (Wrapper (This)); - if This in Menu_Item then - free_fl_menu_item (This.Void_Ptr); - end if; - end Finalize; - - - - - function Create - (Text : in String; - Action : in FLTK.Callbacks.Callback; - Shortcut : in Shortcut_Key := No_Key; - Flags : in Menu_Flag := Flag_Normal) - return Menu_Item is - begin - return This : Menu_Item do - null; - end return; - end Create; - - -end FLTK.Menu_Items; - |