//-----------------------------------------------------------------------------
// 描画コントロール
//-----------------------------------------------------------------------------

#ifndef _NWGRAPHIC_H_
#define _NWGRAPHIC_H_

//-----------------------------------------------------------------------------

class NWGRAPHIC: public NWCONTROL {
protected:
	int			bPush;
	int			nStartX;
	int			nStartY;
	int			nPosX;
	int			nPosY;
	int			nBevel;
	
	NWCOLOR		sBodyColor[4];
	NWCOLOR		sEdgeColor[2];
	NWCOLOR		sFontColor;
	
	PNWBITMAP	pBackGround;
	NWCOLOR		sBackColor[4];
	
	NWGRAPHIC( void );
public:
	NWGRAPHIC( PNWCONTROL pRootControl );
	~NWGRAPHIC( void );
	
	void SetBevel( int nNew );
	
	int CheckClipRect( PNWRECT pClip, PNWRECT pR );
	void BitBlt( PNWRECT pDstRect, PNWRECT pSrcRect, PNWBITMAP pSrc, PNWCOLOR pColor );
	void DirectBlt( PNWRECT pDstRect, float *pUV, int nTexNo, PNWCOLOR pColor );
	void DirectBltBump( PNWRECT pDstRect, float *pUV, int nTexNo, PNWCOLOR pColor, int nAng=0 );
	void Rectangle( PNWRECT pDstRect, PNWCOLOR pColorArray );
	void Rectangle2( PNWRECT pDstRect, PNWCOLOR pColorArray );
	void DrawBox( PNWRECT pDstRect, PNWCOLOR pColorArray );
	void DrawBox2( PNWRECT pDstRect, PNWCOLOR pColorArray );
	void DrawShadow( PNWRECT pDstRect, int nW );
	void Print( const char *pStr );
	void Printf( const char *pFmt, ... );
	void SetPos( int nX, int nY );
	void CRLF( float fPer );
	
	void SetBackGround( PNWBITMAP pBitmap );
	void SetBackColor( PNWCOLOR pColor );
	void SetFilterMode( int bMode );
	
	void SetFontColor( PNWCOLOR pColor );
	void SetBodyColor( PNWCOLOR pColor );
	void SetEdgeColor( PNWCOLOR pColor );
	
	int MsgProc( PNWMESSAGE pMessage );
	int MsgPaint( PNWMESSAGE pMessage );
	int MsgMouseDown( PNWMESSAGE pMessage );
	int MsgMouseUp( PNWMESSAGE pMessage );
	int MsgMouseMove( PNWMESSAGE pMessage );
};

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