summaryrefslogtreecommitdiff
path: root/iup/srclua5/normalizer.lua
blob: 201aab05b480c62c34f09b3591773e2ad93ea968 (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 = WIDGET,
  creation = "-",
  callback = {}
}

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

function ctrl.createElement(class, arg)
   return Normalizer()
end

iupRegisterWidget(ctrl)
iupSetClass(ctrl, "iup widget")