Module: VR::Droppable

Defined in:
lib/DragDrop.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dragged_widgetObject

Returns the value of attribute dragged_widget.



26
27
28
# File 'lib/DragDrop.rb', line 26

def dragged_widget
  @dragged_widget
end

#source_widgetsObject

Returns the value of attribute source_widgets.



26
27
28
# File 'lib/DragDrop.rb', line 26

def source_widgets
  @source_widgets
end

Instance Method Details

#add_source_widget(widget) ⇒ Object



31
32
33
34
35
36
37
38
39
# File 'lib/DragDrop.rb', line 31

def add_source_widget(widget)
  @source_widgets ||= []
  @source_widgets << [widget.object_id.to_s, :same_app, 12_345]
 drag_dest_set(Gtk::DestDefaults::MOTION |
              Gtk::DestDefaults::HIGHLIGHT,
              @source_widgets,
              Gdk::DragAction::COPY |
              Gdk::DragAction::MOVE)
end