/*	TAllTagForm.h
 *
 *		TagFile form; this is the object which provides the form
 *	functionality for my project
 */

/**********************************************************************

  YAAF is Copyright 1997-1999 by William Woody.

  Redistribution and use in source and binary forms, with or without 
  modification, are permitted provided that the following conditions 
  are met:

  Redistributions of source code must retain the above copyright notice, 
  this list of conditions and the following disclaimer.

  Neither the name of the copyright holder or other contributors may
  be used to promote products derived from this software without
  specific written prior permission.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
  SOFTWARE.
  
  Contact:   woody@alumni.caltech.edu
  Web page:  http://www.pandawave.com/yaaf/

**********************************************************************/

#ifndef PandaWave_TALLTAGFORMFORM
#define PandaWave_TALLTAGFORMFORM

#include <XTypes.h>
#include <XForm.h>
#include "tags.h"

class XGDialog;
struct tag_entry;

/*	TTagFileForm
 *
 *		The form object which provides functionality for how to manage
 *	my project object
 */

class TAllTagForm : public XGForm {
	public:
		
		TAllTagForm();
		virtual					~TAllTagForm();
		
		/*
		 *	Events
		 */
		
		void					DoFormInitialize();
		void					DoDocumentRenamed();
		
		virtual bool			DoQueryDestroyWindow();
		
		void					NoticeItem( tag_entry *e, bool exclusive );
		void					ReloadTableContents(bool endraw = true);
		void					GetInfoItem( struct tag_entry * );
		
		DECLAREDISPATCH
		long					DoDoubleClick(long,void *);
		long					DoGetMenuStatus(long,void *);
		long					DoMenuCommand(long,void *);
		long					DoKeyEvent( long arg, void * );
		long					DoTreeCanDrop(long arg, void* );
		long					DoTreeDrop(long arg, void* );
		
		static long				NewTagDialogProc(XGDialog *, void *, long, long, void *);
		static long				InfoDialogProc(XGDialog *, void *, long, long, void *);
	
		static void 			Show(bool s=true);
		
	private:
		void					DoToAllSelectedEntries( void (TAllTagForm::*proc)( tag_entry *e ) );
		static TAllTagForm* 	st_form;	
		
};

#endif // PandaWave_TPROJECTFORM
