//	Zinc Application Framework - Z_APP.HPP
//	COPYRIGHT (C) 1990-1999.  All Rights Reserved.
//	Zinc Software Incorporated.  Pleasant Grove, Utah  USA

#if !defined Z_APP_HPP
#define Z_APP_HPP
#include <z_env.hpp>
#include <z_evtmgr.hpp>

// --------------------------------------------------------------------------
// ----- ZafApplication -----------------------------------------------------
// --------------------------------------------------------------------------

class ZafApplication
{
public:
	// --- General members ---
	int argc;
	ZafIChar **argv;

	ZAF_EXPORT ZafApplication(int argc, char **argv);
	virtual ZAF_EXPORT ~ZafApplication(void);

	ZAF_EXPORT ZafEventType Control(ZafQFlags flags = Q_NORMAL);
	static void Flush(void);
	void LinkMain(void);
	int Main(void);

	// --- Attributes ---
	// get
	ZafError Error(void) const;
	// set
	virtual ZafError SetError(ZafError error);

	virtual void InitErrorSystem();
	virtual void InitHelpTips();
	virtual void InitKeyboard();
	virtual void InitMouse();

protected:
	ZafError error;
};

// --- inline functions ---
inline ZafError ZafApplication::Error(void) const { return (error); }

// --- global variable declarations ---
extern ZAF_EXPORT ZafApplication *zafApplication;

#endif // Z_APP_HPP

