class Diakonos::Window

Public Class Methods

new( *args ) click to toggle source
Calls superclass method
# File lib/diakonos/window.rb, line 6
def initialize( *args )
  # Setup some variables to keep track of a fake cursor
  @row, @col = 0, 0
  super
  Curses::close_screen
end

Public Instance Methods

addstr( str ) click to toggle source
# File lib/diakonos/window.rb, line 21
def addstr( str )
  @col += str.length
end
attrset( *args ) click to toggle source
# File lib/diakonos/window.rb, line 33
def attrset( *args )
  # noop
end
curx() click to toggle source
# File lib/diakonos/window.rb, line 25
def curx
  @col
end
cury() click to toggle source
# File lib/diakonos/window.rb, line 29
def cury
  @row
end
getch() click to toggle source
# File lib/diakonos/window.rb, line 37
def getch
  $keystrokes.shift
end
refresh() click to toggle source
# File lib/diakonos/window.rb, line 13
def refresh
  # Don't refresh when testing
end
setpos( row, col ) click to toggle source
# File lib/diakonos/window.rb, line 17
def setpos( row, col )
  @row, @col = row, col
end