Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 710
def addBWidgetComboBox(name=None)
Tk.tk_call('::tablelist::addBWidgetComboBox', name)
end
with the BWidget package
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 702
def addBWidgetEntry(name=None)
Tk.tk_call('::tablelist::addBWidgetEntry', name)
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 706
def addBWidgetSpinBox(name=None)
Tk.tk_call('::tablelist::addBWidgetSpinBox', name)
end
with the multi-entry package Mentry is a library extension
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 752
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 770
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 779
def addIPAddrMentry(name=None)
Tk.tk_call('::tablelist::addIPAddrMentry', name)
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 739
def addIncrCombobox(name=None)
Tk.tk_call('::tablelist::addIncrCombobox', name)
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 721
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
with the Iwidgets ([incr Widgets]) package
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 717
def addIncrEntryfield(name=None)
Tk.tk_call('::tablelist::addIncrEntry', name)
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 735
def addIncrSpinint(name=None)
Tk.tk_call('::tablelist::addIncrSpinint', name)
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 731
def addIncrSpinner(name=None)
Tk.tk_call('::tablelist::addIncrSpinner', name)
end
with Bryan Oakley's combobox package
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 746
def addOakleyCombobox(name=None)
Tk.tk_call('::tablelist::addOakleyCombobox', name)
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 761
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 695
def convEventFields(descendant, x, y)
window(Tk.tk_call('::tablelist::convEventFields', descendant, x, y))
end
helper commands
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 691
def getTablelistPath(descendant)
window(Tk.tk_call('::tablelist::getTablelistPath', descendant))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 19
def self.package_name
PACKAGE_NAME
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 243
def activate(index)
tk_send('activate', _to_idx(index))
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 248
def activate_cell(index)
tk_send('activatecell', _to_idx(index))
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 271
def bbox(index)
list(tk_send('bbox', _to_idx(index)))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 275
def bodypath
window(tk_send('bodypath'))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 279
def bodytag
TkBindTag.new_by_name(tk_send('bodytag'))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 283
def cancel_editing
tk_send('cancelediting')
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 289
def cellindex(idx)
_from_idx(tk_send('cellindex', _to_idx(idx)))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 293
def cellselection_anchor(idx)
tk_send('cellselection', 'anchor', _to_idx(idx))
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 298
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 309
def cellselection_includes(idx)
bool(tk_send('cellselection', 'includes', _to_idx(idx)))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 313
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 324
def columncount
number(tk_send('columncount'))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 328
def columnindex(idx)
number(tk_send('columnindex', _to_idx(idx)))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 332
def containing(y)
idx = num_or_str(tk_send('containing', y))
(idx.kind_of?(Fixnum) && idx < 0)? nil: idx
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 337
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 350
def containing_column(x)
idx = num_or_str(tk_send('containingcolumn', x))
(idx.kind_of?(Fixnum) && idx < 0)? nil: idx
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 356
def curcellselection
simplelist(tk_send('curcellselection')).collect!{|idx| _from_idx(idx)}
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 360
def curselection
list(tk_send('curselection'))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 377
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 364
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 389
def edit_cell(idx)
tk_send('editcell', _to_idx(idx))
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 395
def editwinpath
window(tk_send('editwinpath'))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 399
def entrypath
window(tk_send('entrypath'))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 403
def fill_column(idx, txt)
tk_send('fillcolumn', _to_idx(idx), txt)
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 409
def finish_editing
tk_send('finishediting')
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 415
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 254
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 425
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 436
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 447
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 458
def imagelabelpath(idx)
window(tk_send('imagelabelpath', _to_idx(idx)))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 462
def index(idx)
number(tk_send('index', _to_idx(idx)))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 466
def insert(idx, *items)
tk_send('insert', _to_idx(idx), *items)
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 471
def insert_columnlist(idx, columnlist)
tk_send('insertcolumnlist', _to_idx(idx), columnlist)
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 477
def insert_columns(idx, *args)
tk_send('insertcolums', _to_idx(idx), *args)
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 483
def insert_list(idx, list)
tk_send('insertlist', _to_idx(idx), list)
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 489
def itemlistvar
TkVarAccess.new(tk_send('itemlistvar'))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 493
def labelpath(idx)
window(tk_send('labelpath', _to_idx(idx)))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 497
def labels
simplelist(tk_send('labels'))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 501
def move(src, target)
tk_send('move', _to_idx(src), _to_idx(target))
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 506
def move_column(src, target)
tk_send('movecolumn', _to_idx(src), _to_idx(target))
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 512
def nearest(y)
_from_idx(tk_send('nearest', y))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 516
def nearest_cell(x, y)
_from_idx(tk_send('nearestcell', x, y))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 521
def nearest_column(x)
_from_idx(tk_send('nearestcolumn', x))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 526
def reject_input
tk_send('rejectinput')
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 532
def reset_sortinfo
tk_send('resetsortinfo')
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 543
def scan_dragto(x, y)
tk_send('scan', 'dragto', x, y)
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 538
def scan_mark(x, y)
tk_send('scan', 'mark', x, y)
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 548
def see(idx)
tk_send('see', _to_idx(idx))
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 553
def see_cell(idx)
tk_send('seecell', _to_idx(idx))
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 559
def see_column(idx)
tk_send('seecolumn', _to_idx(idx))
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 565
def selection_anchor(idx)
tk_send('selection', 'anchor', _to_idx(idx))
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 570
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 581
def selection_includes(idx)
bool(tk_send('selection', 'includes', _to_idx(idx)))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 585
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 596
def separatorpath(idx=nil)
if idx
window(tk_send('separatorpath', _to_idx(idx)))
else
window(tk_send('separatorpath'))
end
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 604
def separators
simplelist(tk_send('separators')).collect!{|w| window(w)}
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 266
def set_attrib(*args)
tk_send('attrib', *(args.flatten))
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 608
def size
number(tk_send('size'))
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 612
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 638
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
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 657
def sort_by_column_decreasing(idx)
tk_send('sortbycolumn', _to_idx(idx), '-decreasing')
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 653
def sort_by_column_increasing(idx)
tk_send('sortbycolumn', _to_idx(idx), '-increasing')
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 631
def sort_decreasing
tk_send('sort', '-decreasing')
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 627
def sort_increasing
tk_send('sort', '-increasing')
self
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 662
def sortcolumn
idx = num_or_str(tk_send('sortcolum'))
(idx.kind_of?(Fixnum) && idx < 0)? nil: idx
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 667
def sortorder
tk_send('sortorder')
end
# File tk/lib/tkextlib/tcllib/tablelist_core.rb, line 671
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