Class: Tk::Tcllib::Tablelist

Inherits:
TkWindow show all
Includes:
Scrollable, TablelistItemConfig
Defined in:
lib/tkextlib/tcllib/tablelist_core.rb,
lib/tkextlib/tcllib/tablelist_core.rb

Constant Summary collapse

PACKAGE_NAME =
'Tablelist'.freeze
TkCommandNames =
['::tablelist::tablelist'.freeze].freeze
WidgetClassName =
'Tablelist'.freeze
DEFAULT_sortByColumn_cmd =
'::tablelist::sortByColumn'

Constants included from TkUtil

TkUtil::None, TkUtil::RELEASE_DATE

Constants included from Tk

AUTO_PATH, INTERP, JAPANIZED_TK, LIBRARY_PATH, MAINLOOP, PACKAGE_PATH, RELEASE_DATE, Tk::TCL_LIBRARY_PATH, Tk::TCL_MAJOR_VERSION, Tk::TCL_MINOR_VERSION, Tk::TCL_PACKAGE_PATH, Tk::TCL_PATCHLEVEL, Tk::TCL_PRECISION, Tk::TCL_VERSION, Tk::TK_MAJOR_VERSION, Tk::TK_MINOR_VERSION, Tk::TK_PATCHLEVEL, Tk::TK_VERSION, Tk::Tkextlib_RELEASE_DATE, Tk::TreeCtrl_Widget, X_Scrollable, Y_Scrollable

Constants included from TkCore

TkCore::EventFlag, TkCore::INTERP, TkCore::WIDGET_DESTROY_HOOK

Constants included from TkComm

TkComm::GET_CONFIGINFO_AS_ARRAY, TkComm::GET_CONFIGINFOwoRES_AS_ARRAY, TkComm::TkExtlibAutoloadModule, TkComm::Tk_CMDTBL, TkComm::Tk_IDs, TkComm::Tk_WINDOWS, TkComm::USE_TCLs_LIST_FUNCTIONS, TkComm::WidgetClassNames

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Scrollable

#autoscroll, #unautoscroll

Methods included from YScrollable

#yscrollbar, #yscrollcommand, #yview, #yview_moveto, #yview_scroll

Methods included from XScrollable

#xscrollbar, #xscrollcommand, #xview, #xview_moveto, #xview_scroll

Methods included from TablelistItemConfig

#__item_cget_cmd, #__item_config_cmd, #cell_cget, #cell_configinfo, #cell_configure, #column_cget, #column_configinfo, #column_configure, #current_cell_configinfo, #current_column_configinfo, #current_row_configinfo, #row_cget, #row_configinfo, #row_configure

Methods included from TkItemConfigMethod

#current_itemconfiginfo, #itemcget, #itemconfiginfo, #itemconfigure, #tagid

Methods included from TkItemConfigOptkeys

#__conv_item_keyonly_opts, #itemconfig_hash_kv

Methods included from TkUtil

_conv_args, #_conv_args, #_fromUTF8, _get_eval_enc_str, #_get_eval_enc_str, #_get_eval_string, _get_eval_string, _symbolkey2str, #_symbolkey2str, #_toUTF8, bool, #bool, callback, eval_cmd, #hash_kv, hash_kv, install_cmd, num_or_str, #num_or_str, number, #number, string, #string, uninstall_cmd

Methods included from TkTreatItemFont

#kanjifont_copy, #kanjitagfont_configure, #latintagfont_configure, #latintagfont_copy, #tagfont_configinfo, #tagfont_configure, #tagfont_copy

Methods inherited from TkWindow

#bind_class, #bindtags, #bindtags=, #bindtags_shift, #bindtags_unshift, #caret, #colormodel, #command, #cursor_propagate, #cursor_restore, #database_class, database_class, #database_classname, database_classname, #destroy, #eventloop_wait_destroy, #eventloop_wait_visibility, #exist?, #grab, #grab_current, #grab_release, #grab_set, #grab_set_global, #grab_status, #grid, #grid_bbox, #grid_columnconfig, #grid_columnconfiginfo, #grid_config, #grid_forget, #grid_in, #grid_info, #grid_location, #grid_propagate, #grid_remove, #grid_rowconfig, #grid_rowconfiginfo, #grid_size, #grid_slaves, #initialize, #lower, #pack, #pack_config, #pack_forget, #pack_in, #pack_info, #pack_propagate, #pack_slaves, #place, #place_config, #place_configinfo, #place_forget, #place_in, #place_info, #place_slaves, #raise, #set_focus, #thread_wait_destroy, #thread_wait_visibility, #tktrans_get_image, #tktrans_set_image, to_eval, #wait_destroy, #wait_visibility

