Sha256: ff32f3f4b12b304eb048b31c8be2129129996b98ff3469a08d46927b54cc7bb7
Contents?: true
Size: 854 Bytes
Versions: 30
Compression:
Stored size: 854 Bytes
Contents
require 'glimmer' require 'glimmer/dsl/static_expression' require 'glimmer/dsl/parent_expression' require 'glimmer/swt/menu_proxy' module Glimmer module DSL module SWT class MenuExpression < StaticExpression include ParentExpression include_package 'org.eclipse.swt.widgets' def can_interpret?(parent, keyword, *args, &block) initial_condition = (keyword == 'menu') if initial_condition if parent.respond_to?(:swt_widget) return true else raise Glimmer::Error, "menu may only be nested under a widget (like shell or another menu)!" end end false end def interpret(parent, keyword, *args, &block) Glimmer::SWT::MenuProxy.new(parent, args) end end end end end
Version data entries
30 entries across 30 versions & 1 rubygems