Class: Tk::Tcllib::Tablelist

Inherits:
TkWindow show all
Includes:
Scrollable, TablelistItemConfig
Defined in:
ext/lib/tkextlib/tcllib/tablelist_core.rb,
ext/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, Checkbutton, CloneMenu, JAPANIZED_TK, LIBRARY_PATH, Labelframe, MenuButton, OptionMenuButton, PACKAGE_PATH, Panedwindow, RELEASE_DATE, Radiobutton, 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 Encoding

Encoding::BINARY, Encoding::BINARY_NAME, Encoding::DEFAULT_EXTERNAL_NAME, Encoding::DEFAULT_INTERNAL_NAME, Encoding::ENCODING_TABLE, Encoding::RubyEncoding, Encoding::UNKNOWN, Encoding::UTF8_NAME

Constants included from TkCore

TkCore::EventFlag, TkCore::INTERP, TkCore::INTERP_MUTEX, TkCore::INTERP_ROOT_CHECK, TkCore::INTERP_THREAD, TkCore::INTERP_THREAD_STATUS, TkCore::RUN_EVENTLOOP_ON_MAIN_THREAD, TkCore::WIDGET_DESTROY_HOOK, TkCore::WITH_ENCODING, TkCore::WITH_RUBY_VM

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_cget_strict, #cell_configinfo, #cell_configure, #column_cget, #column_cget_strict, #column_configinfo, #column_configure, #current_cell_configinfo, #current_column_configinfo, #current_row_configinfo, #row_cget, #row_cget_strict, #row_configinfo, #row_configure

Methods included from TkItemConfigMethod

__IGNORE_UNKNOWN_CONFIGURE_OPTION__, #__check_available_itemconfigure_options, #__current_itemconfiginfo, __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!, #current_itemconfiginfo, #itemcget, #itemcget_strict, #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

_widget_inspect_full_=, _widget_inspect_full_?, #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_anchor, #grid_bbox, #grid_column, #grid_columnconfig, #grid_columnconfiginfo, #grid_config, #grid_forget, #grid_in, #grid_info, #grid_location, #grid_propagate, #grid_remove, #grid_row, #grid_rowconfig, #grid_rowconfiginfo, #grid_size, #grid_slaves, #initialize, #inspect, #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, #Grid, #Pack, #Place, UTF8_String, __set_toplevel_aliases__, add_kinsoku, bell, bell_on_display, const_missing, current_grabs, cursor_display, default_widget_set, default_widget_set=, delete_kinsoku, destroy, 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, sleep, 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, wakeup

Methods included from Encoding

#default_encoding=, #encoding=, #encoding_convertfrom, #encoding_convertto, #encoding_dirs, #encoding_dirs=, #encoding_name, #encoding_names, #encoding_obj, #encoding_objs, #encoding_system=, #encoding_system_name, #encoding_system_obj, #force_default_encoding, #force_default_encoding=, #force_default_encoding?, #tk_encoding_names

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, #install_cmd, list, num_or_str, number, procedure, simplelist, string, #subst, tk_tcl2ruby, uninstall_cmd, #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

#[], #[]=, __IGNORE_UNKNOWN_CONFIGURE_OPTION__, #__check_available_configure_options, __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!, #cget, #cget_strict, #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



710
711
712
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 710

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

.addBWidgetEntry(name = None) ⇒ Object

with the BWidget package



702
703
704
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 702

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

.addBWidgetSpinBox(name = None) ⇒ Object



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

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



752
753
754
755
756
757
758
759
# File 'ext/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

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



770
771
772
773
774
775
776
777
# File 'ext/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

.addIncrCombobox(name = None) ⇒ Object



739
740
741
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 739

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

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



721
722
723
724
725
726
727
728
729
# File 'ext/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

.addIncrEntryfield(name = None) ⇒ Object

with the Iwidgets ([incr Widgets]) package



717
718
719
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 717

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

.addIncrSpinint(name = None) ⇒ Object



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

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

.addIncrSpinner(name = None) ⇒ Object



731
732
733
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 731

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

.addIPAddrMentry(name = None) ⇒ Object



779
780
781
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 779

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

.addOakleyCombobox(name = None) ⇒ Object

with Bryan Oakley’s combobox package



746
747
748
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 746

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

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



761
762
763
764
765
766
767
768
# File 'ext/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

.convEventFields(descendant, x, y) ⇒ Object



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

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

.getTablelistPath(descendant) ⇒ Object

helper commands



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

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

.package_nameObject



19
20
21
# File 'ext/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 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 23

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

.use_Tile?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'ext/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



243
244
245
246
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 243

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

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



248
249
250
251
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 248

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

#bbox(index) ⇒ Object



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

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

#bodypathObject



275
276
277
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 275

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

#bodytagObject



279
280
281
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 279

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