Methods included from TkBindCore

#bind, #bind_append, #bind_remove, #bindinfo

Methods included from TkWinfo

appname, atom, atomname, cells, children, classname, colormapfull, containing, depth, exist?, fpixels, geometry, height, id, interps, manager, mapped?, parent, pixels, pointerx, pointerxy, pointery, reqheight, reqwidth, rgb, rootx, rooty, screen, screencells, screendepth, screenheight, screenmmheight, screenmmwidth, screenvisual, screenwidth, server, toplevel, viewable, visual, visualid, visualsavailable, vrootheight, vrootwidth, vrootx, vrooty, widget, width, #winfo_appname, #winfo_atom, #winfo_atomname, #winfo_cells, #winfo_children, #winfo_classname, #winfo_colormapfull, #winfo_containing, #winfo_depth, #winfo_exist?, #winfo_fpixels, #winfo_geometry, #winfo_height, #winfo_id, #winfo_interps, #winfo_manager, #winfo_mapped?, #winfo_parent, #winfo_pixels, #winfo_pointerx, #winfo_pointerxy, #winfo_pointery, #winfo_reqheight, #winfo_reqwidth, #winfo_rgb, #winfo_rootx, #winfo_rooty, #winfo_screen, #winfo_screencells, #winfo_screendepth, #winfo_screenheight, #winfo_screenmmheight, #winfo_screenmmwidth, #winfo_screenvisual, #winfo_screenwidth, #winfo_server, #winfo_toplevel, #winfo_viewable, #winfo_visual, #winfo_visualid, #winfo_visualsavailable, #winfo_vrootheight, #winfo_vrootwidth, #winfo_vrootx, #winfo_vrooty, #winfo_widget, #winfo_width, #winfo_x, #winfo_y, x, y

Methods included from Tk

BinaryString, EncodedString, UTF8_String, add_kinsoku, bell, bell_on_display, const_missing, current_grabs, cursor_display, delete_kinsoku, destroy, #encoding, #encoding=, errorCode, errorInfo, exit, focus, focus_lastfor, focus_next, focus_prev, focus_to, fromUTF8, grid, grid_forget, has_mainwindow?, load_tcllibrary, load_tclscript, load_tclscript_rsrc, load_tclscript_rsrcid, lower_window, pack, pack_forget, pkgconfig_get, pkgconfig_list, place, place_forget, raise_window, #root, show_kinsoku, strictMotif, subst_tk_backslash, subst_utf_backslash, tcl_pkgconfig_get, tcl_pkgconfig_list, thread_update, thread_update_idletasks, tk_pkgconfig_get, tk_pkgconfig_list, toUTF8, to_backslash_sequence, ungrid, unload_tcllibrary, unpack, unplace, #update, update, update_idletasks, utf_to_backslash, utf_to_backslash_sequence

Methods included from Encoding

#encoding, #encoding=, #encoding_convertfrom, #encoding_convertto, #encoding_dirs, #encoding_dirs=, #encoding_names, #encoding_system, #encoding_system=

Methods included from TkCore

