Sha256: 852686f4206312df4ecfaa71cc9c8a9c303203f5291bb3d7f34f4f0e508bcf85

Contents?: true

Size: 546 Bytes

Versions: 3

Compression:

Stored size: 546 Bytes

Contents

class Shoes
  module Swt
    class Button < SwtButton
      # Create a button
      #
      # @param [Shoes::Button] dsl The Shoes DSL button this represents
      # @param [::Swt::Widgets::Composite] parent The parent element of this button
      # @param [Proc] blk The block of code to call when this button is activated
      def initialize(dsl, app)
        super(dsl, app, ::Swt::SWT::PUSH) do |button|
          button.set_text @dsl.text
        end
      end

      def text=(value)
        @real.text = value
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shoes-swt-4.0.0.pre8 lib/shoes/swt/button.rb
shoes-swt-4.0.0.pre7 lib/shoes/swt/button.rb
shoes-swt-4.0.0.pre6 lib/shoes/swt/button.rb