Class: NSWindow

Inherits:
Object show all
Defined in:
lib/osx/sugarcube-ui/frameable.rb

Instance Method Summary collapse

Instance Method Details

#heightObject



35
36
37
# File 'lib/osx/sugarcube-ui/frameable.rb', line 35

def height
  self.frame.size.height
end

#setHeight(newHeight) ⇒ Object



39
40
41
42
43
# File 'lib/osx/sugarcube-ui/frameable.rb', line 39

def setHeight(newHeight)
  new_frame = self.frame
  new_frame.size.height = newHeight
  self.setFrame(new_frame, display: false)
end

#setWidth(newWidth) ⇒ Object



49
50
51
52
53
# File 'lib/osx/sugarcube-ui/frameable.rb', line 49

def setWidth(newWidth)
  new_frame = self.frame
  new_frame.size.width = newWidth
  self.setFrame(new_frame, display: false)
end

#setX(newX) ⇒ Object



19
20
21
22
23
# File 'lib/osx/sugarcube-ui/frameable.rb', line 19

def setX(newX)
  new_frame = self.frame
  new_frame.origin.x = newX
  self.setFrame(new_frame, display: false)
end

#setY(newY) ⇒ Object



29
30
31
32
33
# File 'lib/osx/sugarcube-ui/frameable.rb', line 29

def setY(newY)
  new_frame = self.frame
  new_frame.origin.y = newY
  self.setFrame(new_frame, display: false)
end

#widthObject



45
46
47
# File 'lib/osx/sugarcube-ui/frameable.rb', line 45

def width
  self.frame.size.width
end

#xObject



15
16
17
# File 'lib/osx/sugarcube-ui/frameable.rb', line 15

def x
  self.frame.origin.x
end

#yObject



25
26
27
# File 'lib/osx/sugarcube-ui/frameable.rb', line 25

def y
  self.frame.origin.y
end