#include "otools.h"
#include "colors.h"
#include "protos.h"

void Cq(Figlet *f,int x,int y)
{
  o_running = 0;
}

void conf(int x,int y,int w,int h)
{
  o_draw->Stack(5,5,xMax-5,yMax-5,2,0,15,15);
}

int main(int argc,char *argv[])
{
  Color *c,*d;

  o_Init("Figlet example #1","figex","7x13bold",10,10,320,240,160,120,640,480,
	 C_GRAY,argc,argv);

  c = new Color(C_GRAY);
  d = new Color(C_GRAY);

  o_draw=new Chain();
  o_draw->Add(new Figlet(0,0,0,0,DOUBLE,&o_color,0,"Application"));
  o_draw->Add(new Switch(0,0,0,0,SHADOW,c,0,"right",DIAMOND,OUT,4,NULL));
  o_draw->Add(new Switch(0,0,0,0,SINGLE,c,0,"left",FLIP,OUT,8,NULL));
  o_draw->Add(new Slider(0,0,0,0,IN,d,0,"slider",SLIDER,X,10,NULL,0.5));
  o_draw->Add(new Slider(0,0,0,0,IN,d,0,"fader",FADER,X,10,NULL,0.5));
  o_draw->Add(new Slider(0,0,0,0,IN,d,0,"fancy",FANCY,X,10,NULL,0.5));
  o_draw->Add(new Slider(0,0,0,0,IN,d,0,"bar",BAR,X,10,NULL,0.5));
  o_draw->Add(new Button(0,0,0,0,IN,c,0,"hold",HOLD,OUT,NULL));
  o_draw->Add(new Button(0,0,0,0,OUT,c,0,"click",CLICK,OUT,NULL));
  o_draw->Add(new Button(0,0,0,0,HEXAGON,c,0,"quit",CLICK,OUT,Cq));

  o_Configure = conf;

  o_test = o_draw;

  o_EnterLoop();
  o_Quit();
}