#_tk_call_to_list_core, #after, #after_cancel, #after_idle, #appname, #appsend, #appsend_deny, #appsend_displayof, callback, #callback_break, #callback_continue, #callback_return, #chooseColor, #chooseDirectory, #do_one_event, #event_generate, #getMultipleOpenFile, #getMultipleSaveFile, #getOpenFile, #getSaveFile, #get_eventloop_tick, #get_eventloop_weight, #get_no_event_wait, #inactive, #inactive_displayof, #info, #ip_eval, #ip_eval_with_enc, #ip_eval_without_enc, #ip_invoke, #ip_invoke_with_enc, #ip_invoke_without_enc, #is_mainloop?, #load_cmd_on_ip, #mainloop, #mainloop_exist?, #mainloop_thread?, #mainloop_watchdog, #messageBox, #rb_appsend, #rb_appsend_displayof, #reset_inactive, #reset_inactive_displayof, #restart, #scaling, #scaling_displayof, #set_eventloop_tick, #set_eventloop_weight, #set_no_event_wait, #tk_call, #tk_call_to_list, #tk_call_to_list_with_enc, #tk_call_to_list_without_enc, #tk_call_to_simplelist, #tk_call_to_simplelist_with_enc, #tk_call_to_simplelist_without_enc, #tk_call_with_enc, #tk_call_without_enc, #windowingsystem

Methods included from TkComm

_at, _callback_entry?, _callback_entry_class?, _curr_cmd_id, _fromUTF8, _genobj_for_tkwidget, _next_cmd_id, _toUTF8, array2tk_list, #bind, #bind_all, #bind_append, #bind_append_all, #bind_remove, #bind_remove_all, #bindinfo, #bindinfo_all, bool, image_obj, install_cmd, list, num_or_str, number, procedure, simplelist, string, #subst, tk_tcl2ruby, uninstall_cmd, window

Methods included from TkEvent

#install_bind, #install_bind_for_event_class

Methods included from Tk::TkDND::DND

#dnd_bindsource, #dnd_bindsource_info, #dnd_bindtarget, #dnd_bindtarget_info, #dnd_clearsource, #dnd_cleartarget, #dnd_drag, version

Methods included from Tk::TkDND::Shape

package_patchlevel, #shape_bounds, #shape_get, #shape_offset, #shape_set, #shape_update, version

Methods inherited from TkObject

#destroy, #epath, #event_generate, #method_missing, #path, #tk_send, #tk_send_to_list, #tk_send_to_list_with_enc, #tk_send_to_list_without_enc, #tk_send_to_simplelist, #tk_send_to_simplelist_with_enc, #tk_send_to_simplelist_without_enc, #tk_send_with_enc, #tk_send_without_enc, #to_eval

Methods included from TkConfigMethod

#[], #[]=, #cget, #config_hash_kv, #configinfo, #configure, #configure_cmd, #current_configinfo

Methods included from TkTreatFont

#font_configinfo, #font_configure, #font_copy, #kanjifont_configure, #kanjifont_copy, #latinfont_configure, #latinfont_copy

Methods inherited from TkKernel

new

Constructor Details

This class inherits a constructor from TkWindow

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TkObject

Class Method Details

.addBWidgetComboBox(name = None) ⇒ Object



698
699
700
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 698

def addBWidgetComboBox(name=None)
  Tk.tk_call('::tablelist::addBWidgetComboBox', name)
end

.addBWidgetEntry(name = None) ⇒ Object

with the BWidget package



690
691
692
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 690

def addBWidgetEntry(name=None)
  Tk.tk_call('::tablelist::addBWidgetEntry', name)
end

.addBWidgetSpinBox(name = None) ⇒ Object



694
695
696
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 694

def addBWidgetSpinBox(name=None)
  Tk.tk_call('::tablelist::addBWidgetSpinBox', name)
end

.addDateMentry(format, separator, gmt = false, name = None) ⇒ Object

with the multi-entry package Mentry is a library extension



740
741
742
743
744
745
746
747
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 740

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

.addFixedPointMentry(count1, count2, comma = false, name = None) ⇒ Object



758
759
760
761
762
763
764
765
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 758

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

.addIncrCombobox(name = None) ⇒ Object



727
728
729
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 727

def addIncrCombobox(name=None)
  Tk.tk_call('::tablelist::addIncrCombobox', name)
end

.addIncrDateTimeWidget(type, seconds = false, name = None) ⇒ Object



709
710
711
712
713
714
715
716
717
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 709

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) ⇒ Object

with the Iwidgets ([incr Widgets]) package



705
706
707
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 705

def addIncrEntryfield(name=None)
  Tk.tk_call('::tablelist::addIncrEntry', name)
end

