#include "Testing.h"

Testing::Testing()
{
	//CtrlLayout(*this,"MONC GUI");
	CtrlLayout(doCard);
	CtrlLayout(doPlot);
	Title(" MONC GUI.......").Zoomable().Sizeable();
	AddFrame(menu);
	//AddFrame(status);
	//AddFrame(InsetFrame());
	menu.Set(THISBACK(MainMenu));
	menu.WhenHelp = status;
	//tool.WhenHelp = status;
	// CtrlLayout(*this, "MONC GUI :: developed by Abhiit Bhattacharyya");
    // PromptOK("Hello World");
    //CtrlLayoutOKCancel(*this, "MONC GUI :: developed by Abhiit Bhattacharyya");
    //AddFrame(sf.Left(list, 200));
    //list.AddColumn("List");
    //for (int i = 0; i < 100; i++)
    //   list.Add(FormatIntRoman(i, true));
    //AddFrame(InsetFrame());
    //sf.SizeMin(200).MinSize(100);
    //Sizeable();
}

void Testing::doConfig() {
	doPlot.Remove();
	Add(doCard);
//	CtrlLayout(doCard);
}

void Testing::doGeom() {
	doCard.Remove();
	Add(doPlot);
}

void Testing::doPrint() {
}

void Testing::Paint(Draw& w) {
	w.DrawRect(GetSize(), SWhite);
}

void Testing::doNew() {
	Testing::SaveAs();
}

void Testing::Open() {
}

void Testing::Save() {
}

void Testing::SaveAs() {
}

void Testing::FileMenu(Bar& menu) {
	menu.Add("New", THISBACK(doNew));
	menu.Add("Open", CtrlImg::open(), THISBACK(Open));
	menu.Add("Save", CtrlImg::save(), THISBACK(Save));
	menu.Add("Save As", CtrlImg::save_as(), THISBACK(SaveAs));
}

void Testing::MainMenu(Bar& menu) {
		menu.Add("File", THISBACK(FileMenu));
		menu.Add("Configure", THISBACK(doConfig)).Help("Edit Simulation Setup");
		menu.Add("Geometry", THISBACK(doGeom)).Help("Edit Experimental Geometry");
		//menu.Add("Plot", THISBACK(doPlot))
		//.Help("Plot Results");
		menu.Add("Print", THISBACK(doPrint));
		menu.Add("Exit", Breaker(IDOK));
}


GUI_APP_MAIN
{
	Testing().Run();
}
