class BWidgetTreePatched
Public Instance Methods
areabind(context, *args)
click to toggle source
# File lib/a-tkcommons.rb, line 15 def areabind(context, *args) if TkComm._callback_entry?(args[0]) || !block_given? cmd = args.shift else cmd = Proc.new end _bind_for_event_class(Event_for_Items, [path, 'bindArea'], context, cmd, *args) self end
areabind_append(context, *args)
click to toggle source
# File lib/a-tkcommons.rb, line 26 def areabind_append(context, *args) if TkComm._callback_entry?(args[0]) || !block_given? cmd = args.shift else cmd = Proc.new end _bind_append_for_event_class(Event_for_Items, [path, 'bindArea'], context, cmd, *args) self end
areabind_remove(*args)
click to toggle source
# File lib/a-tkcommons.rb, line 37 def areabind_remove(*args) _bind_remove_for_event_class(Event_for_Items, [path, 'bindArea'], *args) self end
areabindinfo(*args)
click to toggle source
# File lib/a-tkcommons.rb, line 42 def areabindinfo(*args) _bindinfo_for_event_class(Event_for_Items, [path, 'bindArea'], *args) end
open?(node)
click to toggle source
# File lib/a-tkcommons.rb, line 11 def open?(node) bool(self.itemcget(tagid(node), 'open')) end
selected()
click to toggle source
def selectcommand(_proc=nil)
self.configure('selectcommand'=>_proc)
end
# File lib/a-tkcommons.rb, line 50 def selected if self.selection_get[0] if self.selection_get[0].respond_to?(:length) && self.selection_get[0].length >0 _selected = "" if self.selection_get[0].instance_of?(Array) selection_lines = self.selection_get[0] else if String.method_defined?(:lines) selection_lines = self.selection_get[0].lines else selection_lines = self.selection_get[0].split("\n") end end selection_lines.each{|_block| _selected = _selected + _block.to_s + "\s" } _selected = _selected.strip else _selected = self.selection_get[0] end end return _selected end