Class: TeacupWindowController

Inherits:
NSWindowController show all
Defined in:
lib/teacup-osx/core_extensions/ns_window_controller.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from NSWindowController

#top_level_view, #windowDidLoad

Methods included from Teacup::Controller

included, #layoutDidLoad, #stylesheet=, #teacupDidLoad

Methods included from Teacup::Layout

#auto, included, #layout, #stylesheet, #stylesheet=, #subview, #top_level_view

Class Method Details

.newObject



18
19
20
# File 'lib/teacup-osx/core_extensions/ns_window_controller.rb', line 18

def self.new
  alloc.initWithWindowNibName(self.class.name)
end

Instance Method Details

#loadWindowObject



22
23
24
25
26
27
# File 'lib/teacup-osx/core_extensions/ns_window_controller.rb', line 22

def loadWindow
  self.window = NSWindow.alloc.initWithContentRect([[240, 180], [480, 360]],
    styleMask: NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask,
    backing: NSBackingStoreBuffered,
    defer: false)
end