#ifndef _COBJECTBITMAP_H_
#define _COBJECTBITMAP_H_

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

class CObjectBitmap:public CObjectBase
{
private:
	int BMPx_inbitmap;
	int BMPy_inbitmap;
	int BMPwidth;
	int BMPheight;

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

	int IsMouseOnObject(int,int,int);
	int CursorMove(int,int,int,int,int);
	int CursorMoveIn(int,int,int,int,int);
	int CursorMoveInWithBtnPushed(int,int,int,int,int);
	int CursorMoveOut(int,int,int,int,int);
	int CursorMoveOutWithBtnPushed(int,int,int,int,int);
	int CursorMoveOutsideWithBtnPushed(int,int,int,int,int);
	int ClickIn(int,int,int,int,int,int);
	int UnClickIn(int,int,int,int,int,int);
	int ClickOut(int,int,int,int,int,int);
	int UnClickOut(int,int,int,int,int,int);
	int DblClickIn(int,int,int,int,int,int);
	int MouseWheel(int,int,int,int,int,int);
	int KeyUp(UINT,int,UINT,int);
	int KeyDown(UINT,int,int,UINT,int);
	int SetFocus(int,int,int);
	int KillFocus(int,int);

	int Timer(int);

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

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

};

/* fonctions Scol */
int _CRcompBitmap(mmachine);
int _DScompBitmap(mmachine);
int _CONVERTcompBitmapToObjNode(mmachine);
int _CBcompBitmapCursorMove(mmachine);
int _CBcompBitmapClick(mmachine);
int _CBcompBitmapUnClick(mmachine);
int _CBcompBitmapDblClick(mmachine);
int _CBcompBitmapResizeResource(mmachine);
int _CBcompBitmapResize(mmachine);

#endif //_COBJECTBITMAP_H_