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



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

def center
  body_root.center
end

#closeObject



25
26
27
# File 'lib/glimmer/ui/custom_shell.rb', line 25

def close
  body_root.close
end

#hideObject



29
30
31
# File 'lib/glimmer/ui/custom_shell.rb', line 29

def hide
  body_root.hide
end

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

Raises:

  • (Error)


9
10
11
12
13
# File 'lib/glimmer/ui/custom_shell.rb', line 9

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



16
17
18
# File 'lib/glimmer/ui/custom_shell.rb', line 16

def open
  body_root.open
end

#showObject

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



21
22
23
# File 'lib/glimmer/ui/custom_shell.rb', line 21

def show
  open
end

#start_event_loopObject



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

def start_event_loop
  body_root.start_event_loop
end

#visible?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/glimmer/ui/custom_shell.rb', line 33

def visible?
  body_root.visible?
end