Class: Fox::Canvas::SingleSelectionPolicy

Inherits:
SelectionPolicy show all
Defined in:
lib/fox16/canvas.rb

Overview

Single shape selected at one time

Instance Method Summary collapse

Methods inherited from SelectionPolicy

#deselectShape

Constructor Details

#initialize(canvas) ⇒ SingleSelectionPolicy

Returns a new instance of SingleSelectionPolicy.



364
365
366
# File 'lib/fox16/canvas.rb', line 364

def initialize(canvas)
  super
end

Instance Method Details

#selectShape(shape, notify) ⇒ Object



368
369
370
371
372
373
# File 'lib/fox16/canvas.rb', line 368

def selectShape(shape, notify)
  unless shape.selected?
    @canvas.killSelection(notify)
  end
  super
end