1 ($:.unshift File.expand_path(File.join( File.dirname(__FILE__), '..', 'lib' ))).uniq!
5 # This example shows you how to utilize a single Nfoiled window
7 # Creating our first `Window` should take care of initializing the Nfoiled
8 # system for us. However, the `Ncurses.LINES` and `Ncurses.COLS` methods won't
9 # be defined until the system is initialized, so we have to prime it.
11 left = Nfoiled::Window.new :top => 0,
13 :height => ::Ncurses.LINES,
14 :width => ::Ncurses.COLS / 2
15 right = Nfoiled::Window.new :top => 0,
16 :left => ::Ncurses.COLS / 2,
17 :height => ::Ncurses.LINES,
18 :width => ::Ncurses.COLS / 2
20 # As per usual, the screen doesn't update until we actually tell it to.
23 # Let's print some stuff, just to see
24 left.print "left-brain"
25 right.print "right-brain"
27 # ... aaaaand update again!
28 left.wrapee.wnoutrefresh
29 right.wrapee.wnoutrefresh