/******************************************************************************
 JXCurveOptionsDialog.h

	Interface for the JXCurveOptionsDialog class

	Copyright @ 1997 by Glenn W. Bach.

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

#ifndef _H_JXCurveOptionsDialog
#define _H_JXCurveOptionsDialog

#include <JXDialogDirector.h>
#include <JCurveInfo.h>
#include <JArray.h>

class JXRadioGroup;
class JString;
class JXTextCheckbox;
class JXCurveNameList;
class JXTextButton;

class JXCurveOptionsDialog : public JXDialogDirector
{
public:

	enum
	{
	kHideCurve = 1,
	kShowLines,
	kShowSymbols,
	kShowPoints,
	kShowBoth
	};

public:

	JXCurveOptionsDialog(JXWindowDirector* supervisor, 
							const JArray<JCurveInfo>& array, 
							const JIndex startIndex);

	virtual ~JXCurveOptionsDialog();
		
	const JArray<JCurveInfo>&	GetCurveInfoArray();
	
protected:

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

private:

	JIndex				itsCurrentIndex;
	JArray<JCurveInfo>*	itsCurvesInfo;
	
// begin JXLayout

    JXRadioGroup*   itsRG;
    JXTextButton*   itsCancelButton;
    JXTextCheckbox* itsShowXErrorsCB;
    JXTextCheckbox* itsShowYErrorsCB;

// end JXLayout

    JXCurveNameList* itsNameList;

private:

	void	BuildWindow();
	void	AdjustWidgets();

	// not allowed

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

/******************************************************************************
 GetCurveInfoArray (public)

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

inline const JArray<JCurveInfo>&			
JXCurveOptionsDialog::GetCurveInfoArray()
{
	return *itsCurvesInfo;
}

#endif
