Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more
# File tk/lib/tkextlib/blt/tabset.rb, line 216 def __boolval_optkeys super() << 'samewidth' << 'tearoff' end
# File tk/lib/tkextlib/blt/tabset.rb, line 208 def __destroy_hook__ Tk::BLT::Tabset::Tab::TabID_TBL.mutex.synchronize{ Tk::BLT::Tabset::Tab::TabID_TBL.delete(@path) } end
# File tk/lib/tkextlib/blt/tabset.rb, line 274 def activate(index) tk_send('activate', tagindex(index)) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 316 def delete(first, last=None) tk_send('delete', tagindex(first), tagindex(last)) if first.kind_of?(Tk::BLT::Tabset::Tab) TabID_TBL.mutex.synchronize{ TabID_TBL[@path].delete(first.id) } end # middle tabs of the range are unknown if last.kind_of?(Tk::BLT::Tabset::Tab) TabID_TBL.mutex.synchronize{ TabID_TBL[@path].delete(last.id) } end self end
# File tk/lib/tkextlib/blt/tabset.rb, line 332 def focus(index) tk_send('focus', tagindex(index)) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 337 def get_tab(index) Tk::BLT::Tabset::Tab.id2obj(tk_send_without_enc('get', tagindex(index))) end
# File tk/lib/tkextlib/blt/tabset.rb, line 341 def index(str) num_or_str(tk_send('index', str)) end
# File tk/lib/tkextlib/blt/tabset.rb, line 344 def index_name(tab) num_or_str(tk_send('index', '-mame', tagid(tab))) end
# File tk/lib/tkextlib/blt/tabset.rb, line 348 def insert(pos, tab, keys={}) Tk::BLT::Tabset::Tab.new(self, tagindex(pos), tagid(tab), keys) end
# File tk/lib/tkextlib/blt/tabset.rb, line 352 def invoke(index) tk_send('invoke', tagindex(index)) end
# File tk/lib/tkextlib/blt/tabset.rb, line 360 def move_after(index, base_idx) tk_send('move', tagindex(index), 'after', tagindex(base_idx)) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 356 def move_before(index, base_idx) tk_send('move', tagindex(index), 'before', tagindex(base_idx)) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 365 def nearest(x, y) Tk::BLT::Tabset::Tab.id2obj(num_or_str(tk_send_without_enc('nearest', x, y))) end
# File tk/lib/tkextlib/blt/tabset.rb, line 369 def perforation_highlight(index, mode) tk_send('perforation', 'highlight', tagindex(index), mode) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 373 def perforation_invoke(index) tk_send('perforation', 'invoke', tagindex(index)) end
# File tk/lib/tkextlib/blt/tabset.rb, line 381 def scan_dragto(x, y) tk_send_without_enc('scan', 'dragto', x, y) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 377 def scan_mark(x, y) tk_send_without_enc('scan', 'mark', x, y) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 386 def see(index) tk_send('see', tagindex(index)) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 395 def select(index) tk_send('select', tagindex(index)) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 391 def size() number(tk_send_without_enc('size')) end
# File tk/lib/tkextlib/blt/tabset.rb, line 400 def tab_names(pat=None) simplelist(tk_send('tab', 'names', pat)).collect{|name| Tk::BLT::Tabset::Tab.id2obj(name) } end
# File tk/lib/tkextlib/blt/tabset.rb, line 406 def tab_tearoff(index, name=None) window(tk_send('tab', 'tearoff', tagindex(index), name)) end
def tabbind(tag, context, cmd=Proc.new, *args)
_bind([path, "bind", tagid(tag)], context, cmd, *args) self
end
# File tk/lib/tkextlib/blt/tabset.rb, line 284 def tabbind(tag, context, *args) # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) if TkComm._callback_entry?(args[0]) || !block_given? cmd = args.shift else cmd = Proc.new end _bind([path, "bind", tagid(tag)], context, cmd, *args) self end
def #tabbind_append(tag, context, cmd=Proc.new, *args)
_bind_append([path, "bind", tagid(tag)], context, cmd, *args) self
end
# File tk/lib/tkextlib/blt/tabset.rb, line 298 def tabbind_append(tag, context, *args) # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) if TkComm._callback_entry?(args[0]) || !block_given? cmd = args.shift else cmd = Proc.new end _bind_append([path, "bind", tagid(tag)], context, cmd, *args) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 308 def tabbind_remove(tag, context) _bind_remove([path, "bind", tagid(tag)], context) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 312 def tabbindinfo(tag, context=nil) _bindinfo([path, "bind", tagid(tag)], context) end
# File tk/lib/tkextlib/blt/tabset.rb, line 256 def tagid(tab) if tab.kind_of?(Tk::BLT::Tabset::Tab) tab.id else tab end end
# File tk/lib/tkextlib/blt/tabset.rb, line 264 def tagindex(tab) if tab.kind_of?(Tk::BLT::Tabset::Tab) tab.index else tab end end
# File tk/lib/tkextlib/blt/tabset.rb, line 410 def xscrollcommand(cmd=Proc.new) configure_cmd 'scrollcommand', cmd self end
# File tk/lib/tkextlib/blt/tabset.rb, line 416 def xview(*index) if index.empty? list(tk_send_without_enc('view')) else tk_send_without_enc('view', *index) self end end