/*
paned Form
implementation file:paned.cc
*/
#include <paned.h>
// Paned FORM  CLASS
static VDKRawPixmap *monetPix = NULL;
static VDKRawPixmap *nicegirlPix = NULL;
static int flipcounter = 0;
/*
form constructor
*/
PanedForm::PanedForm(VDKForm* owner, char* title):
	VDKForm(owner,title)
{
}

/*
form destructor
*/
PanedForm::~PanedForm()
{
}

/*
form setup
*/
void
PanedForm::Setup(void)
{
	GUISetup(); // vdkb gui setup
// put your code below here
    monetPix = new VDKRawPixmap(this,"monet.xpm");   
    nicegirlPix = new VDKRawPixmap(this,"linuxGirl.xpm");
}

// signal response method 
bool
PanedForm::OnflipClick(VDKObject* sender)
{
    flipcounter++;
    monet->SetPixmap( !(flipcounter%2) ? monetPix : nicegirlPix);
    nicegirl->SetPixmap( !(flipcounter%2) ? nicegirlPix : monetPix); 
    return true;
}

// signal response method 
bool
PanedForm::OnquitClick(VDKObject* sender)
{
Close();
return true;
}


