Sha256: 7bf6e360c1c31b5b38753ded74a9276c11eb6ef7f2ae5849edaa1ef35d4e0ed5

Contents?: true

Size: 706 Bytes

Versions: 3

Compression:

Stored size: 706 Bytes

Contents

require File.dirname(__FILE__) + "/../../command_handler"
require File.dirname(__FILE__) + "/../g_shell"
require File.dirname(__FILE__) + "/../g_tab_item_composite"

module Glimmer
  module SWT
    module CommandHandlers
      class TabItemCommandHandler
        include CommandHandler
        include Glimmer

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

        def do_handle(parent, command_symbol, *args, &block)
          tab_item = GWidget.new(command_symbol.to_s, parent.widget, args)
          GTabItemComposite.new(tab_item, parent.widget, args)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
glimmer-0.4.6 lib/glimmer/swt/command_handlers/tab_item_command_handler.rb
glimmer-0.4.5 lib/glimmer/swt/command_handlers/tab_item_command_handler.rb
glimmer-0.4.4 lib/glimmer/swt/command_handlers/tab_item_command_handler.rb