Sha256: ff5bcaa4f69dc260337f5b3a354408c08ad64cd1702f003dcca1309f1fe872c9

Contents?: true

Size: 876 Bytes

Versions: 23

Compression:

Stored size: 876 Bytes

Contents

class NSView
  include SugarCube::Frameable
end

class CALayer
  include SugarCube::Frameable
end

class NSScreen
  include SugarCube::Frameable
end

class NSWindow

  def x
    self.frame.origin.x
  end

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

  def y
    self.frame.origin.y
  end

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

  def height
    self.frame.size.height
  end

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

  def width
    self.frame.size.width
  end

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

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
sugarcube-4.0.0 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.5.0 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.4.2 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.4.1 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.4.0 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.3.7 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.3.6 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.3.5 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.3.4 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.3.3 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.3.2 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.3.1 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.3.0 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.2.0 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.1.1 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.1.0 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.0.8 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.0.7 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.0.6 lib/osx/sugarcube-ui/frameable.rb
sugarcube-3.0.5 lib/osx/sugarcube-ui/frameable.rb