Class: Tk::Iwidgets::Hierarchy (Ruby 2.3.4)

In Files

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

Class/Module Index [+]

Quicksearch

Tk::Iwidgets::Hierarchy

Public Instance Methods

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

based on Tk::Text widget

 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 269
def bbox(index)
  list(tk_send_without_enc('bbox', _get_eval_enc_str(index)))
end
            
clear()
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 176
def clear
  tk_call(@path, 'clear')
  self
end
            
collapse(node)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 181
def collapse(node)
  tk_call(@path, 'collapse')
  self
end
            
compare(idx1, op, idx2)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 273
def compare(idx1, op, idx2)
  bool(tk_send_without_enc('compare', _get_eval_enc_str(idx1),
                           op, _get_eval_enc_str(idx2)))
end
            
current()
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 186
def current
  tk_call(@path, 'current')
end
            
debug()
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 278
def debug
  bool(tk_send_without_enc('debug'))
end
            
debug=(boolean)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 281
def debug=(boolean)
  tk_send_without_enc('debug', boolean)
  #self
  boolean
end
            
delete(first, last=None)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 287
def delete(first, last=None)
  tk_send_without_enc('delete', first, last)
  self
end
            
dlineinfo(index)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 292
def dlineinfo(index)
  list(tk_send_without_enc('dlineinfo', _get_eval_enc_str(index)))
end
            
draw(mode=None)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 190
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()
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 214
def exp_state
  list(tk_call(@path, 'expState'))
end
            
Also aliased as: expand_state, expanded_list
expand(node)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 205
def expand(node)
  tk_call(@path, 'expand', node)
  self
end
            
expand_state()
Alias for: exp_state
expanded?(node)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 210
def expanded?(node)
  bool(tk_call(@path, 'expanded', node))
end
            
expanded_list()
Alias for: exp_state
get(*index)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 296
def get(*index)
  _fromUTF8(tk_send_without_enc('get', *index))
end
            
index(index)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 300
def index(index)
  tk_send_without_enc('index', _get_eval_enc_str(index))
end
            
insert(index, chars, *tags)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 304
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)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 224
def mark_add(*nodes)
  tk_call(@path, 'mark', 'add', *nodes)
  self
end
            
mark_clear()
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 220
def mark_clear
  tk_call(@path, 'mark', 'clear')
  self
end
            
mark_get()
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 232
def mark_get
  list(tk_call(@path, 'mark', 'get'))
end
            
mark_remove(*nodes)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 228
def mark_remove(*nodes)
  tk_call(@path, 'mark', 'remove', *nodes)
  self
end
            
prune(node)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 241
def prune(node)
  tk_call(@path, 'prune', node)
  self
end
            
refresh(node)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 236
def refresh(node)
  tk_call(@path, 'refresh', node)
  self
end
            
scan_dragto(x, y)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 327
def scan_dragto(x, y)
  tk_send_without_enc('scan', 'dragto', x, y)
  self
end
            
scan_mark(x, y)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 323
def scan_mark(x, y)
  tk_send_without_enc('scan', 'mark', x, y)
  self
end
            
see(index)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 331
def see(index)
  tk_send_without_enc('see', index)
  self
end
            
selection_add(*nodes)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 250
def selection_add(*nodes)
  tk_call(@path, 'selection', 'add', *nodes)
  self
end
            
selection_clear()
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 246
def selection_clear
  tk_call(@path, 'selection', 'clear')
  self
end
            
selection_get()
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 258
def selection_get
  list(tk_call(@path, 'selection', 'get'))
end
            
selection_remove(*nodes)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 254
def selection_remove(*nodes)
  tk_call(@path, 'selection', 'remove', *nodes)
  self
end
            
toggle(node)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 262
def toggle(node)
  tk_call(@path, 'toggle', node)
  self
end
            
xview(*index)

based on tk/scrollable.rb

 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 337
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)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 345
def xview_moveto(*index)
  xview('moveto', *index)
end
            
xview_scroll(*index)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 348
def xview_scroll(*index)
  xview('scroll', *index)
end
            
yview(*index)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 352
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)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 360
def yview_moveto(*index)
  yview('moveto', *index)
end
            
yview_scroll(*index)
 
               # File tk/lib/tkextlib/iwidgets/hierarchy.rb, line 363
def yview_scroll(*index)
  yview('scroll', *index)
end