/******************************************************************************
 GMessageEditor.h

	Interface for the GMessageEditor class

	Copyright © 1997 by Glenn W. Bach.  All rights reserved.
	
	Base code generated by Codemill v0.1.0

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

#ifndef _H_GMessageEditor
#define _H_GMessageEditor

// Superclass Header
#include <JXSRTextBase.h>

class JXTextMenu;
class JXSpellChecker;

class GMessageEditor : public JXSRTextBase
{
public:

	GMessageEditor(JXMenuBar* menuBar, 
				JXScrollbarSet* scrollbarSet, JXContainer* enclosure,
				const HSizingOption hSizing, const VSizingOption vSizing,
				const JCoordinate x, const JCoordinate y,
				const JCoordinate w, const JCoordinate h);
	virtual ~GMessageEditor();

	JBoolean GetPasteText(JString* text);
	
protected:

	virtual void		Receive(JBroadcaster* sender,
								const JBroadcaster::Message& message);
	virtual JBoolean	CRMIsPrefixChar(const JCharacter c) const;
	virtual JSize		GetPlainTextTabWidth(const JIndex charIndex, const JIndex textColumn) const;
	virtual JBoolean	IsCharacterInWord(const JString& text,
										  const JIndex charIndex) const;

private:

	JIndex			itsStartEditCmd;
	JXSpellChecker*	itsSpellChecker;

private:

	void		UpdateEditMenu();
	void		HandleEditMenu(const JIndex index);
	
	// not allowed

	GMessageEditor(const GMessageEditor& source);
	const GMessageEditor& operator=(const GMessageEditor& source);

};
#endif
