Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more

In Files

  • tk/lib/tkextlib/iwidgets/hierarchy.rb

Class/Module Index [+]

Quicksearch

Tk::Iwidgets::Hierarchy

Public Instance Methods

__validation_class_list() click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 150
def __validation_class_list
  super() << QueryCommand << IndicatorCommand << IconCommand
end
            
bbox(index) click to toggle source

based on Tk::Text widget

 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 268
def bbox(index)
  list(tk_send_without_enc('bbox', _get_eval_enc_str(index)))
end
            
clear() click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 175
def clear
  tk_call(@path, 'clear')
  self
end
            
collapse(node) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 180
def collapse(node)
  tk_call(@path, 'collapse')
  self
end
            
compare(idx1, op, idx2) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 272
def compare(idx1, op, idx2)
  bool(tk_send_without_enc('compare', _get_eval_enc_str(idx1),
                           op, _get_eval_enc_str(idx2)))
end
            
current() click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 185
def current
  tk_call(@path, 'current')
end
            
debug() click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 277
def debug
  bool(tk_send_without_enc('debug'))
end
            
debug=(boolean) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 280
def debug=(boolean)
  tk_send_without_enc('debug', boolean)
  #self
  boolean
end
            
delete(first, last=None) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 286
def delete(first, last=None)
  tk_send_without_enc('delete', first, last)
  self
end
            
dlineinfo(index) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 291
def dlineinfo(index)
  list(tk_send_without_enc('dlineinfo', _get_eval_enc_str(index)))
end
            
draw(mode=None) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 189
def draw(mode=None)
  case mode
  when None
    # do nothing
  when 'now', :now
    mode = '-now'
  when 'eventually', :eventually
    mode = '-eventually'
  when String, Symbol
    mode = mode.to_s
    mode = '-' << mode if mode[0] != ?-
  end
  tk_call(@path, 'draw', mode)
end
            
exp_state() click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 213
def exp_state
  list(tk_call(@path, 'expState'))
end
            
Also aliased as: expand_state, expanded_list
expand(node) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 204
def expand(node)
  tk_call(@path, 'expand', node)
  self
end
            
expand_state() click to toggle source
Alias for: exp_state
expanded?(node) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 209
def expanded?(node)
  bool(tk_call(@path, 'expanded', node))
end
            
expanded_list() click to toggle source
Alias for: exp_state
get(*index) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 295
def get(*index)
  _fromUTF8(tk_send_without_enc('get', *index))
end
            
index(index) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 299
def index(index)
  tk_send_without_enc('index', _get_eval_enc_str(index))
end
            
insert(index, chars, *tags) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 303
def insert(index, chars, *tags)
  if tags[0].kind_of? Array
    # multiple chars-taglist argument :: str, [tag,...], str, [tag,...], ...
    args = [chars]
    while tags.size > 0
      args << tags.shift.collect{|x|_get_eval_string(x)}.join(' ')  # taglist
      args << tags.shift if tags.size > 0                           # chars
    end
    super(index, *args)
  else
    # single chars-taglist argument :: str, tag, tag, ...
    if tags.size == 0
      super(index, chars)
    else
      super(index, chars, tags.collect{|x|_get_eval_string(x)}.join(' '))
    end
  end
end
            
mark_add(*nodes) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 223
def mark_add(*nodes)
  tk_call(@path, 'mark', 'add', *nodes)
  self
end
            
mark_clear() click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 219
def mark_clear
  tk_call(@path, 'mark', 'clear')
  self
end
            
mark_get() click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 231
def mark_get
  list(tk_call(@path, 'mark', 'get'))
end
            
mark_remove(*nodes) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 227
def mark_remove(*nodes)
  tk_call(@path, 'mark', 'remove', *nodes)
  self
end
            
prune(node) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 240
def prune(node)
  tk_call(@path, 'prune', node)
  self
end
            
refresh(node) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 235
def refresh(node)
  tk_call(@path, 'refresh', node)
  self
end
            
scan_dragto(x, y) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 326
def scan_dragto(x, y)
  tk_send_without_enc('scan', 'dragto', x, y)
  self
end
            
scan_mark(x, y) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 322
def scan_mark(x, y)
  tk_send_without_enc('scan', 'mark', x, y)
  self
end
            
see(index) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 330
def see(index)
  tk_send_without_enc('see', index)
  self
end
            
selection_add(*nodes) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 249
def selection_add(*nodes)
  tk_call(@path, 'selection', 'add', *nodes)
  self
end
            
selection_clear() click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 245
def selection_clear
  tk_call(@path, 'selection', 'clear')
  self
end
            
selection_get() click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 257
def selection_get
  list(tk_call(@path, 'selection', 'get'))
end
            
selection_remove(*nodes) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 253
def selection_remove(*nodes)
  tk_call(@path, 'selection', 'remove', *nodes)
  self
end
            
toggle(node) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 261
def toggle(node)
  tk_call(@path, 'toggle', node)
  self
end
            
xview(*index) click to toggle source

based on tk/scrollable.rb

 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 336
def xview(*index)
  if index.size == 0
    list(tk_send_without_enc('xview'))
  else
    tk_send_without_enc('xview', *index)
    self
  end
end
            
xview_moveto(*index) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 344
def xview_moveto(*index)
  xview('moveto', *index)
end
            
xview_scroll(*index) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 347
def xview_scroll(*index)
  xview('scroll', *index)
end
            
yview(*index) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 351
def yview(*index)
  if index.size == 0
    list(tk_send_without_enc('yview'))
  else
    tk_send_without_enc('yview', *index)
    self
  end
end
            
yview_moveto(*index) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 359
def yview_moveto(*index)
  yview('moveto', *index)
end
            
yview_scroll(*index) click to toggle source
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 362
def yview_scroll(*index)
  yview('scroll', *index)
end