diff options
Diffstat (limited to 'dalos.lua')
| -rw-r--r-- | dalos.lua | 20 | 
1 files changed, 15 insertions, 5 deletions
| @@ -439,17 +439,27 @@ function activate_hv(self)  end  function input_change_hv(self, ind) -    self.extra.hv:updatehandle(self.inputs[ind].obj.obj:getoutput(self.inputs[ind].ind)) +    local ni = self.inputs[ind] +    if ni then +        local ii = ni.ind +        local io = ni.obj +        self.extra.hv:updatehandle(io.obj:get_output(ii)) +    else +        self.extra.hv:updatehandle(nil) +    end  end +hv = iupe.hexview { } +hvdlg = iup.dialog { iup.hbox{ iup.frame { hv }, iup.sbox { direction = "WEST", iupe.hexview_toolbox { hexview = hv, }, }, }, title = "Hexview" } +  extra = { -    hv = iupe.hexview { }, -    hvdlg = iup.dialog { iup.hbox{ iup.frame { hv }, iup.sbox { direction = "WEST", iupe.hexview_toolbox { hexview = hv, }, }, }, title = "Hexview" } +    hv = hv, +    hvdlg = hvdlg,  }  o1 = dalos.object(d, { y = 30, x = 10, noutputs = 1, name = "Buffer 1", otype = dalos.objtype.HANDLE }) -o2 = dalos.object(d, { y = 30, x = 90, noutputs = 1, name = "Buffer 2", otype = dalos.objtype.HANDLE }) -h = dalos.object(d, { y = 120, x = 50, ninputs = 1, name = "Hexview", otype = dalos.objtype.LUA_VIEWER, activate = activate_hv, input_change = input_change_hv }, extra) +o2 = dalos.object(d, { y = 120, x = 10, noutputs = 1, name = "Buffer 2", otype = dalos.objtype.HANDLE }) +h = dalos.object(d, { y = 60, x = 100, ninputs = 1, name = "Hexview", otype = dalos.objtype.LUA_VIEWER, activate = activate_hv, input_change = input_change_hv }, extra)  o1:set_houtput(b1)  o2:set_houtput(b2) | 
