Sha256: 00a7a30be3126a1e91609280899073c6cf407ef164084bcbaf026d52cb5f686f

Contents?: true

Size: 576 Bytes

Versions: 4

Compression:

Stored size: 576 Bytes

Contents

# frozen_string_literal: true
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

4 entries across 4 versions & 1 rubygems

Version Path
shoes-swt-4.0.0.pre12 lib/shoes/swt/button.rb
shoes-swt-4.0.0.pre11 lib/shoes/swt/button.rb
shoes-swt-4.0.0.pre10 lib/shoes/swt/button.rb
shoes-swt-4.0.0.pre9 lib/shoes/swt/button.rb