/******************************************************************************
 SyGViewManPageDialog.h

	Interface for the SyGViewManPageDialog class

	Copyright © 1996-98 by John Lindal. All rights reserved.

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

#ifndef _H_SyGViewManPageDialog
#define _H_SyGViewManPageDialog

#include <JXWindowDirector.h>
#include <JPrefObject.h>

class JXTextButton;
class JXInputField;
class JXCharInput;
class JXTextCheckbox;
class JXStringHistoryMenu;

class SyGViewManPageDialog : public JXWindowDirector, public JPrefObject
{
public:

	SyGViewManPageDialog(JXDirector* supervisor);

	virtual ~SyGViewManPageDialog();

	virtual void	Activate();

protected:

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

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

private:

// begin JXLayout

    JXTextButton*        itsCloseButton;
    JXTextButton*        itsViewButton;
    JXInputField*        itsFnName;
    JXTextCheckbox*      itsAproposCheckbox;
    JXTextButton*        itsHelpButton;
    JXStringHistoryMenu* itsFnHistoryMenu;
    JXCharInput*         itsManIndex;

// end JXLayout

private:

	void	BuildWindow();
	void	ViewManPage();
	void	SetFunction(const JCharacter* historyStr);
	void	AddToHistory(const JCharacter* pageName, const JCharacter pageIndex,
						 const JBoolean apropos);

	// not allowed

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

#endif