.addIncrSpinint(name = None) ⇒ Object



723
724
725
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 723

def addIncrSpinint(name=None)
  Tk.tk_call('::tablelist::addIncrSpinint', name)
end

.addIncrSpinner(name = None) ⇒ Object



719
720
721
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 719

def addIncrSpinner(name=None)
  Tk.tk_call('::tablelist::addIncrSpinner', name)
end

.addIPAddrMentry(name = None) ⇒ Object



767
768
769
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 767

def addIPAddrMentry(name=None)
  Tk.tk_call('::tablelist::addIPAddrMentry', name)
end

.addOakleyCombobox(name = None) ⇒ Object

with Bryan Oakley’s combobox package



734
735
736
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 734

def addOakleyCombobox(name=None)
  Tk.tk_call('::tablelist::addOakleyCombobox', name)
end

.addTimeMentry(format, separator, gmt = false, name = None) ⇒ Object



749
750
751
752
753
754
755
756
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 749

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) ⇒ Object



683
684
685
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 683

def convEventFields(descendant, x, y)
  window(Tk.tk_call('::tablelist::convEventFields', descendant, x, y))
end

.getTablelistPath(descendant) ⇒ Object

helper commands



679
680
681
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 679

def getTablelistPath(descendant)
  window(Tk.tk_call('::tablelist::getTablelistPath', descendant))
end

.package_nameObject



19
20
21
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 19

def self.package_name
  PACKAGE_NAME
end

.package_versionObject



23
24
25
26
27
28
29
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 23

def self.package_version
  begin
    TkPackage.require(self.package_name)
  rescue
    ''
  end
end

.use_Tile?Boolean



31
32
33
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 31

def self.use_Tile?
  (Tk::Tcllib::Tablelist_usingTile)? true: false
end

Instance Method Details

#activate(index) ⇒ Object



231
232
233
234
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 231

def activate(index)
  tk_send('activate', _to_idx(index))
  self
end

#activate_cell(index) ⇒ Object Also known as: activatecell



236
237
238
239
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 236

def activate_cell(index)
  tk_send('activatecell', _to_idx(index))
  self
end

#bbox(index) ⇒ Object



259
260
261
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 259

def bbox(index)
  list(tk_send('bbox', _to_idx(index)))
end

#bodypathObject



263
264
265
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 263

def bodypath
  window(tk_send('bodypath'))
end

#bodytagObject



267
268
269
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 267

def bodytag
  TkBindTag.new_by_name(tk_send('bodytag'))
end

#cancel_editingObject Also known as: cancelediting



271
272
273
274
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 271

def cancel_editing 
  tk_send('cancelediting')
  self
end

#cellindex(idx) ⇒ Object



277
278
279
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 277

def cellindex(idx)
  _from_idx(tk_send('cellindex', _to_idx(idx)))
end

#cellselection_anchor(idx) ⇒ Object



281
282
283
284
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 281

def cellselection_anchor(idx)
  tk_send('cellselection', 'anchor', _to_idx(idx))
  self
end

#cellselection_clear(first, last = nil) ⇒ Object



286
287
288
289
290
291
292
293
294
295
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 286

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) ⇒ Object



297
298
299
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 297

def cellselection_includes(idx)
  bool(tk_send('cellselection', 'includes', _to_idx(idx)))
end

#cellselection_set(first, last = nil) ⇒ Object



301
302
303
304
305
306
307
308
309
310
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 301

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

#columncountObject



312
313
314
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 312

def columncount
  number(tk_send('columncount'))
end

#columnindex(idx) ⇒ Object



316
317
318
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 316

def columnindex(idx)
  number(tk_send('columnindex', _to_idx(idx)))
end

#containing(y) ⇒ Object



320
321
322
323
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 320

def containing(y)
  idx = num_or_str(tk_send('containing', y))
  (idx.kind_of?(Fixnum) && idx < 0)?  nil: idx
end

#containing_cell(x, y) ⇒ Object Also known as: containingcell



325
326
327
328
329
330
331
332
333
334
335
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 325

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

#containing_column(x) ⇒ Object Also known as: containingcolumn



338
339
340
341
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 338

