#ifndef _COBJECTCHECK_H_
#define _COBJECTCHECK_H_

#include "CObjectRollOver.h"
#include "../x/Objstr.h"

#define STATE_UNCHECKED				0	/* unchecked */
#define STATE_CHECKED				1	/* checked */

class CObjectCheck:public CObjectRollOver
{
private:
	//checked or unchecked
	int			 CBcheck;

	//retourne l'index de la colonne de la bitmap à afficher
	int GetColumnIndexBitmap();

public:
	CObjectCheck(container *,Layer *,int,int,int,int,int,int,int);
	virtual ~CObjectCheck();

	int IsMouseOnObject(int,int,int);
	int ClickIn(int,int,int,int,int,int);
	int UnClickIn(int,int,int,int,int,int);
	int SetFocus(int,int,int);
	int KillFocus(int,int);


	int GetState();
	int SetState(int newState, int notifylinks, int redrawobject );

	Layer *GetLayer(mmachine m,int p_tab);
	Layer *GetLayerPart(mmachine m,Rect2D *area2redraw,int p_tab);

	int ResizeLayer(int,int,int);

	// pour les liens entre objets
	int handle( CObjMessage *msg );
	int supports( int type );
	
};

/* fonctions Scol */
int _CRcompCheck(mmachine);
int _DScompCheck(mmachine);
int _CONVERTcompCheckToObjNode(mmachine);
int _GETcompCheckState(mmachine);
int _SETcompCheckState(mmachine);
int _CBcompCheckCursorMoveIn(mmachine);
int _CBcompCheckCursorMoveOut(mmachine);
int _CBcompCheckClick(mmachine);
int _CBcompCheckStateChanged(mmachine);
int _CBcompCheckResizeResource(mmachine m);
int _CBcompCheckResize(mmachine m);
#endif