/******************************************************************************
 GMailboxTreeDir.h

	Interface for the GMailboxTreeDir class

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

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

#ifndef _H_GMailboxTreeDir
#define _H_GMailboxTreeDir

//includes

// Superclass Header
#include <GMManagedDirector.h>
#include <JPrefObject.h>

class GSimpleFileTree;
class JXTextButton;
class GMailboxTreeWidget;
class JXTimerTask;
class JXTextMenu;
class JXToolBar;
class JXImage;

class GMailboxTreeDir : public GMManagedDirector, public JPrefObject
{
public:

public:

	GMailboxTreeDir(JXDirector* supervisor);
	virtual ~GMailboxTreeDir();

	void	EditToolBar();

	virtual JXImage*	GetMenuIcon() const;
	virtual JBoolean	GetShortcut(JString* shortcut) const;
	virtual JBoolean	GetID(JString* id) const;

	virtual void		Activate();
	virtual JBoolean	Deactivate();

protected:

	virtual void	Receive(JBroadcaster* sender, const Message& message);
	virtual void	ReadPrefs(istream& input);
	virtual void	WritePrefs(ostream& output) const;

private:

	GSimpleFileTree*	itsTree;
	JXTextButton*		itsCloseButton;
	GMailboxTreeWidget*	itsWidget;
	JXTimerTask*		itsTimerTask;
	JXTextMenu*			itsHelpMenu;
	JXToolBar*			itsToolBar;
	JXImage*			itsMenuIcon;

private:

	void HandleHelpMenu(const JIndex index);

	void BuildWindow();

	// not allowed

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

};

/******************************************************************************
 GetMenuIcon (public)

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

inline JXImage*
GMailboxTreeDir::GetMenuIcon()
	const
{
	return itsMenuIcon;
}

#endif
