class PPCurses::View

Based loosely on …

developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/index.html#//apple_ref/occ/instp/NSView/subviews

Attributes

frame[RW]

Public Class Methods

new() click to toggle source

Extending classes should set the appropriate frame size; the default implementation sets the frame to a zero rect which, although avoids pointer errors, isn't very useful.

# File lib/ppcurses/view.rb, line 18
def initialize
  @frame = Rect.zeroRect
end

Public Instance Methods

display(screen) click to toggle source

Expects screen to be a PPCurses::Screen object Need to convert to work with a window or a view.

The default implementation does nothing

# File lib/ppcurses/view.rb, line 40
def display(screen)

end
setFrameOrigin( origin ) click to toggle source

Modifying the Frame Rectangle

# File lib/ppcurses/view.rb, line 56
def setFrameOrigin( origin )
  @frame.origin = origin
end
setFrameSize( size ) click to toggle source
# File lib/ppcurses/view.rb, line 61
def setFrameSize( size )
  @frame.size = size
end