class Fox::Canvas::SelectionPolicy
Base class for canvas selection policies
Public Class Methods
new(canvas)
click to toggle source
# File lib/fox16/canvas.rb, line 306 def initialize(canvas) @canvas = canvas end
Public Instance Methods
deselectShape(shape, notify)
click to toggle source
# File lib/fox16/canvas.rb, line 320 def deselectShape(shape, notify) if shape.selected? shape.deselect @canvas.updateShape(shape) if notify && (@canvas.target != nil) @canvas.target.handle(@canvas, Fox.MKUINT(@canvas.message, SEL_DESELECTED), shape) end end end
selectShape(shape, notify)
click to toggle source
# File lib/fox16/canvas.rb, line 310 def selectShape(shape, notify) unless shape.selected? shape.select @canvas.updateShape(shape) if notify && (@canvas.target != nil) @canvas.target.handle(@canvas, Fox.MKUINT(@canvas.message, SEL_SELECTED), shape) end end end