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
|
------------------------------------------------------------------------------
-- Dialog class
------------------------------------------------------------------------------
local ctrl = {
nick = "dialog",
parent = iup.WIDGET,
creation = "I",
callback = {
map_cb = "",
unmap_cb = "",
destroy_cb = "",
close_cb = "",
show_cb = "n",
move_cb = "nn",
copydata_cb = "sn",
trayclick_cb = "nnn",
dropfiles_cb = "snnn",
}
}
function ctrl.createElement(class, param)
return iup.Dialog(param[1])
end
function ctrl.popup(handle, x, y)
iup.Popup(handle,x,y)
end
function ctrl.showxy(handle, x, y)
return iup.ShowXY(handle, x, y)
end
function ctrl.destroy(handle)
return iup.Destroy(handle)
end
iup.RegisterWidget(ctrl)
iup.SetClass(ctrl, "iup widget")
|