/******************************************************************************
 SyGChooseSaveFile.h

	Interface for the SyGChooseSaveFile class.

	Written by John Lindal.

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

#ifndef _H_SyGChooseSaveFile
#define _H_SyGChooseSaveFile

#include <JXChooseSaveFile.h>
#include <JPrefObject.h>	

class SyGChoosePathDialog;

class SyGChooseSaveFile : public JXChooseSaveFile, public JPrefObject
{

public:

	SyGChooseSaveFile(JPrefsManager* prefsMgr, const JPrefID& id);

	virtual ~SyGChooseSaveFile();
	
	void		ShouldOpenInNewWindow(const JBoolean newWindow);
	JBoolean	IsOpeningInNewWindow() const;

protected:

//	virtual JXSaveFileDialog*
//	CreateSaveFileDialog(JXDirector* supervisor, JUNIXDirInfo* dirInfo,
//						 const JCharacter* fileFilter, const JCharacter* origName,
//						 const JCharacter* prompt, const JCharacter* message);

//	virtual JXChooseFileDialog*
//	CreateChooseFileDialog(JXDirector* supervisor, JUNIXDirInfo* dirInfo,
//						   const JCharacter* fileFilter, const JCharacter* origName, 
//						   const JBoolean allowSelectMultiple, const JCharacter* message);

	virtual JXChoosePathDialog*
	CreateChoosePathDialog(JXDirector* supervisor, JUNIXDirInfo* dirInfo,
						   const JCharacter* fileFilter,
						   const JBoolean selectOnlyWritable, 
						   const JCharacter* message);

	virtual void	Receive(JBroadcaster* sender, const Message& message);

	virtual void	ReadPrefs(istream& input);
	virtual void	WritePrefs(ostream& output) const;

private:

	SyGChoosePathDialog*	itsPathDialog;
	JBoolean				itsOpenInNewWindow;

private:

	// not allowed

	SyGChooseSaveFile(const SyGChooseSaveFile& source);
	const SyGChooseSaveFile& operator=(const SyGChooseSaveFile& source);
};

#endif
