/******************************************************************************
 SyGRunCmdDialog.h

	Interface for the SyGRunCmdDialog class

	Copyright © 1998 by John Lindal. All rights reserved.

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

#ifndef _H_SyGRunCmdDialog
#define _H_SyGRunCmdDialog

#include <JXDialogDirector.h>
#include <JPrefObject.h>

class JXTextButton;
class JXInputField;
class JXStringHistoryMenu;

class SyGRunCmdDialog : public JXDialogDirector, public JPrefObject
{
public:

	SyGRunCmdDialog(JXDirector* supervisor);

	virtual ~SyGRunCmdDialog();

	virtual void	Activate();

	const JString&	GetCommand() const;

protected:

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

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

private:

// begin JXLayout

    JXInputField*        itsCmdInput;
    JXTextButton*        itsHelpButton;
    JXStringHistoryMenu* itsHistoryMenu;
    JXTextButton*        itsBrowseButton;

// end JXLayout

private:

	void		BuildWindow();

	// not allowed

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

#endif
