| Class | Tk::BLT::Tabset |
| In: |
tk/lib/tkextlib/blt/tabset.rb
|
| Parent: | TkWindow |
| TkCommandNames | = | ['::blt::tabset'.freeze].freeze |
| WidgetClassName | = | 'Tabset'.freeze |
| itemcget | -> | tab_cget |
| itemconfigure | -> | tab_configure |
| itemconfiginfo | -> | tab_configinfo |
| current_itemconfiginfo | -> | current_tab_configinfo |
| xview_moveto | -> | view_moveto |
| xview_scroll | -> | view_scroll |
| xscrollbar | -> | scrollbar |
# File tk/lib/tkextlib/blt/tabset.rb, line 192 def __boolval_optkeys super() << 'samewidth' << 'tearoff' end
# File tk/lib/tkextlib/blt/tabset.rb, line 186 def __destroy_hook__ Tk::BLT::Tabset::Tab::TabID_TBL.delete(@path) end
# File tk/lib/tkextlib/blt/tabset.rb, line 249 def activate(index) tk_send('activate', tagindex(index)) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 291 def delete(first, last=None) tk_send('delete', tagindex(first), tagindex(last)) if first.kind_of?(Tk::BLT::Tabset::Tab) TabID_TBL[@path].delete(first.id) end # middle tabs of the range are unknown if last.kind_of?(Tk::BLT::Tabset::Tab) TabID_TBL[@path].delete(last.id) end self end
# File tk/lib/tkextlib/blt/tabset.rb, line 303 def focus(index) tk_send('focus', tagindex(index)) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 308 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 315 def index_name(tab) num_or_str(tk_send('index', '-mame', tagid(tab))) end
# File tk/lib/tkextlib/blt/tabset.rb, line 319 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 323 def invoke(index) tk_send('invoke', tagindex(index)) end
# File tk/lib/tkextlib/blt/tabset.rb, line 331 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 327 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 336 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 340 def perforation_highlight(index, mode) tk_send('perforation', 'highlight', tagindex(index), mode) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 344 def perforation_invoke(index) tk_send('perforation', 'invoke', tagindex(index)) end
# File tk/lib/tkextlib/blt/tabset.rb, line 352 def scan_dragto(x, y) tk_send_without_enc('scan', 'dragto', x, y) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 348 def scan_mark(x, y) tk_send_without_enc('scan', 'mark', x, y) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 357 def see(index) tk_send('see', tagindex(index)) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 366 def select(index) tk_send('select', tagindex(index)) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 371 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 377 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 259 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 273 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 283 def tabbind_remove(tag, context) _bind_remove([path, "bind", tagid(tag)], context) self end
# File tk/lib/tkextlib/blt/tabset.rb, line 287 def tabbindinfo(tag, context=nil) _bindinfo([path, "bind", tagid(tag)], context) end
# File tk/lib/tkextlib/blt/tabset.rb, line 231 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 239 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 381 def xscrollcommand(cmd=Proc.new) configure_cmd 'scrollcommand', cmd self end
ruby-doc.org is hosted and maintained by James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, Arizona. The site was created in 2002 as part of the Ruby Documentation Project to promote the Ruby language and to help other Ruby hackers.
Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.
For more information on the Ruby programming language, visit ruby-lang.org.
Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.