/******************************************************************************
 JXPlotScaleDialog.h

	Interface for the JXPlotScaleDialog class

	Written by John Lindal.

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

#ifndef _H_JXPlotScaleDialog
#define _H_JXPlotScaleDialog

#include <JXDialogDirector.h>

class JXFloatInput;
class JXRadioGroup;
class JXStaticText;

class JXPlotScaleDialog : public JXDialogDirector
{
public:

	enum
	{
		linear = 1,
		log
	};
	
public:

	JXPlotScaleDialog(JXWindowDirector* supervisor, const JFloat xMax, 
						const JFloat xMin, const JFloat xInc, 
						const JBoolean xLinear,	const JFloat yMax, 
						const JFloat yMin, const JFloat yInc, 
						const JBoolean yLinear);

	virtual ~JXPlotScaleDialog();
	
	void GetScaleValues(JFloat* xMax, JFloat* xMin, JFloat* xInc, 
						JBoolean* xLinear,	
						JFloat* yMax, JFloat* yMin, JFloat* yInc, 
						JBoolean* yLinear);

	void EditXAxis(const JBoolean xAxis);
	
protected:

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

private:

// begin JXLayout

    JXStaticText* itsXIncLabel;
    JXStaticText* itsYIncLabel;
    JXRadioGroup* itsYAxisTypeRG;
    JXRadioGroup* itsXAxisTypeRG;
    JXFloatInput* itsXMin;
    JXFloatInput* itsXMax;
    JXFloatInput* itsXInc;
    JXFloatInput* itsYMin;
    JXFloatInput* itsYMax;
    JXFloatInput* itsYInc;

// end JXLayout

private:

	void	BuildWindow();
	void	AdjustXScaleActivation();
	void	AdjustYScaleActivation();

	// not allowed

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

#endif
