Module: Glimmer::UI::CustomShell
Instance Attribute Summary
Attributes included from CustomWidget
#body_root, #options, #parent, #swt_style
Class Method Summary
collapse
Instance Method Summary
collapse
add_custom_widget_namespaces_for, #add_observer, #async_exec, #attribute_setter, #can_add_observer?, #can_handle_observation_request?, #content, custom_widget_namespaces, for, #get_attribute, #handle_observation_request, #has_attribute?, #has_instance_method?, #has_style?, #local_respond_to?, #method_missing, namespaces_for_class, #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
Class Method Details
.encoded_request_parameter_string ⇒ Object
44
45
46
|
# File 'lib/glimmer/ui/custom_shell.rb', line 44
def encoded_request_parameter_string
`document.location.href`.match(/\?(.*)$/).to_a[1].to_s
end
|
.included(klass) ⇒ Object
.request_parameter_string ⇒ Object
40
41
42
|
# File 'lib/glimmer/ui/custom_shell.rb', line 40
def request_parameter_string
URI.decode_www_form_component(`document.location.href`.match(/\?(.*)$/).to_a[1].to_s)
end
|
.requested? ⇒ Boolean
52
53
54
|
# File 'lib/glimmer/ui/custom_shell.rb', line 52
def requested?
request_parameter_string.include?('custom_shell=')
end
|
.requested_and_not_handled? ⇒ Boolean
48
49
50
|
# File 'lib/glimmer/ui/custom_shell.rb', line 48
def requested_and_not_handled?
requested? && !request_parameter_string.include?('custom_shell_handled=true')
end
|
Instance Method Details
#center ⇒ Object
85
86
87
|
# File 'lib/glimmer/ui/custom_shell.rb', line 85
def center
body_root.center
end
|
#close ⇒ Object
73
74
75
|
# File 'lib/glimmer/ui/custom_shell.rb', line 73
def close
body_root.close
end
|
#hide ⇒ Object
77
78
79
|
# File 'lib/glimmer/ui/custom_shell.rb', line 77
def hide
body_root.hide
end
|
#initialize(parent, args, options, &content) ⇒ Object
57
58
59
60
|
# File 'lib/glimmer/ui/custom_shell.rb', line 57
def initialize(parent, args, options, &content)
super(parent, args, options, &content)
raise Error, 'Invalid custom shell body root! Must be a shell or another custom shell.' unless body_root.is_a?(Glimmer::SWT::ShellProxy) || body_root.is_a?(Glimmer::UI::CustomShell) || body_root.is_a?(Glimmer::SWT::LatestShellProxy)
end
|
#open ⇒ Object
63
64
65
66
|
# File 'lib/glimmer/ui/custom_shell.rb', line 63
def open
body_root.open
end
|
#show ⇒ Object
DO NOT OVERRIDE. JUST AN ALIAS FOR ‘#open`. OVERRIDE `#open` INSTEAD.
69
70
71
|
# File 'lib/glimmer/ui/custom_shell.rb', line 69
def show
open
end
|
#start_event_loop ⇒ Object
89
90
91
|
# File 'lib/glimmer/ui/custom_shell.rb', line 89
def start_event_loop
body_root.start_event_loop
end
|
#visible? ⇒ Boolean
81
82
83
|
# File 'lib/glimmer/ui/custom_shell.rb', line 81
def visible?
body_root.visible?
end
|