Class: Wx::SF::ShapePasteEvent
- Inherits:
-
Event
- Object
- Event
- Wx::SF::ShapePasteEvent
- Defined in:
- lib/wx/shapes/events.rb
Overview
Class encapsulates Wx::SF shape paste event.
Instance Method Summary collapse
-
#get_drop_target ⇒ Wx::SF::ShapeCanvas
(also: #drop_target)
Get drop target.
-
#get_pasted_shapes ⇒ Array<Wx::SF::Shape>
(also: #pasted_shapes)
Get list of pasted shapes.
-
#initialize(evt_type = Wx::EVT_NULL, target = nil, id = 0) ⇒ ShapePasteEvent
constructor
Constructor.
-
#set_drop_target(trg) ⇒ Object
(also: #drop_target=)
Set target (shape canvas) where shapes are pasted.
-
#set_pasted_shapes(shapes) ⇒ Object
(also: #pasted_shapes=)
Add given shapes to pasted shapes list.
Constructor Details
#initialize(evt_type = Wx::EVT_NULL, target = nil, id = 0) ⇒ ShapePasteEvent
Constructor
288 289 290 291 292 |
# File 'lib/wx/shapes/events.rb', line 288 def initialize(evt_type = Wx::EVT_NULL, target = nil, id = 0) super(evt_type, id.to_i) @pasted_shapes = [] @drop_target = target end |
Instance Method Details
#get_drop_target ⇒ Wx::SF::ShapeCanvas Also known as: drop_target
Get drop target
317 318 319 |
# File 'lib/wx/shapes/events.rb', line 317 def get_drop_target @drop_target end |
#get_pasted_shapes ⇒ Array<Wx::SF::Shape> Also known as: pasted_shapes
Get list of pasted shapes
303 304 305 |
# File 'lib/wx/shapes/events.rb', line 303 def get_pasted_shapes @pasted_shapes end |
#set_drop_target(trg) ⇒ Object Also known as: drop_target=
Set target (shape canvas) where shapes are pasted
310 311 312 |
# File 'lib/wx/shapes/events.rb', line 310 def set_drop_target(trg) @drop_target = trg end |
#set_pasted_shapes(shapes) ⇒ Object Also known as: pasted_shapes=
Add given shapes to pasted shapes list.
296 297 298 |
# File 'lib/wx/shapes/events.rb', line 296 def set_pasted_shapes(shapes) @pasted_shapes.concat(shapes) end |