Sha256: ef00cccbeea28d0e2f7374089a93738fbc4dc83c4fd6ff1ccbd00cb7b1878198

Contents?: true

Size: 894 Bytes

Versions: 8

Compression:

Stored size: 894 Bytes

Contents

require 'glimmer/error'

module Glimmer
  module UI
    module CustomShell
      include SuperModule
      include Glimmer::UI::CustomWidget

      def initialize(parent, *swt_constants, options, &content)
        super
        raise Error, 'Invalid custom shell body root! Must be a shell or another custom shell.' unless body_root.is_a?(SWT::ShellProxy) || body_root.is_a?(CustomShell)
      end

      # Classes may override
      def open
        body_root.open
      end

      # DO NOT OVERRIDE. JUST AN ALIAS FOR `#open`. OVERRIDE `#open` INSTEAD.
      def show
        open
      end

      def close
        body_root.close
      end

      def hide
        body_root.hide
      end

      def visible?
        body_root.visible?
      end

      def center
        body_root.center
      end

      def start_event_loop
        body_root.start_event_loop
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
glimmer-0.5.8 lib/glimmer/ui/custom_shell.rb
glimmer-0.5.7 lib/glimmer/ui/custom_shell.rb
glimmer-0.5.6 lib/glimmer/ui/custom_shell.rb
glimmer-0.5.5 lib/glimmer/ui/custom_shell.rb
glimmer-0.5.4 lib/glimmer/ui/custom_shell.rb
glimmer-0.5.3 lib/glimmer/ui/custom_shell.rb
glimmer-0.5.2 lib/glimmer/ui/custom_shell.rb
glimmer-0.5.0 lib/glimmer/ui/custom_shell.rb