class Tk::Tcllib::Tablelist_Tile

Constants

DEFAULT_labelcommand2_value

default of 'labelcommand2' option

DEFAULT_labelcommand_value

default of 'labelcommand' option

PACKAGE_NAME
TkCommandNames
WidgetClassName

Public Class Methods

addBWidgetComboBox(name=None) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 991
def addBWidgetComboBox(name=None)
  Tk.tk_call('::tablelist::addBWidgetComboBox', name)
end
addBWidgetEntry(name=None) click to toggle source

with the BWidget package

# File lib/tkextlib/tcllib/tablelist_core.rb, line 983
def addBWidgetEntry(name=None)
  Tk.tk_call('::tablelist::addBWidgetEntry', name)
end
addBWidgetSpinBox(name=None) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 987
def addBWidgetSpinBox(name=None)
  Tk.tk_call('::tablelist::addBWidgetSpinBox', name)
end
addDateMentry(format, separator, gmt=false, name=None) click to toggle source

with the multi-entry package Mentry is a library extension

# File lib/tkextlib/tcllib/tablelist_core.rb, line 1033
def addDateMentry(format, separator, gmt=false, name=None)
  if gmt && gmt != None
    gmt = '-gmt'
  else
    gmt = None
  end
  Tk.tk_call('::tablelist::addDateMentry', format, separator, gmt, name)
end
addDateTimeMentry(format, date_sep, time_sep, gmt=false, name=None) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 1051
def addDateTimeMentry(format, date_sep, time_sep, gmt=false, name=None)
  if gmt && gmt != None
    gmt = '-gmt'
  else
    gmt = None
  end
  Tk.tk_call('::tablelist::addDateTimeMentry',
             format, date_sep, time_sep, gmt, name)
end
addFixedPointMentry(count1, count2, comma=false, name=None) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 1061
def addFixedPointMentry(count1, count2, comma=false, name=None)
  if comma && comma != None
    comma = '-comma'
  else
    comma = None
  end
  Tk.tk_call('::tablelist::addFixedPoingMentry', count1, count2, comma, name)
end
addIPAddrMentry(name=None) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 1070
def addIPAddrMentry(name=None)
  Tk.tk_call('::tablelist::addIPAddrMentry', name)
end
addIncrCombobox(name=None) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 1020
def addIncrCombobox(name=None)
  Tk.tk_call('::tablelist::addIncrCombobox', name)
end
addIncrDateTimeWidget(type, seconds=false, name=None) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 1002
def addIncrDateTimeWidget(type, seconds=false, name=None)
  # type := 'datefield'|'dateentry'|timefield'|'timeentry'
  if seconds && seconds != None
    seconds = '-seconds'
  else
    seconds = None
  end
  Tk.tk_call('::tablelist::addDateTimeWidget', type, seconds, name)
end
addIncrEntryfield(name=None) click to toggle source

with the Iwidgets ([incr Widgets]) package

# File lib/tkextlib/tcllib/tablelist_core.rb, line 998
def addIncrEntryfield(name=None)
  Tk.tk_call('::tablelist::addIncrEntry', name)
end
addIncrSpinint(name=None) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 1016
def addIncrSpinint(name=None)
  Tk.tk_call('::tablelist::addIncrSpinint', name)
end
addIncrSpinner(name=None) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 1012
def addIncrSpinner(name=None)
  Tk.tk_call('::tablelist::addIncrSpinner', name)
end
addOakleyCombobox(name=None) click to toggle source

with Bryan Oakley's combobox package

# File lib/tkextlib/tcllib/tablelist_core.rb, line 1027
def addOakleyCombobox(name=None)
  Tk.tk_call('::tablelist::addOakleyCombobox', name)
end
addTimeMentry(format, separator, gmt=false, name=None) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 1042
def addTimeMentry(format, separator, gmt=false, name=None)
  if gmt && gmt != None
    gmt = '-gmt'
  else
    gmt = None
  end
  Tk.tk_call('::tablelist::addTimeMentry', format, separator, gmt, name)
