/*	TEditForm.cpp
 *
 *		The edit form routines; this knows how to manage the contents of
 *	an editor window. Doesn't do much right now, though.
 */

/*  XT - An example text editor application built with the YAAF library
 *
 *	PUBLIC DOMAIN: The source kit of 'xt' has been placed into the
 *	public domain by the author, William Edward Woody, on the hope
 *	that the source kit will provide a useful example of using the
 *	YAAF Library.
 *  
 *  To contact the author, either e-mail me at woody@pandawave.com, 
 *	or write to
 *  
 *          William Edward Woody
 *          In Phase Consulting
 *          1545 Ard Eevin Avenue
 *          Glendale, CA 91202
 *
 *	Or visit us on the web at http://www.pandawave.com
 */

#include <XConfig.h>
#include <XWindow.h>
#include <XMessages.h>
#include "TEditView.h"
#include "TEditDoc.h"
#include "TEditForm.h"

/************************************************************************/
/*																		*/
/*	Construction/Destruction											*/
/*																		*/
/************************************************************************/

/*	TEditForm::TEditForm
 *
 *		make me
 */

TEditForm::TEditForm()
{
}

/*	TEditForm::~TEditForm
 *
 *		Delete me
 */

TEditForm::~TEditForm()
{
}

/************************************************************************/
/*																		*/
/*	Events																*/
/*																		*/
/************************************************************************/

BEGINFORM(TEditForm)
	DISPATCHFORM(KXGGetMenuStatus,TEditForm::DoGetMenuStatus)
	DISPATCHFORM(KXGDoMenuCommand,TEditForm::DoMenuCommand)
	DISPATCHFORM(KMarkDirty,TEditForm::DoDirty)
ENDFORM

/*	TEditForm::DoGetMenuStatus
 *
 *		Get menu status for this thing
 */

long TEditForm::DoGetMenuStatus(XGWindow *, long, void *)
{
	return -1;
}

/*	TEditForm::DoMenuCommand
 *
 *		Get menu status for this thing
 */

long TEditForm::DoMenuCommand(XGWindow *, long, void *)
{
	return -1;
}

/*	TEditForm::DoDirty
 *
 *		Get menu status for this thing
 */

long TEditForm::DoDirty(XGWindow *w, long, void *)
{
	TEditDoc *doc = dynamic_cast<TEditDoc *>(w->GetDocument());
	doc->MarkDirty();
	return 0;
}
