#ifdef __BORLANDC__
#include <vcl.h>
#pragma hdrstop
#endif

#include <FL/Fl.H>

#include <sptk3/CWindow.h>
#include <sptk3/CGroup.h>
#include <sptk3/CButton.h>
#include <sptk3/CDataControl.h>
#include <sptk3/CTreeControl.h>

using namespace std;
using namespace sptk;

int main(int argc, char *argv[]) {
   CWindow window(400,300);

   CTreeControl tree("",10,SP_ALIGN_CLIENT);

   CTreeItem *item;

   item = tree.addItem("aaa",0,0,0);
   item->addItem("bbb",0,0,0);
   item = item->addItem("ccc",0,0,0);
   item->addItem("ddd",0,0,0);
   tree.addItem("vvv",0,0,0);

   item = tree.addItem("aaa",0,0,0);
   item->addItem("bbb",0,0,0);
   item = item->addItem("ccc",0,0,0);
   item->addItem("ddd a very long item text that goes on, and on, and on, and on",0,0,0);
   tree.addItem("vvv a very long item text that goes on, and on, and on, and on",0,0,0);

   item = tree.addItem("aaa",0,0,0);
   item->addItem("bbb",0,0,0);
   item = item->addItem("ccc",0,0,0);
   item->addItem("ddd",0,0,0);
   tree.addItem("vvv",0,0,0);

   item = tree.addItem("aaa",0,0,0);
   item->addItem("bbb",0,0,0);
   tree.addItem("vvv",0,0,0);

   item = tree.addItem("aaa",0,0,0);
   item->addItem("bbb",0,0,0);
   tree.addItem("vvv",0,0,0);

   item = tree.addItem("aaa",0,0,0);
   item->addItem("bbb",0,0,0);
   tree.addItem("vvv",0,0,0);

   window.end();
   window.resizable(&window);

   window.show(argc,argv);
   Fl::run();

   return 0;
}
