class Opine::Dark::Window

Public Class Methods

new(options,&block) click to toggle source
Calls superclass method Opine::Native::Window::new
# File lib/opine/widgets/window_dark_osx.rb, line 91
def initialize(options,&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

Public Instance Methods

native_style() click to toggle source
# File lib/opine/widgets/window_dark_osx.rb, line 104
def native_style
  NSResizableWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask
end