Sha256: 85107e970c1d69c4fc4ccc1841f43cf0341156a6f92e47ef60722d5a9f27b663
Contents?: true
Size: 838 Bytes
Versions: 13
Compression:
Stored size: 838 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 widget?(parent) 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
13 entries across 13 versions & 1 rubygems