def containing_column(x)
  idx = num_or_str(tk_send('containingcolumn', x))
  (idx.kind_of?(Fixnum) && idx < 0)?  nil: idx
end

#curcellselectionObject



344
345
346
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 344

def curcellselection
  simplelist(tk_send('curcellselection')).collect!{|idx| _from_idx(idx)}
end

#curselectionObject



348
349
350
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 348

def curselection
  list(tk_send('curselection'))
end

#delete_columns(first, last = nil) ⇒ Object Also known as: deletecolumns



365
366
367
368
369
370
371
372
373
374
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 365

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

#delete_items(first, last = nil) ⇒ Object Also known as: delete, deleteitems



352
353
354
355
356
357
358
359
360
361
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 352

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

#edit_cell(idx) ⇒ Object Also known as: editcell



377
378
379
380
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 377

def edit_cell(idx)
  tk_send('editcell', _to_idx(idx))
  self
end

#editwinpathObject



383
384
385
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 383

def editwinpath
  window(tk_send('editwinpath'))
end

#entrypathObject



387
388
389
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 387

def entrypath
  window(tk_send('entrypath'))
end

#fill_column(idx, txt) ⇒ Object Also known as: fillcolumn



391
392
393
394
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 391

def fill_column(idx, txt)
  tk_send('fillcolumn', _to_idx(idx), txt)
  self
end

#finish_editingObject Also known as: finishediting



397
398
399
400
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 397

def finish_editing
  tk_send('finishediting')
  self
end

#get(first, last = nil) ⇒ Object



403
404
405
406
407
408
409
410
411
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 403

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) ⇒ Object



242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 242

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_cells(first, last = nil) ⇒ Object Also known as: getcells



413
414
415
416
417
418
419
420
421
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 413

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

#get_columns(first, last = nil) ⇒ Object Also known as: getcolumns



424
425
426
427
428
429
430
431
432
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 424

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

#get_keys(first, last = nil) ⇒ Object Also known as: getkeys



435
436
437
438
439
440
441
442
443
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 435

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

#imagelabelpath(idx) ⇒ Object



446
447
448
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 446

def imagelabelpath(idx)
  window(tk_send('imagelabelpath', _to_idx(idx)))
end

#index(idx) ⇒ Object



450
451
452
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 450

def index(idx)
  number(tk_send('index', _to_idx(idx)))
end

#insert(idx, *items) ⇒ Object



454
455
456
457
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 454

def insert(idx, *items)
  tk_send('insert', _to_idx(idx), *items)
  self
end

#insert_columnlist(idx, columnlist) ⇒ Object Also known as: insertcolumnlist



459
460
461
462
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 459

def insert_columnlist(idx, columnlist)
  tk_send('insertcolumnlist', _to_idx(idx), columnlist)
  self
end

#insert_columns(idx, *args) ⇒ Object Also known as: insertcolumns



465
466
467
468
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 465

def insert_columns(idx, *args)
  tk_send('insertcolums', _to_idx(idx), *args)
  self
end

#insert_list(idx, list) ⇒ Object Also known as: insertlist



471
472
473
474
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 471

def insert_list(idx, list)
  tk_send('insertlist', _to_idx(idx), list)
  self
end

#itemlistvarObject



477
478
479
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 477

def itemlistvar
  TkVarAccess.new(tk_send('itemlistvar'))
end

#labelpath(idx) ⇒ Object



481
482
483
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 481

def labelpath(idx)
  window(tk_send('labelpath', _to_idx(idx)))
end

#labelsObject



485
486
487
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 485

def labels
  simplelist(tk_send('labels'))
end

#move(src, target) ⇒ Object



489
490
491
492
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 489

def move(src, target)
  tk_send('move', _to_idx(src), _to_idx(target))
  self
end

#move_column(src, target) ⇒ Object Also known as: movecolumn



494
495
496
497
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 494

def move_column(src, target)
  tk_send('movecolumn', _to_idx(src), _to_idx(target))
  self
end

#nearest(y) ⇒ Object



500
501
502
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 500

def nearest(y)
  _from_idx(tk_send('nearest', y))
end

#nearest_cell(x, y) ⇒ Object Also known as: nearestcell



