package PVWindow;

# PVWindow is a simple class that inherits from the base PV::Viewbox class.
# It sets up some colors and thats about all.  This class is basically a hack of the PV's rap example.

# to use:
#
# use PVWindow;
# my $window = new PVWindow("A bunch of text to display");
# endwin(); # hide all the graphics that were drawn to the screen

require 5.000;
use Curses;
use PV;


# export our functions
use vars qw (@EXPORT @ISA);
use Exporter;
@ISA = qw (Exporter DynaLoader PV::Viewbox);
@EXPORT = qw (&new);

sub new {			# A better mousetrap
	my $type=shift;		# PVWindow (text)
	my ($text) = shift || 'a test';

	# Initialize curses
	PV::init();

	# set up color and move the cursor about

	attron (COLOR_PAIR(3));
	#move (1,0); vline(" ",20);
	#move (2,79); vline(" ",20);
	#move (23,0); hline(" ",80);

	my $self=new PV::Viewbox (0,0,79,24,$text,0);
	move (23,0);
	#attron (COLOR_PAIR(7));
	bless $self;
}