#cancel_editingObject Also known as: cancelediting



283
284
285
286
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 283

def cancel_editing 
  tk_send('cancelediting')
  self
end

#cellindex(idx) ⇒ Object



289
290
291
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 289

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

#cellselection_anchor(idx) ⇒ Object



293
294
295
296
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 293

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

#cellselection_clear(first, last = nil) ⇒ Object



298
299
300
301
302
303
304
305
306
307
# File 'ext/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

#cellselection_includes(idx) ⇒ Object



309
310
311
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 309

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

#cellselection_set(first, last = nil) ⇒ Object



313
314
315
316
317
318
319
320
321
322
# File 'ext/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

#columncountObject



324
325
326
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 324

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

#columnindex(idx) ⇒ Object



328
329
330
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 328

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

#containing(y) ⇒ Object



332
333
334
335
# File 'ext/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

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



337
338
339
340
341
342
343
344
345
346
347
# File 'ext/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

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



350
351
352
353
# File 'ext/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

#curcellselectionObject



356
357
358
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 356

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

#curselectionObject



360
361
362
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 360

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

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



377
378
379
380
381
382
383
384
385
386
# File 'ext/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

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



364
365
366
367
368
369
370
371
372
373
# File 'ext/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

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



389
390
391
392
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 389

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

#editwinpathObject



395
396
397
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 395

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

#entrypathObject



399
400
401
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 399

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

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



403
404
405
406
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 403

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

#finish_editingObject Also known as: finishediting



409
410
411
412
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 409

def finish_editing
  tk_send('finishediting')
  self
end

#get(first, last = nil) ⇒ Object



415
416
417
418
419
420
421
422
423
# File 'ext/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

#get_attrib(name = nil) ⇒ Object



254
255
256
257
258
259
260
261
262
263
264
265
# File 'ext/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

#get_cells(first, last = nil) ⇒ Object Also known as: getcells



425
426
427
428
429
430
431
432
433
# File 'ext/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

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



436
437
438
439
440
441
442
443
444
# File 'ext/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

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



447
448
449
450
451
452
453
454
455
# File 'ext/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

#imagelabelpath(idx) ⇒ Object



458
459
460
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 458

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

#index(idx) ⇒ Object



462
463
464
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 462

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

#insert(idx, *items) ⇒ Object



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

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

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



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

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

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



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

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

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



483
484
485
486
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 483

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

#itemlistvarObject



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

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

#labelpath(idx) ⇒ Object



493
494
495
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 493

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

#labelsObject



497
498
499
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 497

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

#move(src, target) ⇒ Object



501
502
503
504
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 501

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

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



506
507
508
509
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 506

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

#nearest(y) ⇒ Object



512
513
514
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 512

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

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



516
517
518
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 516

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

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



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

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

#reject_inputObject Also known as: rejectinput



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

def reject_input
  tk_send('rejectinput')
  self
end

#reset_sortinfoObject Also known as: resetsortinfo



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

def reset_sortinfo
  tk_send('resetsortinfo')
  self
end

#scan_dragto(x, y) ⇒ Object



543
544
545
546
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 543

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

#scan_mark(x, y) ⇒ Object



538
539
540
541
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 538

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

#see(idx) ⇒ Object



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

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

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



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

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

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



559
560
561
562
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 559

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

#selection_anchor(idx) ⇒ Object



565
566
567
568
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 565

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

#selection_clear(first, last = nil) ⇒ Object



570
571
572
573
574
575
576
577
578
579
# File 'ext/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

#selection_includes(idx) ⇒ Object



581
582
583
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 581

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

#selection_set(first, last = nil) ⇒ Object



585
586
587
588
589
590
591
592
593
594
# File 'ext/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

#separatorpath(idx = nil) ⇒ Object



596
597
598
599
600
601
602
# File 'ext/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

#separatorsObject



604
605
606
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 604

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

#set_attrib(*args) ⇒ Object



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

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

#sizeObject



608
609
610
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 608

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

#sort(order = nil) ⇒ Object



612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
# File 'ext/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

#sort_by_column(idx, order = nil) ⇒ Object



638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
# File 'ext/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

#sort_by_column_decreasing(idx) ⇒ Object



657
658
659
660
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 657

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

#sort_by_column_increasing(idx) ⇒ Object



653
654
655
656
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 653

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

#sort_decreasingObject



631
632
633
634
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 631

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

#sort_increasingObject



627
628
629
630
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 627

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

#sortcolumnObject



662
663
664
665
# File 'ext/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

#sortorderObject



667
668
669
# File 'ext/lib/tkextlib/tcllib/tablelist_core.rb', line 667

def sortorder
  tk_send('sortorder')
end

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



671
672
673
674
675
676
677
678
679
680
# File 'ext/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

#windowpath(idx) ⇒ Object



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

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