module Alexandria::TreeViewOverrides
Constants
- Context
Public Instance Methods
drag_context()
click to toggle source
# File lib/alexandria/ui/multi_drag_treeview.rb, line 58 def drag_context @context.drag_context end
enable_model_drag_source(start_button_mask, targets, actions)
click to toggle source
Calls superclass method
# File lib/alexandria/ui/multi_drag_treeview.rb, line 44 def enable_model_drag_source(start_button_mask, targets, actions) super @context = Context.new @context.source_start_button_mask = start_button_mask @context.source_targets = Gtk::TargetList.new(targets) @context.source_actions = actions @context.button_press_handler = signal_connect("button_press_event") do |_widget, event, _data| button_press_event(event) end end
Private Instance Methods
motion_notify_event(event)
click to toggle source
# File lib/alexandria/ui/multi_drag_treeview.rb, line 79 def motion_notify_event(event) if drag_check_threshold(@context.x, @context.y, event.x, event.y) stop_drag_check paths = [] selection.each { |_model, path, _iter| paths << path } @context.drag_context = drag_begin(@context.source_targets, @context.source_actions, @context.pressed_button, event) end true end
stop_drag_check()
click to toggle source
# File lib/alexandria/ui/multi_drag_treeview.rb, line 64 def stop_drag_check raise if @context.nil? @context.events.clear @context.pending_event = false signal_handler_disconnect(@context.motion_notify_handler) signal_handler_disconnect(@context.button_release_handler) end