X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=WCudaMSE%2FAPI_Bilat_Image_GL%2FINC%2Fcpu%2FGLImageSelections_CPU.h;fp=WCudaMSE%2FAPI_Bilat_Image_GL%2FINC%2Fcpu%2FGLImageSelections_CPU.h;h=7570c404cca3e8b7c3d0136ec416d379019f53bf;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/API_Bilat_Image_GL/INC/cpu/GLImageSelections_CPU.h b/WCudaMSE/API_Bilat_Image_GL/INC/cpu/GLImageSelections_CPU.h new file mode 100755 index 0000000..7570c40 --- /dev/null +++ b/WCudaMSE/API_Bilat_Image_GL/INC/cpu/GLImageSelections_CPU.h @@ -0,0 +1,97 @@ +#ifndef GLIMAGE_SELECTIONS_CPU_H +#define GLIMAGE_SELECTIONS_CPU_H + +#include "GLImages_CPU.h" +#include "DomaineEcran_CPU.h" + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +namespace cpu + { + class CBI_GLIMAGE GLImageSelections: public cpu::GLImages + { + public: + /*--------------------------------------*\ + |* Constructor *| + \*-------------------------------------*/ + + GLImageSelections(cpu::ImageMOOs_A* ptrImageMOO, bool isAnimationEnable = true); + + /*--------------------------------------*\ + |* Destructor *| + \*-------------------------------------*/ + + virtual ~GLImageSelections(); + + /*--------------------------------------*\ + |* Methodes *| + \*-------------------------------------*/ + + protected: + + /** + * then selection is performed with the mouse, 3 arguments : + * 1) selected domaine in frame coordinate + * 2) dx is the screen width in pixLa clel + * 3) dy is the screen height in pixel + **/ + virtual void selectionPerformed(cpu::DomaineEcran& domaine, int dx, int dy); + + /** + * Override + */ + virtual void display(Panel_A &panel); + + /** + * Override + */ + virtual void onMouseMoved(const MouseEvent &event); + + /** + * Override + */ + virtual void onMousePressed(const MouseEvent &event); + + /** + * Override + */ + virtual void onMouseReleased(const MouseEvent &event); + + private: + + void drawSelection(); + + /*--------------------------------------*\ + |* Get *| + \*-------------------------------------*/ + + protected: + + cpu::DomaineEcran getCurrentDomaineSelection() const; + + /*--------------------------------------*\ + |* Attributs *| + \*-------------------------------------*/ + + private: + + //Inputs + cpu::DomaineEcran domaineSelection; + + //Tools + bool isSelectionEnable; + float ratio; //ration de la taille de la s�lection proportionnel � l'image + }; + } + +#endif +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/ +