Sha256: 0ce4ffee60617fc6e61d38299ea25c3da1e0f40a22f0a4d9d4edd7b4d1b6b9c0

Contents?: true

Size: 879 Bytes

Versions: 1

Compression:

Stored size: 879 Bytes

Contents

require 'super_module'

module Glimmer
  module SWT
    module CustomShell
      include SuperModule
      include Glimmer::SWT::CustomWidget

      def initialize(parent, *swt_constants, options, &content)
        super
        raise 'Invalid custom shell body root! Must be a shell or another custom shell.' unless body_root.is_a?(GShell) || 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

1 entries across 1 versions & 1 rubygems

Version Path
glimmer-0.4.9 lib/glimmer/swt/custom_shell.rb