Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / API_Bilat_Image_GL_Cuda / INC / gpu / GLImageSelections_GPU.h
1 #ifndef GLIMAGE_SELECTIONS_GPU_H
2 #define GLIMAGE_SELECTIONS_GPU_H
3
4 #include "envGLImageCudas.h"
5 #include "GLImages_GPU.h"
6 #include "DomaineEcran_GPU.h"
7
8 /*----------------------------------------------------------------------*\
9 |* Declaration *|
10 \*---------------------------------------------------------------------*/
11
12 /*--------------------------------------*\
13 |* Public *|
14 \*-------------------------------------*/
15
16 namespace gpu
17 {
18 class CBI_GLIMAGE_CUDA GLImageSelections: public gpu::GLImages
19 {
20
21 /*--------------------------------------*\
22 |* Constructor *|
23 \*-------------------------------------*/
24
25 public:
26
27 GLImageSelections(gpu::ImageMOOs_A* ptrImageCudaMOO, bool isAnimationEnable = true);
28
29 virtual ~GLImageSelections();
30
31 /*--------------------------------------*\
32 |* Methodes *|
33 \*-------------------------------------*/
34
35 public:
36
37 /**
38 * Override
39 */
40 virtual void display(Panel_A &panel);
41
42 /**
43 * Override
44 */
45 virtual void onMouseMoved(const MouseEvent &event);
46
47 /**
48 * Override
49 */
50 virtual void onMousePressed(const MouseEvent &event);
51
52 /**
53 * Override
54 */
55 virtual void onMouseReleased(const MouseEvent &event);
56
57 protected:
58
59 /**
60 * Ovveride
61 * then selection is performed with the mouse, 3 arguments :
62 * 1) selected domaine in frame coordinate
63 * 2) dx is the screen width in pixLa clel
64 * 3) dy is the screen height in pixel
65 **/
66 virtual void selectionPerformed(const gpu::DomaineEcran& domaineEcran, int dx, int dy);
67
68 /*--------------------------------------*\
69 |* Get *|
70 \*-------------------------------------*/
71
72 gpu::DomaineEcran getCurrentDomaineSelection() const;
73
74 private:
75 void drawSelection();
76
77 /*-------------------------------------*\
78 |* Attributs *|
79 \*------------------------------------*/
80 private:
81
82 //Input
83 gpu::DomaineEcran domaineSelection;
84
85 //Tools
86 bool isSelectionEnable;
87 float ratio; //ration de la taille de la selection proportionnel � l'image
88 };
89 }
90
91 #endif
92
93 /*----------------------------------------------------------------------*\
94 |* End *|
95 \*---------------------------------------------------------------------*/
96