class PPCurses::Window
Public Class Methods
new(height, width, top, left)
click to toggle source
TODO - use optional parameters. A rect or a Curses
window to wrap.
Calls superclass method
# File lib/ppcurses/window/pp_window.rb, line 6 def initialize(height, width, top, left) super(height,width,top,left) # Enables reading arrow keys in getch keypad(true) box('|', '-') end
Public Instance Methods
get_ch_handle_signals()
click to toggle source
EXPERIMENTAL/HACK
The following could be used to wrap all getch calls and support window resizes when the getch is blocking all threads.
# File lib/ppcurses/window/pp_window.rb, line 23 def get_ch_handle_signals got_input = false until got_input begin c = getch got_input = true rescue NoMethodError # Assuming a SIGWINCH occurred -- reposition.. c = '' end end c end