end
convEventFields(descendant, x, y) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 976
def convEventFields(descendant, x, y)
  window(Tk.tk_call('::tablelist::convEventFields', descendant, x, y))
end
getTablelistColumn(descendant) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 971
def getTablelistColumn(descendant)
  num_or_str(Tk.tk_call('::tablelist::getTablelistColumn', headerlabel))
end
getTablelistPath(descendant) click to toggle source

helper commands

# File lib/tkextlib/tcllib/tablelist_core.rb, line 967
def getTablelistPath(descendant)
  window(Tk.tk_call('::tablelist::getTablelistPath', descendant))
end
get_current_theme() click to toggle source
# File lib/tkextlib/tcllib/tablelist_tile.rb, line 29
def self.get_current_theme
  Tk.tk_call('::tablelist::getCurrentTheme')
end
get_theme_list() click to toggle source
# File lib/tkextlib/tcllib/tablelist_tile.rb, line 33
def self.get_theme_list
  TkComm.simplelist(Tk.tk_call('::tablelist::getThemes'))
end
package_name() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 20
def self.package_name
  PACKAGE_NAME
end
package_version() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 24
def self.package_version
  begin
    TkPackage.require(self.package_name)
  rescue
    ''
  end
end
set_theme(theme) click to toggle source

commands related to tile Themems

# File lib/tkextlib/tcllib/tablelist_tile.rb, line 25
def self.set_theme(theme)
  Tk.tk_call('::tablelist::setTheme', theme)
end
set_theme_defaults() click to toggle source
# File lib/tkextlib/tcllib/tablelist_tile.rb, line 36
def self.set_theme_defaults
  Tk.tk_call('::tablelist::setThemeDefaults')
end
use_Tile?() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 32
def self.use_Tile?
  (Tk::Tcllib::Tablelist_usingTile)? true: false
end

Public Instance Methods

activate(index) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 283
def activate(index)
  tk_send('activate', _to_idx(index))
  self
end
activate_cell(index) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 288
def activate_cell(index)
  tk_send('activatecell', _to_idx(index))
  self
