class Rfd::Window
Public Class Methods
draw_borders()
click to toggle source
# File lib/rfd/windows.rb, line 6 def self.draw_borders [[5, Curses.stdscr.maxx, 0, 0], [5, Curses.cols - 30, 0, 0], [Curses.stdscr.maxy - 5, Curses.stdscr.maxx, 4, 0]].each do |height, width, top, left| w = Curses.stdscr.subwin height, width, top, left w.bkgdset Curses.color_pair(Curses::COLOR_CYAN) w.box 0, 0 w.close end end
new(maxy: nil, maxx: nil, begy: nil, begx: nil, window: nil)
click to toggle source
Calls superclass method
# File lib/rfd/windows.rb, line 15 def initialize(maxy: nil, maxx: nil, begy: nil, begx: nil, window: nil) super window || Curses.stdscr.subwin(maxy, maxx, begy, begx) end
Public Instance Methods
writeln(row, str)
click to toggle source
# File lib/rfd/windows.rb, line 19 def writeln(row, str) setpos row, 0 clrtoeol self << str refresh end