module PurplishFrame::CocoaView
Public Instance Methods
bottom()
click to toggle source
# File lib/purplish-frame/ui/osx/cocoa_view.rb, line 19 def bottom frame.origin.y end
bottom=(bottom)
click to toggle source
# File lib/purplish-frame/ui/osx/cocoa_view.rb, line 23 def bottom=(bottom) f = frame f.origin.y = bottom self.frame = f end
center()
click to toggle source
# File lib/purplish-frame/ui/osx/cocoa_view.rb, line 29 def center NSMakePoint(left+width/2, top-height/2) end
center=(pt)
click to toggle source
# File lib/purplish-frame/ui/osx/cocoa_view.rb, line 33 def center=(pt) #We need to check because pt might be HIPoint or some Boxed type pt = pt.to_point if pt.respond_to? :to_point f = frame f.origin.x = pt.x-width/2 f.origin.y = pt.y-height/2 self.frame = f end
height=(height)
click to toggle source
# File lib/purplish-frame/ui/osx/cocoa_view.rb, line 42 def height=(height) f = frame f.origin.y -= height - frame.size.height f.size.height = height self.frame = f end
top()
click to toggle source
# File lib/purplish-frame/ui/osx/cocoa_view.rb, line 9 def top frame.origin.y + frame.size.height end
top=(y)
click to toggle source
# File lib/purplish-frame/ui/osx/cocoa_view.rb, line 13 def top=(y) f = frame f.origin.y = y - height self.frame = f end
view_frame()
click to toggle source
# File lib/purplish-frame/ui/osx/cocoa_view.rb, line 5 def view_frame frame end