Module: Glimmer::UI::CustomShell

Includes:
CustomWidget, SuperModule
Defined in:
lib/glimmer/ui/custom_shell.rb

Instance Attribute Summary

Attributes included from CustomWidget

#body_root, #options, #parent, #swt_style, #swt_widget

Instance Method Summary collapse

Methods included from CustomWidget

add_custom_widget_namespaces_for, #add_observer, after_body, #async_exec, #attribute_setter, before_body, body, #can_add_observer?, #can_handle_observation_request?, #content, custom_widget_namespaces, def_option_attr_accessors, for, #get_attribute, #handle_observation_request, #has_attribute?, #has_instance_method?, #has_style?, #local_respond_to?, #method_missing, namespaces_for_class, option, options, #post_initialize_child, reset_custom_widget_namespaces, #respond_to?, #set_attribute, #sync_exec

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Glimmer::UI::CustomWidget

Instance Method Details

#centerObject



58
59
60
# File 'lib/glimmer/ui/custom_shell.rb', line 58

def center
  body_root.center
end

#closeObject



46
47
48
# File 'lib/glimmer/ui/custom_shell.rb', line 46

def close
  body_root.close
end

#hideObject



50
51
52
# File 'lib/glimmer/ui/custom_shell.rb', line 50

def hide
  body_root.hide
end

#initialize(parent, *swt_constants, options, &content) ⇒ Object

Raises:

  • (Error)


30
31
32
33
34
# File 'lib/glimmer/ui/custom_shell.rb', line 30

def initialize(parent, *swt_constants, options, &content)
  super
  @swt_widget.set_data('custom_shell', self)
  raise Error, 'Invalid custom shell body root! Must be a shell or another custom shell.' unless body_root.swt_widget.is_a?(org.eclipse.swt.widgets.Shell)
end

#openObject

Classes may override



37
38
39
# File 'lib/glimmer/ui/custom_shell.rb', line 37

def open
  body_root.open
end

#showObject

DO NOT OVERRIDE. JUST AN ALIAS FOR ‘#open`. OVERRIDE `#open` INSTEAD.



42
43
44
# File 'lib/glimmer/ui/custom_shell.rb', line 42

def show
  open
end

#start_event_loopObject



62
63
64
# File 'lib/glimmer/ui/custom_shell.rb', line 62

def start_event_loop
  body_root.start_event_loop
end

#visible?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/glimmer/ui/custom_shell.rb', line 54

def visible?
  body_root.visible?
end