]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/LogicalColorBar.h
ced5500e87b195e688d8d0aa8961df257e549056
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / pPlotter / LogicalColorBar.h
1 #ifndef __LOGICAL_COLOR_BAR__
2 #define __LOGICAL_COLOR_BAR__
3
4 // -----------------------------------------------------------------------------------------------------------
5 // WX headers inclusion.
6 // For compilers that support precompilation, includes <wx/wx.h>.
7 // -----------------------------------------------------------------------------------------------------------
8 #include <wx/wxprec.h>
9 #ifdef __BORLANDC__
10 #pragma hdrstop
11 #endif
12 #ifndef WX_PRECOMP
13 #include <wx/wx.h>
14 #endif
15
16
17 //------------------------------------------------------------------------------------------------------------
18 // Includes
19 //------------------------------------------------------------------------------------------------------------
20
21 #include <vector>
22 #include <math.h>
23 #include <iostream>
24 #include <string>
25 #include <deque>
26 #include <vector>
27
28 #include "pColorPoint.h"
29
30 /** file LogicalColorBar.h */
31 class LogicalColorBar {
32
33 public:
34
35         //------------------------------------------------------------------------------------------------------------
36         // Constructors & Destructors
37         //------------------------------------------------------------------------------------------------------------
38
39         LogicalColorBar ();
40
41         ~LogicalColorBar();
42
43         //------------------------------------------------------------------------------------------------------------
44         // Methods
45         //------------------------------------------------------------------------------------------------------------
46
47         /*
48         * Gets the first point
49         */
50         pColorPoint * getFirstPoint();
51
52         /*
53         * Gets the last point
54         */
55         pColorPoint * getLastPoint();
56
57         double getMinValue();
58
59         void  setMinValue(double valueMin);
60
61         double getMaxValue();
62
63         void setMaxValue(double valueMax);
64
65         bool getOrientation();
66
67         void setOrientation(bool orientation);
68
69         bool addColorPoint(double xRealValue, wxColour theColour);
70
71         bool deleteColorPoint ( double  valErase );
72
73         //void getListIndexRangeLimits( int &startIndex, int &endIndex, int startSearched, int endSearched );
74         
75         void getPointersToRangeLimits( std::deque<pColorPoint *> &theInputQueue, int &startIndex, int &endIndex, int startSearched, int endSearched );
76
77         pColorPoint * getLastAddedPoint();
78
79         pColorPoint * getPointAtIndex(int anIndex);
80
81         int getCount();
82
83         void getDataAt(int index, double &x,int &red,int &green,int &blue);
84
85         void clearPoints();
86
87         double getMinAddedValue();
88
89         double getMaxAddedValue();
90
91         void changeColor(double pointValue, wxColour theNewColor);
92
93         bool setColorPoints (std::vector<pColorPoint *> pointsVector);
94 //      
95 //private: 
96
97         bool bar_orientation;
98
99         //wxList        logicColorPoints;
100         std::vector<pColorPoint * > logicColorPoints;
101
102         pColorPoint * lastAddedPoint;
103
104         double minValue;
105
106         double maxValue;
107
108         //DECLARE_CLASS(LogicalColorBar)
109 };      
110 #endif 
111
112
113