require "curses" module PPCurses class BaseAction def setWindow(win) @win = win end def xPadding() return self.winPadding() end def winPadding() return 2 end def winWidth() Curses.cols - winPadding() end def winHeight() Curses.lines - winPadding() end def createWindow() @win = Window.new( winHeight(), winWidth(), winPadding()/2, winPadding()/2) @win.clear @win.box("|", "-") @win.setpos(@win.cury()+1, xPadding() ) end def show() if @win.nil? self.createWindow() end @win.refresh end end end