504
505
506
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 504

def nearest_cell(x, y)
  _from_idx(tk_send('nearestcell', x, y))
end

#nearest_column(x) ⇒ Object Also known as: nearestcolumn



509
510
511
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 509

def nearest_column(x)
  _from_idx(tk_send('nearestcolumn', x))
end

#reject_inputObject Also known as: rejectinput



514
515
516
517
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 514

def reject_input
  tk_send('rejectinput')
  self
end

#reset_sortinfoObject Also known as: resetsortinfo



520
521
522
523
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 520

def reset_sortinfo
  tk_send('resetsortinfo')
  self
end

#scan_dragto(x, y) ⇒ Object



531
532
533
534
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 531

def scan_dragto(x, y)
  tk_send('scan', 'dragto', x, y)
  self
end

#scan_mark(x, y) ⇒ Object



526
527
528
529
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 526

def scan_mark(x, y)
  tk_send('scan', 'mark', x, y)
  self
end

#see(idx) ⇒ Object



536
537
538
539
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 536

def see(idx)
  tk_send('see', _to_idx(idx))
  self
end

#see_cell(idx) ⇒ Object Also known as: seecell



541
542
543
544
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 541

def see_cell(idx)
  tk_send('seecell', _to_idx(idx))
  self
end

#see_column(idx) ⇒ Object Also known as: seecolumn



547
548
549
550
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 547

def see_column(idx)
  tk_send('seecolumn', _to_idx(idx))
  self
end

#selection_anchor(idx) ⇒ Object



553
554
555
556
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 553

def selection_anchor(idx)
  tk_send('selection', 'anchor', _to_idx(idx))
  self
end

#selection_clear(first, last = nil) ⇒ Object



558
559
560
561
562
563
564
565
566
567
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 558

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) ⇒ Object



569
570
571
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 569

def selection_includes(idx)
  bool(tk_send('selection', 'includes', _to_idx(idx)))
end

#selection_set(first, last = nil) ⇒ Object



573
574
575
576
577
578
579
580
581
582
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 573

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) ⇒ Object



584
585
586
587
588
589
590
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 584

def separatorpath(idx=nil)
  if idx
    window(tk_send('separatorpath', _to_idx(idx)))
  else
    window(tk_send('separatorpath'))
  end
end

#separatorsObject



592
593
594
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 592

def separators
  simplelist(tk_send('separators')).collect!{|w| window(w)}
end

#set_attrib(*args) ⇒ Object



254
255
256
257
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 254

def set_attrib(*args)
  tk_send('attrib', *(args.flatten))
  self
end

#sizeObject



596
597
598
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 596

def size
  number(tk_send('size'))
end

#sort(order = nil) ⇒ Object



600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 600

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

#sort_by_column(idx, order = nil) ⇒ Object



626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 626

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) ⇒ Object



645
646
647
648
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 645

def sort_by_column_decreasing(idx)
  tk_send('sortbycolumn', _to_idx(idx), '-decreasing')
  self
end

#sort_by_column_increasing(idx) ⇒ Object



641
642
643
644
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 641

def sort_by_column_increasing(idx)
  tk_send('sortbycolumn', _to_idx(idx), '-increasing')
  self
end

#sort_decreasingObject



619
620
621
622
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 619

def sort_decreasing
  tk_send('sort', '-decreasing')
  self
end

#sort_increasingObject



615
616
617
618
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 615

def sort_increasing
  tk_send('sort', '-increasing')
  self
end

#sortcolumnObject



650
651
652
653
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 650

def sortcolumn
  idx = num_or_str(tk_send('sortcolum'))
  (idx.kind_of?(Fixnum) && idx < 0)?  nil: idx
end

#sortorderObject



655
656
657
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 655

def sortorder
  tk_send('sortorder')
end

#toggle_visibility(first, last = nil) ⇒ Object Also known as: togglevisibility



659
660
661
662
663
664
665
666
667
668
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 659

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

#windowpath(idx) ⇒ Object



671
672
673
# File 'lib/tkextlib/tcllib/tablelist_core.rb', line 671

def windowpath(idx)
  window(tk_send('windowpath', _to_idx(idx)))
end