summaryrefslogtreecommitdiff
path: root/src/fltk_binding/fltk-widget.ads
blob: ef4650ecb5443da3b60ecac25daa8f4f5a7dc1b8 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80


with FLTK.Enums; use FLTK.Enums;
with Ada.Finalization;
private with System;


package FLTK.Widget is


    type Widget_Type is abstract new Ada.Finalization.Limited_Controlled with private;


    type Font_Size is new Natural;
    Normal_Size : constant Font_Size := 14;


    type Color is new Natural;


    function Create
           (X, Y, W, H : in Integer;
            Label      : in String)
        return Widget_Type is abstract;


    function Get_Box
           (W : in Widget_Type'Class)
        return Box_Kind;


    procedure Set_Box
           (W : in Widget_Type'Class;
            B : in Box_Kind);


    function Get_Label_Font
           (W : in Widget_Type'Class)
        return Font_Kind;


    procedure Set_Label_Font
           (W : in Widget_Type'Class;
            F : in Font_Kind);


    function Get_Label_Size
           (W : in Widget_Type'Class)
        return Font_Size;


    procedure Set_Label_Size
           (W : in Widget_Type'Class;
            S : in Font_Size);


    function Get_Label_Type
           (W : in Widget_Type'Class)
        return Label_Kind;


    procedure Set_Label_Type
           (W : in Widget_Type'Class;
            L : in Label_Kind);


private


    type Widget_Type is abstract new Ada.Finalization.Limited_Controlled with
        record
            Void_Ptr : System.Address;
        end record;


    overriding procedure Initialize (This : in out Widget_Type);


end FLTK.Widget;