//-----------------------------------------------------------------------------
// スピンエディット
//-----------------------------------------------------------------------------

#ifndef _NWSPINEDIT_H_
#define _NWSPINEDIT_H_

//-----------------------------------------------------------------------------
class NWSPINBTN;
typedef NWSPINBTN *PNWSPINBTN;

class NWSPINBTN: public NWBUTTON {
protected:
	NWSPINBTN( void );
public:
	NWSPINBTN( PNWCONTROL pRootControl );
	~NWSPINBTN( void );
	
	int MsgMouseDown( PNWMESSAGE pMessage );
	int MsgMouseUp( PNWMESSAGE pMessage );
	int MsgMouseMove( PNWMESSAGE pMessage );
	int MsgResize( PNWMESSAGE pMessage );
};
//-----------------------------------------------------------------------------

typedef enum {
	NW_SPINPOS_LEFT,
	NW_SPINPOS_RIGHT
} NWSPINPOSITION;

class NWSPINEDIT: public NWEDIT {
protected:
	PNWCONTROL		pPanel;
	PNWSPINBTN		pUpBtn;
	PNWSPINBTN		pDownBtn;
	NWSPINPOSITION	ePosition;
	
	NWSPINEDIT( void );
public:
	int				nMinNum;
	int				nMaxNum;
	int				nIncNum;
	
	void SetSpinPosition( NWSPINPOSITION ePos );
	virtual void GoScroll( int nTag, int nVal );
	
	NWSPINEDIT( PNWCONTROL pRootControl );
	~NWSPINEDIT( void );
	
	int MsgShortCut( PNWMESSAGE pMessage );
};

//-----------------------------------------------------------------------------
#endif
