/******************************************************************************
 SyGBindingsManager.h

	Interface for the SyGBindingsManager class

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

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

#ifndef _H_SyGBindingsManager
#define _H_SyGBindingsManager

#include <JBroadcaster.h>
#include <JPrefObject.h>
#include <JString.h>

class BindingsDir;

class SyGBindingsManager : virtual public JBroadcaster, public JPrefObject
{
public:

	SyGBindingsManager(JPrefsManager* prefsMgr, const JPrefID& id);
	virtual ~SyGBindingsManager();

	JString 		GetAppForFile(const JString& file, const JBoolean alternate);
	void			EditBindings();
	BindingsDir* 	GetDirector();

	void SetHelpSection(const JCharacter* section);

protected:

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

private:

	BindingsDir*	itsBindingsDir;
	JString			itsDialogPrefs;
	JString			itsHelpSection;

private:
	
	void 			GenerateDefaultBindingsFile();

	// not allowed

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

};

/******************************************************************************
 GetDirector

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

inline BindingsDir*
SyGBindingsManager::GetDirector()
{
	return itsBindingsDir;
}
#endif
