#ifndef _DESIGNER_H_
#define _DESIGNER_H_

#include "../tk/gui/gui.h"
#include "appwindow.h"
#include "frmlist.h"
#include "propertyeditor.h"

class FrmList;
class ModuleManager;

/**
 * \brief Represents whole "designer" application
 * 
 * Hold references to application window (AppWindow), property editor window (PropertyEditor) and editable form list (FrmList).
 *
 * \date 01-29-2006
 *
 * \author Ondrej Svejdar
 *
 * \todo 
 *
 * \bug 
 *
 */
class Designer:public TObject
{
	Ptr<AppWindow> appWindow;
	Ptr<FrmList> frmList;
	Ptr<PropertyEditor> propEditor;
	Ptr<TclInterp> interp;

	Ptr<TkGui> gui;
	ModuleManager* manager;

	bool active;
public:
	static const char* type;
	const char* getType() const
	{
		return type;
	}
	
	/**
	 * \brief return reference to application window
	 * \return application window
	 */
	Ptr<AppWindow>& getAppWindow();
	
	/**
	 * \brief return reference to property editor window
	 * \return property editor window
	 */
	Ptr<PropertyEditor>& getPropertyEditor();
	
	
	/**
	 * \brief return reference to editable form list
	 * \return forms list
	 */
	Ptr<FrmList>& getFrmList();

	/**
	 * \brief return reference to system form list
	 * \return system form list
	 */
	Ptr<TkGui>& getGui();
	
	
	/**
	 * \brief return pointer to module manager
	 * \return module manager
	 */
	ModuleManager* getManager();

	void saveAll();
	void onExit();
	void onReactivate();

	Designer(Ptr<TclInterp>& interp,Ptr<TkGui>& gui,ModuleManager* manager);
};

#endif/*_DESIGNER_H_*/
