Class: Opine::Dark::Window
- Inherits:
-
Native::Window
- Object
- Widget
- Window
- Native::Window
- Opine::Dark::Window
- Defined in:
- lib/opine/widgets/window_dark_osx.rb
Defined Under Namespace
Classes: TitleView
Constant Summary
Constants inherited from Window
Instance Attribute Summary
Attributes inherited from Window
#content_view, #frame, #title, #window
Instance Method Summary collapse
-
#initialize(options, &block) ⇒ Window
constructor
A new instance of Window.
- #native_style ⇒ Object
Methods inherited from Native::Window
Methods inherited from Window
Constructor Details
#initialize(options, &block) ⇒ Window
Returns a new instance of Window.
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/opine/widgets/window_dark_osx.rb', line 91 def initialize(,&block) super do |win| win.window.setOpaque false win.window.setHasShadow true view = TitleView.alloc.initWithFrame NSRect.new(x: frame.x, y: frame.height-22, width: frame.width, height: 22) window.contentView.addSubview view view.setAutoresizingMask(NSViewWidthSizable | NSViewHeightSizable) instance_eval(&block) if block end end |
Instance Method Details
#native_style ⇒ Object
104 105 106 |
# File 'lib/opine/widgets/window_dark_osx.rb', line 104 def native_style NSResizableWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask end |