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 |
# File 'lib/glimmer/libui/custom_window.rb', line 33 def launch(*args, &content) launched_custom_shell = send(keyword, *args, &content) launched_custom_shell.show end |
Instance Method Details
#destroy ⇒ Object
TODO consider using Forwardable instead
54 55 56 |
# File 'lib/glimmer/libui/custom_window.rb', line 54 def destroy body_root.destroy end |
#destroying? ⇒ Boolean
58 59 60 |
# File 'lib/glimmer/libui/custom_window.rb', line 58 def body_root. end |
#initialize(parent, *swt_constants, options, &content) ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/glimmer/libui/custom_window.rb', line 39 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
49 50 51 |
# File 'lib/glimmer/libui/custom_window.rb', line 49 def show body_root.show end |