Sha256: e0e2a5d1796fa91a3e3e94ca9bcbe118e01394f2ebd6761564dc74e659680bce

Contents?: true

Size: 680 Bytes

Versions: 6

Compression:

Stored size: 680 Bytes

Contents

Shoes.app(width: 200, height: 200) do
   @img1 = image "#{DIR}/static/shoes-icon-walkabout.png", left: 0, top: 0, width: 200, height: 200
   @img2 = image "#{DIR}/static/shoes-icon-blue.png", left: 50, top: 50, width: 100, height: 100
   event do |evt|
    case evt.type
    when :click 
      $stderr.puts "click handler called: #{evt.type} #{evt.button}, #{evt.x} #{evt.y} #{evt.modifiers}"
      if evt.object 
        # Note: for Textblocks the evt.obj is the String of the text block
        $stderr.puts "  non-native widget: #{evt.object.class} width #{evt.width} height #{evt.height}"
      end
      evt.accept = true
    else
      evt.accept = false
    end
   end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
scarpe-0.4.0 examples/legacy/not_checked/shoes3-tests/events/event5.rb
scarpe-0.3.0 examples/legacy/not_checked/shoes3-tests/events/event5.rb
scarpe-0.2.2 examples/legacy/not_checked/shoes3-tests/events/event5.rb
lacci-0.2.1 examples/legacy/not_checked/shoes3-tests/events/event5.rb
scarpe-0.2.1 examples/legacy/not_checked/shoes3-tests/events/event5.rb
scarpe-0.2.0 examples/legacy/not_checked/shoes3-tests/events/event5.rb