summaryrefslogtreecommitdiff
path: root/iup/srclua5/normalizer.lua
blob: 293e460169574f666be8306361ee3be13b643289 (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

------------------------------------------------------------------------------
-- Normalizer class 
------------------------------------------------------------------------------
local ctrl = {
  nick = "normalizer",
  parent = iup.WIDGET,
  creation = "-",
  callback = {}
}

function ctrl.setAttributes(object, param)
  local handle = rawget(object, "handle")
  local n = #param
  for i = 1, n do
    if iup.GetClass(param[i]) == "iup handle" then 
      object.addcontrol = param[i]
    end
  end
  iup.WIDGET.setAttributes(object, param)
end

function ctrl.createElement(class, param)
   return iup.Normalizer()
end

iup.RegisterWidget(ctrl)
iup.SetClass(ctrl, "iup widget")