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


333
334
335
# File 'lib/fox16/canvas.rb', line 333

def initialize(canvas)
  super
end

Instance Method Details

#selectShape(shape, notify) ⇒ Object


337
338
339
340
341
342
# File 'lib/fox16/canvas.rb', line 337

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