summaryrefslogtreecommitdiff
path: root/iup/srclua5/tabs.lua
blob: 249caa9a2bd07eff06d91e29c9bbfbfd63cf78d6 (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
------------------------------------------------------------------------------
-- Tabs class 
------------------------------------------------------------------------------
local ctrl = {
  nick = "tabs",
  parent = iup.WIDGET,
  creation = "v",
  callback = {
    tabchange_cb = "ii",
  },
  funcname = "Tabsv",
  createfunc = [[
static int Tabsv(lua_State *L)
{
  Ihandle **hlist = iuplua_checkihandle_array(L, 1);
  Ihandle *h = IupTabsv(hlist);
  iuplua_plugstate(L, h);
  iuplua_pushihandle_raw(L, h);
  free(hlist);
  return 1;
}

]],
}

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

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