end
Also aliased as: activatecell
activatecell(index)
Alias for: activate_cell
addToSortColumns_with_event_generate(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 856
def addToSortColumns_with_event_generate(idx)
  tk_call('::tablelist::addToSortColumns', @path, _to_idx(idx))
end
bbox(index) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 311
def bbox(index)
  list(tk_send('bbox', _to_idx(index)))
end
bodypath() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 315
def bodypath
  window(tk_send('bodypath'))
end
bodytag() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 319
def bodytag
  TkBindTag.new_by_name(tk_send('bodytag'))
end
cancel_editing() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 323
def cancel_editing
  tk_send('cancelediting')
  self
end
Also aliased as: cancelediting
cancelediting()
Alias for: cancel_editing
cellindex(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 346
def cellindex(idx)
  _from_idx(tk_send('cellindex', _to_idx(idx)))
end
cellselection_anchor(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 350
def cellselection_anchor(idx)
  tk_send('cellselection', 'anchor', _to_idx(idx))
  self
end
cellselection_clear(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 355
def cellselection_clear(first, last=nil)
  if first.kind_of?(Array)
    tk_send('cellselection', 'clear', first.collect{|idx| _to_idx(idx)})
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    tk_send('cellselection', 'clear', first, last)
  end
  self
end
cellselection_includes(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 366
def cellselection_includes(idx)
  bool(tk_send('cellselection', 'includes', _to_idx(idx)))
end
cellselection_set(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 370
def cellselection_set(first, last=nil)
  if first.kind_of?(Array)
    tk_send('cellselection', 'set', first.collect{|idx| _to_idx(idx)})
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    tk_send('cellselection', 'set', first, last)
  end
  self
end
columncount() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 398
def columncount
  number(tk_send('columncount'))
end
columnindex(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 402
def columnindex(idx)
  number(tk_send('columnindex', _to_idx(idx)))
end
columnwidth(idx, opt=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 406
def columnwidth(idx, opt=nil)
  if opt
    number(tk_send('columnwidth', _to_idx(idx), "-#{opt}"))
  else
    number(tk_send('columnwidth', _to_idx(idx)))
  end
end
config_celllist(lst)
Alias for: configcelllist
config_cells(*args)
Alias for: configcells
config_columnlist(lst)
Alias for: configcolumnlist
config_columns(*args)
Alias for: configcolumns
config_rowlist(lst)
Alias for: configrowlist
config_rows(*args)
Alias for: configrows
configcelllist(lst) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 423
def configcelllist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
  ary = []
  lst.slice(3){|idx, opt, val|
    ary << _to_idx(idx) << "-#{opt}" << val
  }
  tk_send('configcelllist', ary)
  self
end
Also aliased as: config_celllist
configcells(*args) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 433
def configcells(*args) # args ==> idx, opt, val, idx, opt, val, ...
  ary = []
  args.slice(3){|idx, opt, val|
    ary << _to_idx(idx) << "-#{opt}" << val
  }
  tk_send('configcells', *ary)
  self
end
Also aliased as: config_cells
configcolumnlist(lst) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 443
def configcolumnlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
  ary = []
  lst.slice(3){|idx, opt, val|
    ary << _to_idx(idx) << "-#{opt}" << val
  }
  tk_send('configcolumnlist', ary)
  self
end
Also aliased as: config_columnlist
configcolumns(*args) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 453
def configcolumns(*args) # args ==> idx, opt, val, idx, opt, val, ...
  ary = []
  args.slice(3){|idx, opt, val|
    ary << _to_idx(idx) << "-#{opt}" << val
  }
  tk_send('configcolumns', *ary)
  self
end
Also aliased as: config_columns
configrowlist(lst) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 463
def configrowlist(lst) # lst ==> [idx, opt, val, idx, opt, val, ...]
  ary = []
  lst.slice(3){|idx, opt, val|
    ary << _to_idx(idx) << "-#{opt}" << val
  }
  tk_send('configrowlist', ary)
  self
end
Also aliased as: config_rowlist
configrows(*args) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 473
def configrows(*args) # args ==> idx, opt, val, idx, opt, val, ...
  ary = []
  args.slice(3){|idx, opt, val|
    ary << _to_idx(idx) << "-#{opt}" << val
  }
  tk_send('configrows', *ary)
  self
end
Also aliased as: config_rows
containing(y) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 483
def containing(y)
  idx = num_or_str(tk_send('containing', y))
  (idx.kind_of?(Fixnum) && idx < 0)?  nil: idx
end
containing_cell(x, y) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 488
def containing_cell(x, y)
  idx = _from_idx(tk_send('containingcell', x, y))
  if idx.kind_of?(Array)
    [
      ((idx[0].kind_of?(Fixnum) && idx[0] < 0)?  nil: idx[0]),
      ((idx[1].kind_of?(Fixnum) && idx[1] < 0)?  nil: idx[1])
    ]
  else
    idx
  end
end
Also aliased as: containingcell
containing_column(x) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 501
def containing_column(x)
  idx = num_or_str(tk_send('containingcolumn', x))
  (idx.kind_of?(Fixnum) && idx < 0)?  nil: idx
end
Also aliased as: containingcolumn
containingcell(x, y)
Alias for: containing_cell
containingcolumn(x)
Alias for: containing_column
curcellselection() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 507
def curcellselection
  simplelist(tk_send('curcellselection')).collect!{|idx| _from_idx(idx)}
end
curselection() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 511
def curselection
  list(tk_send('curselection'))
end
delete(first, last=nil)
Alias for: delete_items
delete_columns(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 528
def delete_columns(first, last=nil)
  if first.kind_of?(Array)
    tk_send('deletecolumns', first.collect{|idx| _to_idx(idx)})
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    tk_send('deletecolumns', first, last)
  end
  self
end
Also aliased as: deletecolumns
delete_items(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 515
def delete_items(first, last=nil)
  if first.kind_of?(Array)
    tk_send('delete', first.collect{|idx| _to_idx(idx)})
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    tk_send('delete', first, last)
  end
  self
end
Also aliased as: delete, deleteitems
deletecolumns(first, last=nil)
Alias for: delete_columns
deleteitems(first, last=nil)
Alias for: delete_items
edit_cell(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 540
def edit_cell(idx)
  tk_send('editcell', _to_idx(idx))
  self
end
Also aliased as: editcell
editcell(idx)
Alias for: edit_cell
editwinpath() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 550
def editwinpath
  window(tk_send('editwinpath'))
end
editwintag() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 546
def editwintag
  TkBindTag.new_by_name(tk_send('editwintag'))
end
elem_snipped?(cellidx, tkvar)
Alias for: is_elem_snipped?
entrypath() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 554
def entrypath
  window(tk_send('entrypath'))
end
fill_column(idx, txt) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 558
def fill_column(idx, txt)
  tk_send('fillcolumn', _to_idx(idx), txt)
  self
end
Also aliased as: fillcolumn
fillcolumn(idx, txt)
Alias for: fill_column
finish_editing() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 564
def finish_editing
  tk_send('finishediting')
  self
end
Also aliased as: finishediting
finishediting()
Alias for: finish_editing
formatinfo() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 570
def formatinfo
  key, row, col = simplelist(tk_send('formatinfo'))
  [key, number(row), number(col)]
end
get(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 575
def get(first, last=nil)
  if first.kind_of?(Array)
    simplelist(tk_send('get', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    simplelist(tk_send('get', first, last))
  end
end
get_attrib(name=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 294
def get_attrib(name=nil)
  if name && name != None
    tk_send('attrib', name)
  else
    ret = []
    lst = simplelist(tk_send('attrib'))
    until lst.empty?
      ret << ( [lst.shift] << lst.shift )
    end
    ret
  end
end
get_cellattrib(name=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 329
def get_cellattrib(name=nil)
  if name && name != None
    tk_send('cellattrib', name)
  else
    ret = []
    lst = simplelist(tk_send('cellattrib'))
    until lst.empty?
      ret << ( [lst.shift] << lst.shift )
    end
    ret
  end
end
get_cells(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 585
def get_cells(first, last=nil)
  if first.kind_of?(Array)
    simplelist(tk_send('getcells', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    simplelist(tk_send('getcells', first, last))
  end
end
Also aliased as: getcells
get_columnattrib(name=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 381
def get_columnattrib(name=nil)
  if name && name != None
    tk_send('columnattrib', name)
  else
    ret = []
    lst = simplelist(tk_send('columnattrib'))
    until lst.empty?
      ret << ( [lst.shift] << lst.shift )
    end
    ret
  end
end
get_columns(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 596
def get_columns(first, last=nil)
  if first.kind_of?(Array)
    simplelist(tk_send('getcolumns', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    simplelist(tk_send('getcolumns', first, last))
  end
end
Also aliased as: getcolumns
get_keys(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 607
def get_keys(first, last=nil)
  if first.kind_of?(Array)
    simplelist(tk_send('getkeys', first.collect{|idx| _to_idx(idx)})).collect!{|elem| simplelist(elem) }
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    simplelist(tk_send('getkeys', first, last))
  end
end
Also aliased as: getkeys
get_rowattrib(name=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 728
def get_rowattrib(name=nil)
  if name && name != None
    tk_send('rowattrib', name)
  else
    ret = []
    lst = simplelist(tk_send('rowattrib'))
    until lst.empty?
      ret << ( [lst.shift] << lst.shift )
    end
    ret
  end
end
getcells(first, last=nil)
Alias for: get_cells
getcolumns(first, last=nil)
Alias for: get_columns
getkeys(first, last=nil)
Alias for: get_keys
has_attrib?(name) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 618
def has_attrib?(name)
  bool(tk_send('hasattrib', name))
end
has_cellattrib?(idx, name) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 622
def has_cellattrib?(idx, name)
  bool(tk_send('hascellattrib', _to_idx(idx), name))
end
has_columnattrib?(idx, name) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 626
def has_columnattrib?(idx, name)
  bool(tk_send('hascolumnattrib', _to_idx(idx), name))
end
has_rowattrib?(idx, name) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 630
def has_rowattrib?(idx, name)
  bool(tk_send('hasrowattrib', _to_idx(idx), name))
end
imagelabelpath(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 634
def imagelabelpath(idx)
  window(tk_send('imagelabelpath', _to_idx(idx)))
end
index(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 638
def index(idx)
  number(tk_send('index', _to_idx(idx)))
end
insert(idx, *items) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 642
def insert(idx, *items)
  tk_send('insert', _to_idx(idx), *items)
  self
end
insert_columnlist(idx, columnlist) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 647
def insert_columnlist(idx, columnlist)
  tk_send('insertcolumnlist', _to_idx(idx), columnlist)
  self
end
Also aliased as: insertcolumnlist
insert_columns(idx, *args) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 653
def insert_columns(idx, *args)
  tk_send('insertcolums', _to_idx(idx), *args)
  self
end
Also aliased as: insertcolumns
insert_list(idx, list) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 659
def insert_list(idx, list)
  tk_send('insertlist', _to_idx(idx), list)
  self
end
Also aliased as: insertlist
insertcolumnlist(idx, columnlist)
Alias for: insert_columnlist
insertcolumns(idx, *args)
Alias for: insert_columns
insertlist(idx, list)
Alias for: insert_list
is_elem_snipped?(cellidx, tkvar) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 665
def is_elem_snipped?(cellidx, tkvar)
  bool(tk_send('iselemsnipped', _to_idx(cellidx), tkvar))
end
Also aliased as: elem_snipped?
is_title_snipped?(colidx, tkvar) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 670
def is_title_snipped?(colidx, tkvar)
  bool(tk_send('istitlesnipped', _to_idx(colidx), tkvar))
end
Also aliased as: title_snipped?
itemlistvar() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 675
def itemlistvar
  TkVarAccess.new(tk_send('itemlistvar'))
end
labelpath(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 679
def labelpath(idx)
  window(tk_send('labelpath', _to_idx(idx)))
end
labels() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 683
def labels
  simplelist(tk_send('labels'))
end
labeltag() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 687
def labeltag
  TkBindTag.new_by_name(tk_send('labeltag'))
end
move(src, target) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 691
def move(src, target)
  tk_send('move', _to_idx(src), _to_idx(target))
  self
end
move_column(src, target) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 696
def move_column(src, target)
  tk_send('movecolumn', _to_idx(src), _to_idx(target))
  self
end
Also aliased as: movecolumn
movecolumn(src, target)
Alias for: move_column
nearest(y) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 702
def nearest(y)
  _from_idx(tk_send('nearest', y))
end
nearest_cell(x, y) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 706
def nearest_cell(x, y)
  _from_idx(tk_send('nearestcell', x, y))
end
Also aliased as: nearestcell
nearest_column(x) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 711
def nearest_column(x)
  _from_idx(tk_send('nearestcolumn', x))
end
Also aliased as: nearestcolumn
nearestcell(x, y)
Alias for: nearest_cell
nearestcolumn(x)
Alias for: nearest_column
reject_input() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 716
def reject_input
  tk_send('rejectinput')
  self
end
Also aliased as: rejectinput
rejectinput()
Alias for: reject_input
requested_columnwidth(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 413
def requested_columnwidth(idx)
  columnwidth(idx, 'requested')
end
reset_sortinfo() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 722
def reset_sortinfo
  tk_send('resetsortinfo')
  self
end
Also aliased as: resetsortinfo
resetsortinfo()
Alias for: reset_sortinfo
scan_dragto(x, y) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 750
def scan_dragto(x, y)
  tk_send('scan', 'dragto', x, y)
  self
end
scan_mark(x, y) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 745
def scan_mark(x, y)
  tk_send('scan', 'mark', x, y)
  self
end
see(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 755
def see(idx)
  tk_send('see', _to_idx(idx))
  self
end
see_cell(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 760
def see_cell(idx)
  tk_send('seecell', _to_idx(idx))
  self
end
Also aliased as: seecell
see_column(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 766
def see_column(idx)
  tk_send('seecolumn', _to_idx(idx))
  self
end
Also aliased as: seecolumn
seecell(idx)
Alias for: see_cell
seecolumn(idx)
Alias for: see_column
selection_anchor(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 772
def selection_anchor(idx)
  tk_send('selection', 'anchor', _to_idx(idx))
  self
end
selection_clear(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 777
def selection_clear(first, last=nil)
  if first.kind_of?(Array)
    tk_send('selection', 'clear', first.collect{|idx| _to_idx(idx)})
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    tk_send('selection', 'clear', first, last)
  end
  self
end
selection_includes(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 788
def selection_includes(idx)
  bool(tk_send('selection', 'includes', _to_idx(idx)))
end
selection_set(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 792
def selection_set(first, last=nil)
  if first.kind_of?(Array)
    tk_send('selection', 'set', first.collect{|idx| _to_idx(idx)})
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    tk_send('selection', 'set', first, last)
  end
  self
end
separatorpath(idx=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 803
def separatorpath(idx=nil)
  if idx
    window(tk_send('separatorpath', _to_idx(idx)))
  else
    window(tk_send('separatorpath'))
  end
end
separators() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 811
def separators
  simplelist(tk_send('separators')).collect!{|w| window(w)}
end
set_attrib(*args) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 306
def set_attrib(*args)
  tk_send('attrib', *(args.flatten))
  self
end
set_cellattrib(*args) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 341
def set_cellattrib(*args)
  tk_send('cellattrib', *(args.flatten))
  self
end
set_columnattrib(*args) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 393
def set_columnattrib(*args)
  tk_send('columnattrib', *(args.flatten))
  self
end
set_rowattrib(*args) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 740
def set_rowattrib(*args)
  tk_send('rowattrib', *(args.flatten))
  self
end
size() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 815
def size
  number(tk_send('size'))
end
sort(order=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 819
def sort(order=nil)
  if order
    order = order.to_s
    order = '-' << order if order[0] != ?-
    if order.length < 2
      order = nil
    end
  end
  if order
    tk_send('sort', order)
  else
    tk_send('sort')
  end
  self
end
sortByColumn_with_event_generate(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 852
def sortByColumn_with_event_generate(idx)
  tk_call('::tablelist::sortByColumn', @path, _to_idx(idx))
end
sort_by_column(idx, order=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 860
def sort_by_column(idx, order=nil)
  if order
    order = order.to_s
    order = '-' << order if order[0] != ?-
    if order.length < 2
      order = nil
    end
  end
  if order
    tk_send('sortbycolumn', _to_idx(idx), order)
  else
    tk_send('sortbycolumn', _to_idx(idx))
  end
  self
end
sort_by_column_decreasing(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 879
def sort_by_column_decreasing(idx)
  tk_send('sortbycolumn', _to_idx(idx), '-decreasing')
  self
end
sort_by_column_increasing(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 875
def sort_by_column_increasing(idx)
  tk_send('sortbycolumn', _to_idx(idx), '-increasing')
  self
end
sort_by_columnlist(idxlist, orderlist=None) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 884
def sort_by_columnlist(idxlist, orderlist=None)
  # orderlist :: list of 'increasing' or 'decreasing'
  tk_send('sortbycolumnlist', idxlist.map{|idx| _to_idx(idx)}, orderlist)
  self
end
sort_decreasing() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 838
def sort_decreasing
  tk_send('sort', '-decreasing')
  self
end
sort_increasing() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 834
def sort_increasing
  tk_send('sort', '-increasing')
  self
end
sortcolumn() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 890
def sortcolumn
  idx = num_or_str(tk_send('sortcolumn'))
  (idx.kind_of?(Fixnum) && idx < 0)?  nil: idx
end
sortcolumnlist() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 895
def sortcolumnlist
  simplelist(tk_send('sortcolumnlist')).map{|col| num_or_str(col)}
end
sortorder() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 899
def sortorder
  tk_send('sortorder')
end
sortorderlist() click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 903
def sortorderlist
  simplelist(tk_send('sortorderlist'))
end
stretched_columnwidth(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 416
def stretched_columnwidth(idx)
  columnwidth(idx, 'stretched')
end
title_snipped?(colidx, tkvar)
Alias for: is_title_snipped?
toggle_columnhide(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 907
def toggle_columnhide(first, last=nil)
  if first.kind_of?(Array)
    tk_send('togglecolumnhide', first.collect{|idx| _to_idx(idx)})
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    tk_send('togglecolumnhide', first, last)
  end
end
toggle_rowhide(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 917
def toggle_rowhide(first, last=nil)
  if first.kind_of?(Array)
    tk_send('togglerowhide', first.collect{|idx| _to_idx(idx)})
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    tk_send('togglerowhide', first, last)
  end
end
toggle_visibility(first, last=nil) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 927
def toggle_visibility(first, last=nil)
  if first.kind_of?(Array)
    tk_send('togglevisibility', first.collect{|idx| _to_idx(idx)})
  else
    first = _to_idx(first)
    last = (last)? _to_idx(last): first
    tk_send('togglevisibility', first, last)
  end
  self
end
Also aliased as: togglevisibility
togglevisibility(first, last=nil)
Alias for: toggle_visibility
total_columnwidth(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 419
def total_columnwidth(idx)
  columnwidth(idx, 'total')
end
unset_attrib(name) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 939
def unset_attrib(name)
  tk_send('unsetattrib', name)
  self
end
unset_cellattrib(idx, name) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 944
def unset_cellattrib(idx, name)
  tk_send('unsetcellattrib', _to_idx(idx), name)
  self
end
unset_columnattrib(idx, name) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 949
def unset_columnattrib(idx, name)
  tk_send('unsetcolumnattrib', _to_idx(idx), name)
  self
end
unset_rowattrib(idx, name) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 954
def unset_rowattrib(idx, name)
  tk_send('unsetrowattrib', _to_idx(idx), name)
  self
end
windowpath(idx) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 959
def windowpath(idx)
  window(tk_send('windowpath', _to_idx(idx)))
end

Private Instance Methods

__boolval_optkeys() click to toggle source
Calls superclass method TkConfigMethod#__boolval_optkeys
# File lib/tkextlib/tcllib/tablelist_core.rb, line 180
def __boolval_optkeys
  super() - ['takefocus'] + [
    'forceeditendcommand', 'movablecolumns', 'movablerows',
    'protecttitlecolumns', 'resizablecolumns', 'setfocus',
    'showarrow', 'showlabels', 'showseparators'
  ]
end
__font_optkeys() click to toggle source
Calls superclass method
# File lib/tkextlib/tcllib/tablelist_core.rb, line 242
def __font_optkeys
  super() + ['labelfont']
end
__item_boolval_optkeys(id) click to toggle source
Calls superclass method
# File lib/tkextlib/tcllib/tablelist_core.rb, line 258
def __item_boolval_optkeys(id)
  super(id) + [
    'changesnipside', 'editable', 'hide', 'resizable', 'selectable',
    'showarrow', 'showlinenumbers', 'stretchable', 'stretchwindow', 'wrap'
  ]
end
__item_font_optkeys(id) click to toggle source
Calls superclass method
# File lib/tkextlib/tcllib/tablelist_core.rb, line 275
def __item_font_optkeys(id)
  # maybe need to override
  super(id) + ['labelfont']
end
__item_listval_optkeys(id) click to toggle source
Calls superclass method
# File lib/tkextlib/tcllib/tablelist_core.rb, line 266
def __item_listval_optkeys(id)
  if id[0] == 'cell'
    super(id)
  else
    super(id) + ['text']
  end
end
__item_strval_optkeys(id) click to toggle source
Calls superclass method
# File lib/tkextlib/tcllib/tablelist_core.rb, line 249
def __item_strval_optkeys(id)
  if id[0] == 'cell'
    super(id) + ['title']
  else
    super(id) - ['text'] + ['title', 'name']
  end
end
__listval_optkeys() click to toggle source
Calls superclass method TkConfigMethod#__listval_optkeys
# File lib/tkextlib/tcllib/tablelist_core.rb, line 189
def __listval_optkeys
  super() + ['columns', 'columntitles']
end
__numval_optkeys() click to toggle source
Calls superclass method TkConfigMethod#__numval_optkeys
# File lib/tkextlib/tcllib/tablelist_core.rb, line 170
def __numval_optkeys
  super() + ['titlecolumns']
end
__ruby2val_optkeys() click to toggle source
Calls superclass method TkConfigMethod#__ruby2val_optkeys
# File lib/tkextlib/tcllib/tablelist_core.rb, line 220
def __ruby2val_optkeys  # { key=>proc, ... }
  # The method is used to convert a ruby's object to a opt-value.
  # When set the value of the option "key", "proc.call(value)" is called.
  # That is, "-#{key} #{proc.call(value)}".
  super().update('stretch'=>proc{|v|
                   (v.kind_of?(Array))? v.collect{|e| _to_idx(e)}: v
                 },
                 'takefocus'=>proc{|v|
                   case v
                   when true
                     '1'
                   when false
                     '0'
                   when nil
                     ''
                   else
                     _get_eval_string(v)
                   end
                 })
end
__strval_optkeys() click to toggle source
Calls superclass method TkConfigMethod#__strval_optkeys
# File lib/tkextlib/tcllib/tablelist_core.rb, line 175
def __strval_optkeys
  super() + ['snipstring']
end
__tkvariable_optkeys() click to toggle source
Calls superclass method TkConfigMethod#__tkvariable_optkeys
# File lib/tkextlib/tcllib/tablelist_core.rb, line 194
def __tkvariable_optkeys
  super() + ['listvariable']
end
__val2ruby_optkeys() click to toggle source
Calls superclass method TkConfigMethod#__val2ruby_optkeys
# File lib/tkextlib/tcllib/tablelist_core.rb, line 199
def __val2ruby_optkeys  # { key=>proc, ... }
  # The method is used to convert a opt-value to a ruby's object.
  # When get the value of the option "key", "proc.call(value)" is called.
  super().update('stretch'=>proc{|v|
                   (v == 'all')? v: simplelist(v)
                 },
                 'takefocus'=>proc{|v|
                   case v
                   when '1'
                     true
                   when '0'
                     false
                   when ''
                     nil
                   else # cmd
                     tk_tcl2ruby(cmd)
                     end
                 })
end
create_self(keys) click to toggle source
# File lib/tkextlib/tcllib/tablelist_core.rb, line 158
def create_self(keys)
  if keys and keys != None
    tk_call_without_enc(self.class::TkCommandNames[0], @path,
                        *hash_kv(keys, true))
  else
    tk_call_without_enc(self.class::TkCommandNames[0], @path)
  end
end