Class: Wx::SF::CanvasDropTarget
- Inherits:
-
DropTarget
- Object
- DropTarget
- Wx::SF::CanvasDropTarget
- Defined in:
- lib/wx/shapes/shape_canvas.rb
Overview
Auxiliary class encapsulating shape drop target.
Instance Method Summary collapse
-
#initialize(data, parent) ⇒ CanvasDropTarget
constructor
A new instance of CanvasDropTarget.
- #on_data(x, y, deflt) ⇒ Wx::DragResult
Constructor Details
#initialize(data, parent) ⇒ CanvasDropTarget
Returns a new instance of CanvasDropTarget.
20 21 22 23 |
# File 'lib/wx/shapes/shape_canvas.rb', line 20 def initialize(data, parent) super(data) @parent_canvas = parent end |
Instance Method Details
#on_data(x, y, deflt) ⇒ Wx::DragResult
29 30 31 32 33 34 |
# File 'lib/wx/shapes/shape_canvas.rb', line 29 def on_data(x, y, deflt) return Wx::DragResult::DragNone unless get_data @parent_canvas.__send__(:_on_drop, x, y, deflt, get_data_object) deflt end |