dalosp.struct = { images = { up = iup.LoadImage "12-em-up.tga", down = iup.LoadImage "12-em-down.tga", cross = iup.LoadImage "12-em-cross.tga", plus = iup.LoadImage "12-em-plus.tga", }, get_settings = function (self) end, configure = function (self) self.cfg_dlg:popup() end, activate = function (self) self.actv_dlg:show() end, input_change = function (self) end, create = function (d, tab, settings) tab.ninputs = 1 tab.noutputs = 0 tab.otype = dalos.objtype.LUA_VIEWER tab.configure = dalosp.struct.configure tab.activate = dalosp.struct.activate tab.input_change = dalosp.struct.input_change tab.get_settings = dalosp.struct.get_settings tab.default_name = "Struct" tab.ntype = "Struct" local extra = { } if not settings then settings = {} end local obj = dalos.object(d, tab, extra) local cmx = iup.matrix {} cmx.draw_cb = dalosp.struct.cfg_draw_cb obj.cfg_dlg = iup.dialog { iup.vbox { cmx, iup.hbox { iup.fill {}, iup.button { title = "Ok", action = function (self) return iup.CLOSE end }, iup.fill {}, }, }, } obj.cfg_dlg.mx = cmx local amx = iup.matrix {} obj.actv_dlg = iup.dialog { amx, } return obj end, } dalos.struct = dalosp.struct.create dalos:register_obj("Struct", dalos.struct, "Programmable")