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