
#ifndef __revengeapp_h__
#define __revengeapp_h__


#include <XFile.h>
#include <XApplication.h>
#include <XDialog.h>

/************************************************************************/
/*																		*/
/*	Application Core													*/
/*																		*/
/************************************************************************/

/*	TConstructorApp
 *
 *		The core class which manages the text editor
 */
struct tag_entry;

class TRevengeApp : public XGAppMultiWindow, public XGPeriodic {
	public:
								TRevengeApp();
		virtual					~TRevengeApp();
		
		void					DoPostPeriodic();
		
		DECLAREDISPATCH
		long					DoGetMenuStatus(long,void *);
		long					DoMenuCommand(long,void *);
		long					DoOpenDocument(long,void *);
		long					DoOpenApplication(long,void *);
		static void				OpenTagFileWindow( struct tag_file *tf, bool bring_to_front = true );
		
		static void				GetTagFilePath( char *path, tag_file *f );
		static void				OpenItem( tag_entry* e, bool mod_key_editor=FALSE);
		
	private:
		void					NewDocument();
		void					OpenDocument();
		void					OpenDocument(XGFileSpecifier *);
		void					BuildFoundationTags( XGFileSpecifier * );
		static long				FindTagProc( XGDialog *dlog, void *data, long msg, long arg, void *);
};




#endif

