Sha256: 6b0c8fc584f8b20143070e7d27bfffd9d8e91b7c33be5dbd868851590d44e7cb

Contents?: true

Size: 663 Bytes

Versions: 3

Compression:

Stored size: 663 Bytes

Contents

require File.dirname(__FILE__) + "/../command_handler"
require File.dirname(__FILE__) + "/models/g_widget"
require File.dirname(__FILE__) + "/models/g_layout_data"

module Glimmer
  class LayoutDataCommandHandler
    include CommandHandler

    include_package 'org.eclipse.swt.widgets'
    include_package 'org.eclipse.swt.layout'

    def can_handle?(parent, command_symbol, *args, &block)
      parent.is_a?(GWidget) and
        command_symbol.to_s == 'layout_data'
    end

    def do_handle(parent, command_symbol, *args, &block)
      Glimmer.logger.debug "Layout Data args are: #{args.inspect}"
      GLayoutData.new(parent.widget, args)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
glimmer-0.4.3 lib/glimmer/command_handlers/layout_data_command_handler.rb
glimmer-0.4.2 lib/glimmer/command_handlers/layout_data_command_handler.rb
glimmer-0.4.1 lib/glimmer/command_handlers/layout_data_command_handler.rb