#ifndef _GUI_H_
#define _GUI_H_

#include "options/options.h"

#include "image/tk_photo.h"

#include "tk_place_layout.h"
#include "tk_grid_layout.h"

#include "tk_place_constraints.h"
#include "tk_grid_constraints.h"

#include "tk_base.h"

#include "tk_button.h"
#include "tk_checkbutton.h"
#include "tk_entry.h"
#include "tk_frame.h"
#include "tk_label.h"
#include "tk_listbox.h"
#include "tk_radiobutton.h"
#include "tk_spinbox.h"
#include "tk_scrollbar.h"
#include "tk_text.h"

#include "tk_dialogs.h"

#include "tk_toplevel.h"

#include "myvardef.h"
#include "mymoduletype.h"

class TkGui:public TObject
{
public:
	typedef vector<Ptr<TkTopLevel> > t_base;
private:
	Ptr<TclInterp> interp;
	t_base base;
	static const string dbName;
public:
	static const char* type;
	const char* getType() const;

	Ptr<TkTopLevel> mainWindow;

	typedef t_base::const_iterator  const_iterator;
	const_iterator begin();
	const_iterator end();

	TkGui(TclInterp* interp);
	
	void insertSourceForm(TkTopLevel* topLevel);
	void deleteSourceForm(TkTopLevel* topLevel);

	Ptr<TkTopLevel>& cloneSourceForm(const string& name);
	Ptr<TkTopLevel>& getSourceForm(const string& name);

	t_base& getSourceForms();
	
	void load();
	void save() const;

	void destroy();

};

#endif/*_GUI_H_*/
