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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
-- Programmed by Jedidiah Barber
-- Released into the public domain
package FLTK.Widgets.Groups.Tables.Row is
type Row_Table is new Table with private;
type Row_Table_Reference (Data : not null access Row_Table'Class) is limited null record
with Implicit_Dereference => Data;
type Row_Select_Mode is (Select_None, Select_Single, Select_Multiple);
type Selection_State is (Deselected, Selected, Toggle);
package Forge is
function Create
(X, Y, W, H : in Integer;
Text : in String := "")
return Row_Table;
function Create
(Parent : in out Groups.Group'Class;
X, Y, W, H : in Integer;
Text : in String := "")
return Row_Table;
end Forge;
procedure Clear
(This : in out Row_Table);
function Get_Rows
(This : in Row_Table)
return Natural;
procedure Set_Rows
(This : in out Row_Table;
Value : in Natural);
function Is_Row_Selected
(This : in Row_Table;
Row : in Positive)
return Boolean;
procedure Select_Row
(This : in out Row_Table;
Row : in Positive;
Value : in Selection_State := Selected);
function Select_Row
(This : in out Row_Table;
Row : in Positive;
Value : in Selection_State := Selected)
return Boolean;
procedure Select_All_Rows
(This : in out Row_Table;
Value : in Selection_State := Selected);
function Get_Row_Select_Mode
(This : in Row_Table)
return Row_Select_Mode;
procedure Set_Row_Select_Mode
(This : in out Row_Table;
Value : in Row_Select_Mode);
procedure Cell_Dimensions
(This : in Row_Table;
Context : in Table_Context;
Row, Column : in Positive;
X, Y, W, H : out Integer);
function Handle
(This : in out Row_Table;
Event : in Event_Kind)
return Event_Outcome;
private
type Row_Table is new Table with null record;
overriding procedure Initialize
(This : in out Row_Table);
overriding procedure Finalize
(This : in out Row_Table);
procedure Extra_Init
(This : in out Row_Table;
X, Y, W, H : in Integer;
Text : in String)
with Inline;
procedure Extra_Final
(This : in out Row_Table)
with Inline;
pragma Inline (Get_Rows);
pragma Inline (Set_Rows);
pragma Inline (Is_Row_Selected);
pragma Inline (Select_Row);
pragma Inline (Select_All_Rows);
pragma Inline (Get_Row_Select_Mode);
pragma Inline (Set_Row_Select_Mode);
pragma Inline (Cell_Dimensions);
pragma Inline (Handle);
end FLTK.Widgets.Groups.Tables.Row;
|