add(keys={})
click to toggle source
def add(keys={})
window(tk_call(@path, 'add', *hash_kv(keys)))
end
child_site(idx)
click to toggle source
def child_site(idx)
if (new_idx = self.index(idx)) < 0
new_idx = tagid(idx)
end
window(tk_call(@path, 'childsite', new_idx))
end
child_site_list()
click to toggle source
def child_site_list
list(tk_call(@path, 'childsite'))
end
delete(idx1, idx2=nil)
click to toggle source
def delete(idx1, idx2=nil)
if (new_idx1 = self.index(idx1)) < 0
new_idx1 = tagid(idx1)
end
if idx2
if (new_idx2 = self.index(idx2)) < 0
new_idx2 = tagid(idx2)
end
tk_call(@path, 'delete', new_idx1, new_idx2)
else
tk_call(@path, 'delete', new_idx1)
end
self
end
index(idx)
click to toggle source
def index(idx)
number(tk_call(@path, 'index', tagid(idx)))
end
insert(idx, keys={})
click to toggle source
def insert(idx, keys={})
if (new_idx = self.index(idx)) < 0
new_idx = tagid(idx)
end
window(tk_call(@path, 'insert', new_idx, *hash_kv(keys)))
end
next()
click to toggle source
def next
tk_call(@path, 'next')
self
end
prev()
click to toggle source
def prev
tk_call(@path, 'prev')
self
end
select(idx)
click to toggle source
def select(idx)
if (new_idx = self.index(idx)) < 0
new_idx = tagid(idx)
end
tk_call(@path, 'select', new_idx)
self
end
tagid(tagOrId)
click to toggle source
def tagid(tagOrId)
if tagOrId.kind_of?(Tk::Itk::Component)
tagOrId.name
else
tagOrId
end
end
view(*idxs)
click to toggle source
def view(*idxs)
if idxs.size == 0
idx = num_or_str(tk_send_without_enc('view'))
if idx.kind_of?(Fixnum) && idx < 0
nil
else
idx
end
else
tk_send_without_enc('view', *idxs)
self
end
end
view_moveto(*idxs)
click to toggle source
def view_moveto(*idxs)
view('moveto', *idxs)
end
xview(*idxs)
click to toggle source
xview_moveto(*idxs)
click to toggle source
yview(*idxs)
click to toggle source
yview_moveto(*idxs)
click to toggle source