Module: Glimmer::LibUI::CustomWindow
- Includes:
- CustomControl, SuperModule
- Defined in:
- lib/glimmer/libui/custom_window.rb
Instance Attribute Summary
Attributes included from CustomControl
#args, #body_root, #content, #keyword, #libui, #options, #parent, #parent_proxy
Class Method Summary collapse
Instance Method Summary collapse
-
#destroy ⇒ Object
TODO consider using Forwardable instead.
- #destroying? ⇒ Boolean
- #initialize(parent, *swt_constants, options, &content) ⇒ Object
-
#show ⇒ Object
Classes may override.
Methods included from CustomControl
add_custom_control_namespaces_for, after_body, before_body, body, #can_handle_listener?, custom_control_namespaces, def_option_attr_accessors, flyweight_custom_control_classes, for, #handle_listener, #has_instance_method?, keyword, #method_missing, namespaces_for_class, #observer_registrations, option, options, #post_add_content, #post_initialize_child, reset_custom_control_namespaces, #respond_to?, shortcut_keyword
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Glimmer::LibUI::CustomControl
Class Method Details
.launch(*args, &content) ⇒ Object
33 34 35 36 37 |
# File 'lib/glimmer/libui/custom_window.rb', line 33 def launch(*args, &content) @@launched_custom_window = send(keyword, *args, &content) @@launched_custom_window.show @@launched_custom_window end |
.launched_application ⇒ Object
43 44 45 |
# File 'lib/glimmer/libui/custom_window.rb', line 43 def launched_application launched_custom_window end |
.launched_custom_window ⇒ Object
39 40 41 |
# File 'lib/glimmer/libui/custom_window.rb', line 39 def launched_custom_window @@launched_custom_window if defined?(@@launched_custom_window) end |
Instance Method Details
#destroy ⇒ Object
TODO consider using Forwardable instead
63 64 65 |
# File 'lib/glimmer/libui/custom_window.rb', line 63 def destroy body_root.destroy end |
#destroying? ⇒ Boolean
67 68 69 |
# File 'lib/glimmer/libui/custom_window.rb', line 67 def body_root. end |
#initialize(parent, *swt_constants, options, &content) ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/glimmer/libui/custom_window.rb', line 48 def initialize(parent, *swt_constants, , &content) original_logger = Glimmer::Config.logger require 'stringio' Glimmer::Config.logger = Logger.new(StringIO.new) super Glimmer::Config.logger = original_logger raise Glimmer::Error, 'Invalid custom window body root! Must be a window, another custom window, or a custom control with window as its body root!' unless body_root.is_a?(Glimmer::LibUI::ControlProxy::WindowProxy) || body_root.is_a?(Glimmer::LibUI::CustomWindow) || (body_root.is_a?(Glimmer::LibUI::CustomControl) && body_root.body_root.is_a?(Glimmer::LibUI::ControlProxy::WindowProxy)) end |
#show ⇒ Object
Classes may override
58 59 60 |
# File 'lib/glimmer/libui/custom_window.rb', line 58 def show body_root.show end |