#ifndef __NT_FORM_H__
#define __NT_FORM_H__

#include "NTWidget.h"
#include "NTGlobals.h"

namespace NTCurses {

class NTForm : public NTWidget {

public:
	NTForm( void );
	NTForm( NT::NTString id );
	NTForm( NTWidget *parent );
	NTForm( NT::NTString id , NTWidget *parent );

	virtual void Init( void );
	virtual void Deinit( void );
	virtual int DoModal( void );
	virtual void Create( void );
	virtual void Destroy( void );
	
	virtual void HandleMouseEvent( int mx , int my , int mz , unsigned int bstate );
	virtual void HandleKeyEvent( int keycode );
	virtual void HandleEvent( NTEvent evt );
	virtual void HandleEvents( void );
	virtual void HandleModalExitEvent( int exitcode );

	void SetTitle( NT::NTString t );
	NT::NTString GetTitle( void );
	
	virtual unsigned int GetRelativeX();
	virtual unsigned int GetRelativeY();
	
	void SetCenterPositionFormOnSize( unsigned int width , unsigned int height );

protected:
	bool IsCoordinateInRect( unsigned int x , unsigned int y , unsigned int x1 , unsigned int y1 , unsigned int width , unsigned int height );
	bool bExit;
	int iModalRetval;
	NT::NTString sTitle;
};

}



#endif
