Class: Wx::SF::ShapePasteEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/wx/shapes/events.rb

Overview

Class encapsulates Wx::SF shape paste event.

Instance Method Summary collapse

Constructor Details

#initialize(evt_type = Wx::EVT_NULL, target = nil, id = 0) ⇒ ShapePasteEvent

Constructor

Parameters:

  • evt_type (Integer) (defaults to: Wx::EVT_NULL)
  • target (Wx::SF::ShapeCanvas) (defaults to: nil)
  • id (Integer) (defaults to: 0)


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_targetWx::SF::ShapeCanvas Also known as: drop_target

Get drop target

Returns:



317
318
319
# File 'lib/wx/shapes/events.rb', line 317

def get_drop_target
  @drop_target
end

#get_pasted_shapesArray<Wx::SF::Shape> Also known as: pasted_shapes

Get list of pasted shapes

Returns:



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

Parameters:



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.

Parameters:



296
297
298
# File 'lib/wx/shapes/events.rb', line 296

def set_pasted_shapes(shapes)
  @pasted_shapes.concat(shapes)
end