summaryrefslogtreecommitdiff
path: root/src/fltk-menu_items.adb
blob: 80bcea795df6702ed9509878091813879166e51d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59


with

    Interfaces.C;

use type

    Interfaces.C.int;


package body FLTK.Menu_Items is


    function fl_menuitem_value
           (MI : in System.Address)
        return Interfaces.C.int;
    pragma Import (C, fl_menuitem_value, "fl_menuitem_value");




    procedure fl_menuitem_activate
           (MI : in System.Address);
    pragma Import (C, fl_menuitem_activate, "fl_menuitem_activate");

    procedure fl_menuitem_deactivate
           (MI : in System.Address);
    pragma Import (C, fl_menuitem_deactivate, "fl_menuitem_deactivate");




    function Value
           (Item : in Menu_Item)
        return Boolean is
    begin
        return fl_menuitem_value (Item.Void_Ptr) /= 0;
    end Value;




    procedure Activate
           (Item : in Menu_Item) is
    begin
        fl_menuitem_activate (Item.Void_Ptr);
    end Activate;


    procedure Deactivate
           (Item : in Menu_Item) is
    begin
        fl_menuitem_deactivate (Item.Void_Ptr);
    end Deactivate;


end FLTK.Menu_Items;