blob: 7b0a348fac37b6dd10a955721ced388b3714f918 (
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
|
------------------------------------------------------------------------------
-- ZBox class
------------------------------------------------------------------------------
local ctrl = {
nick = "zbox",
parent = iup.BOX,
creation = "-",
callback = {}
}
function ctrl.append (handle, elem)
iup.SetHandleName(elem)
iup.Append(handle, elem)
end
function ctrl.SetChildrenNames(obj)
if obj then
local i = 1
while obj[i] do
iup.SetHandleName(obj[i])
i = i+1
end
end
end
function ctrl.createElement(class, param)
ctrl.SetChildrenNames(param)
return iup.Zbox()
end
iup.RegisterWidget(ctrl)
iup.SetClass(ctrl, "iup widget")
|