In Files

  • tk/lib/tkextlib/blt/tabset.rb

Class/Module Index [+]

Quicksearch

Tk::BLT::Tabset

Public Instance Methods

__boolval_optkeys() click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 192
def __boolval_optkeys
  super() << 'samewidth' << 'tearoff'
end
            
__destroy_hook__() click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 186
def __destroy_hook__
  Tk::BLT::Tabset::Tab::TabID_TBL.delete(@path)
end
            
activate(index) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 249
def activate(index)
  tk_send('activate', tagindex(index))
  self
end
            
Also aliased as: highlight
delete(first, last=None) click to toggle source
 
               # 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
            
focus(index) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 303
def focus(index)
  tk_send('focus', tagindex(index))
  self
end
            
get_tab(index) click to toggle source
 
               # 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
            
highlight(index) click to toggle source
Alias for: activate
index(str) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 312
def index(str)
  num_or_str(tk_send('index', str))
end
            
index_name(tab) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 315
def index_name(tab)
  num_or_str(tk_send('index', '-mame', tagid(tab)))
end
            
insert(pos, tab, keys={}) click to toggle source
 
               # 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
            
invoke(index) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 323
def invoke(index)
  tk_send('invoke', tagindex(index))
end
            
move_after(index, base_idx) click to toggle source
 
               # 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
            
move_before(index, base_idx) click to toggle source
 
               # 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
            
nearest(x, y) click to toggle source
 
               # 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
            
perforation_highlight(index, mode) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 340
def perforation_highlight(index, mode)
  tk_send('perforation', 'highlight', tagindex(index), mode)
  self
end
            
perforation_invoke(index) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 344
def perforation_invoke(index)
  tk_send('perforation', 'invoke', tagindex(index))
end
            
scan_dragto(x, y) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 352
def scan_dragto(x, y)
  tk_send_without_enc('scan', 'dragto', x, y)
  self
end
            
scan_mark(x, y) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 348
def scan_mark(x, y)
  tk_send_without_enc('scan', 'mark', x, y)
  self
end
            
scrollcommand(cmd=Proc.new) click to toggle source
Alias for: xscrollcommand
see(index) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 357
def see(index)
  tk_send('see', tagindex(index))
  self
end
            
select(index) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 366
def select(index)
  tk_send('select', tagindex(index))
  self
end
            
size() click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 362
def size()
  number(tk_send_without_enc('size'))
end
            
tab_names(pat=None) click to toggle source
 
               # 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
            
tab_tearoff(index, name=None) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 377
def tab_tearoff(index, name=None)
  window(tk_send('tab', 'tearoff', tagindex(index), name))
end
            
tabbind(tag, context, *args) click to toggle source

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
            
tabbind_append(tag, context, *args) click to toggle source

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
            
tabbind_remove(tag, context) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 283
def tabbind_remove(tag, context)
  _bind_remove([path, "bind", tagid(tag)], context)
  self
end
            
tabbindinfo(tag, context=nil) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 287
def tabbindinfo(tag, context=nil)
  _bindinfo([path, "bind", tagid(tag)], context)
end
            
tagid(tab) click to toggle source
 
               # 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
            
tagindex(tab) click to toggle source
 
               # 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
            
view(*index) click to toggle source
Alias for: xview
xscrollcommand(cmd=Proc.new) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 381
def xscrollcommand(cmd=Proc.new)
  configure_cmd 'scrollcommand', cmd
  self
end
            
Also aliased as: scrollcommand
xview(*index) click to toggle source
 
               # File tk/lib/tkextlib/blt/tabset.rb, line 387
def xview(*index)
  if index.empty?
    list(tk_send_without_enc('view'))
  else
    tk_send_without_enc('view', *index)
    self
  end
end
            
Also aliased as: view