Class: Glimmer::DSL::Opal::LayoutExpression

Inherits:
Expression
  • Object
show all
Includes:
ParentExpression
Defined in:
lib/glimmer/dsl/opal/layout_expression.rb

Instance Method Summary collapse

Instance Method Details

#can_interpret?(parent, keyword, *args, &block) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
# File 'lib/glimmer/dsl/opal/layout_expression.rb', line 11

def can_interpret?(parent, keyword, *args, &block)
  (parent.is_a?(Glimmer::SWT::CompositeProxy) or (parent.is_a?(Glimmer::UI::CustomWidget) and parent.body_root.is_a?(Glimmer::SWT::CompositeProxy))) and
    Glimmer::SWT::LayoutProxy.layout_exists?(keyword)
end

#interpret(parent, keyword, *args, &block) ⇒ Object



16
17
18
# File 'lib/glimmer/dsl/opal/layout_expression.rb', line 16

def interpret(parent, keyword, *args, &block)
  Glimmer::SWT::LayoutProxy.for(keyword, parent, args)
end