2 -- ion/share/ioncore_tabnum.lua -- Ioncore tab numbering support
4 -- Copyright (c) Tuomo Valkonen 2007.
6 -- See the included file LICENSE for details.
13 local function do_show(frame)
14 if obj_exists(frame) then
15 frame:set_grattr('numbered', 'set')
16 framestate[frame]='set'
23 -- Show tab numbers on \var{frame}, clearing them when submap
24 -- grab is released the next time. If \var{delay} is given, in
25 -- milliseconds, the numbers are not actually displayed until this
27 function ioncore.tabnum.show(frame, delay)
28 if delay and delay>0 then
29 local tmr=ioncore.create_timer()
31 tmr:set(delay, function() do_show(frame) end)
38 -- Clear all tab numbers set by \fnref{ioncore.tabnum.show}.
39 function ioncore.tabnum.clear()
43 for f, s in pairs(st) do
46 f:set_grattr('numbered', 'unset')
48 elseif obj_is(s, "WTimer") then
54 ioncore.get_hook("ioncore_submap_ungrab_hook")
55 :add(ioncore.tabnum.clear)