]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/pColorBar.h
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / pPlotter / pColorBar.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26
27 #ifndef __pCOLOR_BAR__
28 #define __pCOLOR_BAR__
29
30 // -----------------------------------------------------------------------------------------------------------
31 // WX headers inclusion.
32 // For compilers that support precompilation, includes <wx/wx.h>.
33 // -----------------------------------------------------------------------------------------------------------
34 #include <wx/wxprec.h>
35 #ifdef __BORLANDC__
36 #pragma hdrstop
37 #endif
38 #ifndef WX_PRECOMP
39 #include <wx/wx.h>
40 #endif
41
42 //------------------------------------------------------------------------------------------------------------
43 // Includes
44 //------------------------------------------------------------------------------------------------------------
45 #include <iostream>
46 #include <vector>
47 #include <deque>
48
49 #include "marTypes.h"
50 #include "pColorPoint.h"
51 #include "LogicalColorBar.h"
52 //#include "DegradeRectangle.h"
53 #include "pFigure.h"
54 #include "wx/colordlg.h"
55
56
57 #define TRIANGLE 3
58 #define RECTANGLE 4
59 //in pixels
60 /*
61 * Attribute that determines the width of each color point
62 */
63 #define FIGURE_WIDTH 3
64
65 BEGIN_DECLARE_EVENT_TYPES()
66         DECLARE_EVENT_TYPE( wxEVT_ADDED_POINT, -1 )
67         DECLARE_EVENT_TYPE( wxEVT_REMOVED_POINT, -1 )
68         DECLARE_EVENT_TYPE( wxEVT_MOVED_POINT, -1 )
69         DECLARE_EVENT_TYPE( wxEVT_CHANGED_POINT, -1 )
70         DECLARE_EVENT_TYPE( wxEVT_ON_COLOR_BAR, -1 )
71 END_DECLARE_EVENT_TYPES()
72
73
74 //-------------------------------------------------------------------------------------------------------------
75 // Enum declarations
76 //-------------------------------------------------------------------------------------------------------------
77 /** Command IDs used by pColorPoint */
78 enum
79 {
80         cntID_ADD_COLOR_POINT = 6000,
81         cntID_DEL_COLOR_POINT,
82         cntID_CHANGE_COLOR_POINT,
83         cntID_DEGRADE_CONTROL,
84         cntID_CHANGE_FIGURE,
85         cntID_TRIANGLES_UP,
86         cntID_TRIANGLES_DOWN,
87         cntID_TRIANGLES_LEFT,
88         cntID_TRIANGLES_RIGHT,
89         cntID_RECTANGLES,
90 };
91
92 /** file pColorBar.h */
93 class creaMaracasVisu_EXPORT pColorBar :public  wxScrolledWindow{
94 public:
95
96         //------------------------------------------------------------------------------------------------------------
97         // Constructors & Destructors
98         //------------------------------------------------------------------------------------------------------------
99         /**
100         * Creates a colorBar instance 
101         * param *parent Container event listener window
102         * param _w Width of the color bar drawing area
103         * param _h Height of the color bar drawing area
104         * param _bar_orientation VERTICAL (false) or HORIZONTAL (true) direction to set 
105         */
106         pColorBar (wxWindow *parent, int _w, int _h, bool _bar_orientation);
107
108         ~pColorBar ();
109
110         //------------------------------------------------------------------------------------------------------------
111         // Color bar proccessed events methods
112         //------------------------------------------------------------------------------------------------------------
113         void OnSize( wxSizeEvent &WXUNUSED(event) );
114
115         /**
116         * Reacts to the mouse movement inside the color bar for moving the clicked color point in the x-axis.
117         * Informs the result of the handled event like a wxCommandEvent wxEVT_MOVED_POINT if a point was moved.
118         * param event The mouse actioned event
119         */
120         void onMouseMove ( wxMouseEvent& event );
121         /*
122         * Reacts to the event of drawing the bar and draws it
123         * param &WXUNUSED(event) The correspondig wxPaintEvent actioned event
124         */
125         void onPaint ( wxPaintEvent &WXUNUSED(event) );
126
127         /**
128         * Reacts to the cntID_ADD_COLOR_POINT wxCommandEvent and adds a color degrade point to the color bar.
129         * Informs the result of the handled event like a wxCommandEvent wxEVT_ADDED_POINT if the point was inserted succesfully.
130         * param & anEvent The wxCommandEvent actioned event 
131         */
132         void onAddColorPoint ( wxCommandEvent& anEvent );
133
134         /**
135         * Reacts to the cntID_DEL_POINT wxCommandEvent and deletes a color degrade point of the color bar.
136         * Informs the result of the handled event like a wxCommandEvent wxEVT_REMOVED_POINT if the point was succesfully removed.
137         * param & anEvent The wxCommandEvent actioned event 
138         */
139         void onDeleteColorPoint ( wxCommandEvent& anEvent );
140
141         /**
142         * Reacts to the cntID_CHANGE_COLOR_POINT wxCommandEvent and changes the assigned color to the selected color degrade point of the color bar.
143         * Informs the result of the handled event like a wxCommandEvent wxEVT_CHANGED_POINT if the point was succesfully removed.
144         * param & anEvent The wxCommandEvent actioned event 
145         */
146         void onChangeColourSelectedPoint ( wxCommandEvent& anEvent );
147
148         /**
149         * Reacts to the cntID_TRIANGLES_UP wxCommandEvent and changes the assigned figure to -triangles up- for the color points of the color bar.
150         * param & anEvent The wxCommandEvent actioned event 
151         */
152         void onTrianglesUp_Figure ( wxCommandEvent& anEvent  );
153         /**
154         * Reacts to the cntID_TRIANGLES_DOWN wxCommandEvent and changes the assigned figure to -triangles down- for the color points of the color bar.
155         * param & anEvent The wxCommandEvent actioned event 
156         */
157         void onTrianglesDown_Figure ( wxCommandEvent& anEvent  );
158         /**
159         * Reacts to the cntID_TRIANGLES_LEFT wxCommandEvent and changes the assigned figure to -triangles left- for the color points of the color bar.
160         * param & anEvent The wxCommandEvent actioned event 
161         */
162         void onTrianglesLeft_Figure ( wxCommandEvent& anEvent  );
163         /**
164         * Reacts to the cntID_TRIANGLES_RIGHT wxCommandEvent and changes the assigned figure to -triangles right- for the color points of the color bar.
165         * param & anEvent The wxCommandEvent actioned event 
166         */
167         void onTrianglesRight_Figure ( wxCommandEvent& anEvent  );
168         /**
169         * Reacts to the cntID_RECTANGLES wxCommandEvent and changes the assigned figure to -rectangles- for the color points of the color bar.
170         * param & anEvent The wxCommandEvent actioned event 
171         */
172         void onRectangles_Figure ( wxCommandEvent& anEvent  );
173
174         /**
175         * Reacts to the cntID_DEGRADE_CONTROL wxCommandEvent and turns on/off the degrade in the color bar.
176         * param & anEvent The wxCommandEvent actioned event 
177         */
178         void onDegradeControl ( wxCommandEvent& anEvent );
179
180         /**
181         * Reacts to the wxEVT_RIGHT_DCLICK wxMouseEvent and adds a color degrade point to the color bar.
182         * Informs the result of the handled event like a wxCommandEvent wxEVT_ADDED_POINT if the point was succesfully inserted.
183         * param & event The wxMouseEvent actioned event 
184         */
185         void onLeftButtonDClick (wxMouseEvent& event);
186
187         /**
188         * Shows the popup menu 
189         */
190         void onShowPopupMenu (wxMouseEvent& event);
191
192         
193         //------------------------------------------------------------------------------------------------------------
194         // Other methods
195         //------------------------------------------------------------------------------------------------------------
196
197         /**
198         * Set active state 
199         * param activeNow The new state
200         */
201         void setActiveStateTo (bool activeNow);
202         
203         /**
204         * Gets the active state of the bar
205         *  return activeState The actual state
206         */
207         bool isActive();
208
209         
210         /**
211         * Gets the real-x value to draw a vertical line
212         * return realX_vertical_line The real x value for the vertical line
213         */
214         int     getRealX_vertical_line();
215
216         /**
217         * Sets the real-x value to draw a vertical line
218         * param realX_vertical_line The new real x value for the vertical line
219         */
220         void setRealX_vertical_line(int newReal_x);
221
222
223         /**
224         * Method that reinitiates attributes of the color bar to the given points
225         * param minRealValue The minimum represented value (real value)
226         * param maxRealValue The maximum represented value (real value)
227         */
228         void reinitiateColorBar(double minRealValue, double maxRealValue);
229
230         /**
231         * Method that reinitiates  attributes of the color bar and set the points given by parameter
232         * param newPointsList Pointer to the list of the new points
233         */
234         void reinitiateColorBarTo (std::vector<pColorPoint *> pointsVector);
235
236         /**
237         *Method that sets a copy of the points of the color bar to the given pointer parameter
238         * param pointsList The list for getting the points
239         */
240         void getPointsListWithTemps (std::vector<pColorPoint*> &pointsVector);
241
242         /**
243         * Method that sets a copy of the points of the color bar to the given pointer parameter, and sets the default values to the needeed attributes, it doesn't
244         * includes the teporal points created
245         * param pointsVector The list for getting the points
246         */
247         void getAddedColorsPointsList (std::vector<pColorPoint*>& pointsVector);
248
249         /**
250         * Adds a color degrade point to the color bar.
251         * param xRealValue The real xValue of the point
252         * param theColour The assigned color for the point
253         * param temporalStart Indicates if the inserted point is the temporal startShowing point
254         * param temporalEnd Indicates if the inserted point is the temporal startShowing point
255         * return Returns true if the point was succesfully inserted.
256         */
257         bool addColorPoint (double xRealValue, wxColour theColour/*, bool temporalStart=false, bool temporalEnd=false*/);
258
259         /**
260         * Delets a color degrade point to the color bar.
261         * param xRealValue The real xValue of the point to delete       
262         * return Returns true if the point was succesfully inserted.
263         */
264         bool deleteColorPoint (double xRealValue);
265
266         /**
267         * Changes the color degrade point color value.
268         * Informs the result of the handled event like a wxCommandEvent wxEVT_CHANGED_COLOR_POINT if the point changed its colour.
269         * param clickedValue The x-coord pixel value of the point to which the color change interests   
270         * return Returns true if the color point was succesfully updated.
271         */
272         bool changeColor ( int clickedValue );
273
274         /**
275         * Repaints the color bar in direction mode of the orientation assigned 
276         * param createTempPoints True for creating temporal points for start and end when a visible range changes
277         */      
278         void repaintView (  );
279                         
280         /**
281         * Forces the refresh view of the color bar
282         */
283         void RefreshForce ();
284
285         void Refresh(bool eraseBackground = true, const wxRect* rect = NULL);
286         
287         /**
288         * Draws the color bar with its degrades
289         * param recentlyChangedOrientation indicates if the orientation has been changed before calling this method
290         */
291         void drawColorBar ( bool recentlyChangedOrientation);
292                 
293         /**
294         * Changes the figure of the color points according to the parameter
295         * param theFigure Is the corresponding number for identifying the figure 
296         * RECTANGLE = 4,TRIANGLE LEFT = -4, TRIANGLE RIGHT = -6, TRIANGLE UP = -8, TRIANGLE DOWN = -2
297         */
298         void changeFigure(int theFigure);
299         /**
300         * Changes the figure number of edges used for the degreade color points to the indicated one by parameter
301         * param figEdges Is the constant that represents the figure number of edges (TRIANGLE | RECTANGLE)
302         */
303         void changePointsFigure_Edges (int figEdges);
304         
305         /**
306         * Gets the constant that represents the figure number of edges used for the degreade color points
307         * return figureEdges Is the constant that represents the figure number of edges (TRIANGLE | RECTANGLE)
308         */
309         int getPointsFigure_Edges ();
310
311         /**
312         * Sets the height of the drawing bar area
313         * param _h The height to set
314         */
315         void setHeight (int _h);
316
317         /**
318         * Sets the height of the drawing bar area
319         * return _h The height to get
320         */
321         int getHeight();
322
323         /**
324         * Sets the width of the drawing bar area
325         * param _w The width to set
326         */
327         void setWidth (int _w);
328
329         /**
330         * Gets the width of the drawing bar area
331         * param width The width to get
332         */
333         int getWidth ();
334
335         /**
336         * Sets the height of the containing rectangle bar
337         * param _h The height to set
338         */
339         void setBarHeight (int _h);
340
341         /**
342         * Gets the height  of the containing rectangle bar
343         * return bar_height The height to get
344         */
345         int getBarHeight();
346
347         /**
348         * Sets the width of the containing rectangle bar
349         * param _w The width to set
350         */
351         void setBarWidth (int _w);
352
353         /**
354         * Gets the width of the containing rectangle bar
355         * return bar_width The width to get
356         */
357         int getBarWidth ();
358
359         /**
360         * Sets the orientation of the color bar
361         * param _orientation The orientation to set VERTICAL = false, HORIZONTAL = true
362         */
363         void setOrientation (bool _orientation);
364
365         /**
366         * Gets the orientation of the color bar
367         * return bar_orientation The bar orientation assigned
368         */
369         bool getOrientation ();
370
371         /**
372         * Sets the collection of color points
373         * param _points The new points to set, each one of data type pColorPoint ( xValue, wxColour_assigned)
374         */
375         void setPoints (std::vector<pColorPoint *> _points);
376
377         /**
378         * Gets the last clickedX pixel coord inside the bar.
379         * return clickedX The x-coord pixel value
380         */
381         int getClickedX();
382
383         /**
384         * Sets the last clickedX pixel coord inside the bar.
385         * param xCoordPixel The x-coord value to set
386         */
387         void setClickedX(int xCoordPixel);
388
389         /**
390         * Gets the last clickedY pixel coord inside the bar.
391         * return clickedY The y-coord pixel value
392         */
393         int getClickedY();
394
395         /**
396         * Sets the last clickedY pixel coord inside the bar.
397         * param yCoordPixel The y-coord pixel value to set
398         */
399         void setClickedY(int yCoordPixel);
400
401         /**
402         * Gets the real x value for a givex x-pixel value using the rule real_x = (x_pixel * (maxX_represented_Tshow - minXRepresented) ) / bar_width
403         * param x_Pixel The pixel value to convert into real value with respect to the x scale
404         * return realX The real-x value corresponding to the xPixel
405         */
406         double convertToRealValue ( int x_Pixel );
407
408         /**
409         * Gets the x-pixel value for a given x_real value using the rule x_pixel = (x_real * bar_width)/(maxX_represented_Tshow - minX_represented_Tshow)
410         * param x_Pixel The pixel value to convert into real value with respect to the x scale
411         * return realX The real-x value corresponding to the xPixel
412         */
413         int convertToPixelValue ( double x_real );
414
415         /**
416         * Gets the selected color and updates the state of the okSelectedColor
417         * return selectedColor Is the selected rbg color
418         */
419         wxColour getSelectedColour();   
420
421         /**
422         * Sets the represented minimum and maximunm values
423         * param minRealValue The minimum represented value (real value)
424         * param maxRealValue The maximum represented value (real value)
425         */
426         void setRepresentedValues ( double minRealValue, double maxRealValue);
427
428         /**
429         * Gets the data of the last point moving
430         * return pointData Is a pColorPoint with the data of las moved color
431         */
432         pColorPoint * getLastMovedColorPoint();
433
434         /**
435         * Sets the gap values for the color bar bitmap
436         * param gap_x Gap in x
437         * param gap_y Gap in y
438         */
439         void setGapValues (int gap_x, int gap_y);
440
441         /**
442         * Sets the degrade state of the color bar
443         * param newState The degrade stare to set 
444         */
445         void setDegradeState(bool newState);
446
447         /*
448         * Sets the visible range of the bar and repaints the bar according to it, the min value must be less than the max value.
449         * param minToShow Is the minimum value to show in the colorbar
450         * param maxToShow Is the maximum value to show in the colorbar
451         */
452         void setVisibleRange(int minToShow, int maxToShow);
453
454         /**
455         * Gets the degrade state of the color bar
456         * return doingDegrade is the actual degrade state of the bar
457         */
458         bool getDegradeState();
459
460         /**
461         * Sets the state of static or not for the limit color points
462         * pamar areStatic Is the state to set for the limits
463         */
464         void setStaticLimitsTo(bool areStatic);
465
466         /**
467         * Gets the state of static or not for the limit color points
468         * return staticLimits Is the state for limits
469         */
470         bool getStaticLimits();
471
472         /**
473         * Sets the device start drawing left-superior (pixel) start point and draws automatically the color bar
474         * param deviceStart_x Pixel start for x-coord
475         * param deviceStart_y Pixel start for y-coord
476         */
477         void setDeviceBlitStart ( wxCoord deviceStart_x, wxCoord deviceStart_y );
478
479         /**
480         * Clears the temporal color points of the list
481         */
482         void clearTemporalColors();
483
484         /**
485         * Gets the device value form the end of this panel to the end of the drawing area in the device in pixels
486         * return deviceEndMargin The value asigned to the right margin
487         */
488         int     getDeviceEndX();
489         
490
491         /**
492         * Sets the new device (deviceEndMargin) value form the end of this panel to the end of the drawing area in the device
493         * param newDeviceEnd_pixels The new pixel value to asign to the right margin in pixels
494         */
495         void setDeviceEndX(int newDeviceEnd_pixels);
496
497
498         /**
499         * Sets the new device (deviceEndMargin) value form the end of this panel to the end of the drawing area in the device
500         * param newDeviceEnd_pixels The new pixel value to asign to the right(horizontal view), underneath(vertical view) margin in pixels
501         */
502         void setDeviceEndMargin(int newDeviceEnd_pixels);
503         
504         /**
505         * Method that creates and send the given id-event to the event handler
506         * param theEventType Is the event id type identification for generating the event
507         */
508         void createAndSendEvent(WXTYPE theEventType);
509
510
511         /**
512         * Returns the number of points that the bar color has
513         * return
514         */
515         int getColorPointsSize();
516
517         /**
518          Get the RGB values of the color point that is in the
519          index given
520         */
521         void getDataAt(int index, double& x,int& red,int& green,int& blue);
522         
523
524         /**
525         * Sets the guide line color
526         * param theNwGuideLineColor The color to set to the guideLineColor
527         */
528         void setGuideLineColour(wxColour theNwGuideLineColor);
529
530         /**
531         * Gets the guide line color
532         * return guideLineColor The color of the guideLine
533         */
534         wxColour getGuideLineColour();
535
536         /**
537         * Sets the background color
538         * param theNwBackColor The color to set to the colourParent
539         */
540         void setBackGroundColour(wxColour theNwBackColor);
541
542         /**
543         * Gets the background color
544         * return colourParent The color of the background
545         */
546         wxColour getBackGroundColour();
547
548         /**
549         * Gets the min value of the color bar
550         */
551         double  getMinValue();
552
553         /**
554         * Gets the max value of the color bar
555         */
556         double  getMaxValue();
557
558         /**
559         * Updates the colors of the first nonTemporal point in the list and the last nonTemporal point 
560         * That logically corresponds always to the the first and last nodes of the color bar
561         */
562         void updateExtremeColors();
563                 
564         void onLeftClicDown(wxMouseEvent& event );
565
566         void onLeftClickUp(wxMouseEvent& event );
567
568         void updatePointsToDraw();
569
570         //------------------------------------------------------------------------------------------------------------
571         // Attributes declaration
572         //------------------------------------------------------------------------------------------------------------
573         
574 private:
575
576         /*
577         *
578         */
579         bool acceptedClick;
580
581         /*
582         * Represents the logical bar instance
583         */
584         LogicalColorBar * _logicalBar;
585         
586         /*
587         * Represents the margin gap on x
588         */
589         int gapX;
590         
591         /*
592         * Represents the margin gap on x
593         */
594         int gapY;
595         /*
596         * Represents the height of the color bar drawing area
597         */
598         int                     height;
599         /*
600         * Represents the width of the color bar drawing area
601         */
602         int                     width;
603
604         /*
605         * Represents the height  of the bar
606         */
607         int                     bar_height;
608
609         /*
610         * Represents the width of the bar
611         */
612         int                     bar_width;
613
614         /*
615         * Represents the collection of degrade definition points 
616         */
617         std::deque<pColorPoint *> showedColorPoints;
618         
619         /* 
620         * The orientation of the rectangule is true when is horizontal, false for vertical
621         */
622         //bool          bar_orientation;
623
624         /*
625         * The points figure orientation UP, DOWN, LEFT, or RIGTH
626         */ 
627         int                     points_orientation;
628
629         /*
630         * The minimum represented real value used for calculating the scaling for point by the rule real_x = (x_pixel * (maxX_represented_Tshow_Tshow - minX_represented_Tshow) ) / bar_width
631         */
632         int                     minX_represented_Tshow;
633
634         /**
635         * The maximum represented real value used for calculating the scaling for point by the rule real_x = (x_pixel * (maxX_represented_Tshow_Tshow - minXRepresented_Tshow) ) / bar_width
636         */
637         int                     maxX_represented_Tshow;
638
639         /**
640         * The minimum represented real value used for calculating the scaling for point by the rule real_x = (x_pixel * (maxX_represented_Tshow_Tshow - minX_represented_Tshow) ) / bar_width
641         */
642         int                     temporalMinXToShow;
643
644         /*
645         * The maximum represented real value used for calculating the scaling for point by the rule real_x = (x_pixel * (maxX_represented_Tshow_Tshow - minXRepresented_Tshow) ) / bar_width
646         */
647         int                     temporalMaxXToShow;
648         
649         /**
650         * Indicates the first node to show 
651         */
652         pColorPoint *   startNode_show;
653
654         /**
655         * Indicates the last node to show
656         */
657         pColorPoint *   lastNode_show;
658         
659         /**
660         *  Indicates the amount of temporal initial color points
661         */
662     int accumTemporalPoints;
663
664         /**
665         * Represents the state of viewing a range
666         */
667         bool viewingRange;
668
669         /**
670         * Is the constant that represents the figure number of edges (TRIANGLE | RECTANGLE)
671         */
672         pFigure*        figure;
673         /**
674         * Represents the last clickedX coord inside the bar.
675         */
676         int                     clickedX;
677
678         /*
679         * Represents the last clickedY coord inside the bar.
680         */
681         int                     clickedY;
682
683         /**
684         * Represents the movind index of the last moving point in the colorPoints list
685         */
686         int                     movingPointIndex;
687
688         /**
689         * Indicates if in the last colour selection the ok button was clicked
690         */
691         bool            okSelectedColor;
692
693         /**
694         * Represents the statc or movable state of limit start and end color points, default value true for static
695         */
696         bool            staticLimits;
697
698         /**
699         * Indicates the last node moving in the coloPoints list
700         */
701         pColorPoint *   movingNodePoint;
702
703 //      pDegradeRectangle *                     degrade;
704         
705         /**
706         * Is the bitmap for the bar color
707         */
708         wxBitmap *                                      colorBar_Bitmap;
709         /**
710         * Is the bitmap of the information associated to the bar color
711         */
712         wxBitmap *                                      information_Bitmap;
713         /**
714         * Represents the state of doing or not the degrade in the bar (default value true for doing degrade)
715         */
716         bool                                            doingDegrade;
717
718         /**
719         * Represents that the minimum value for the visible range has been found in the original color points
720         */
721         bool                                            minFound;
722
723         /**
724         * Represents that the maximum value for the visible range has been found in the original color points
725         */
726         bool                                            maxFound;
727
728         /**
729         * X-Coord for left-superior device visible drawing
730         */
731         wxCoord                                         deviceStart_x;  
732
733         /**
734         * Y-Coord for left-superior device visible drawing
735         */
736         wxCoord                                         deviceStart_y;
737
738         /*
739         * X-Coord for left-superior device margin, important for horizontal view
740         */
741         wxCoord                                         deviceEndMargin;        
742
743         /**
744         * Y-Coord for left-superior device margin, important for vertical view
745         */
746         wxCoord                                         deviceEnd_y;
747         /**
748         * Represents the active state of the bar
749         */
750         bool                                            activeState;
751
752         int                                             avaliablePointToMove;
753
754         /**
755         * Represents the real-x value to draw a vertical line
756         */
757         int                                                     realX_vertical_line;
758
759     /**
760         * Represents the color of the dot-line use as guides. The default color is RED. 
761         */
762         wxColour        guideLineColor;
763
764          /*
765         * Represents the color of the backGround. Default color is the parent color. 
766         */
767         wxColour        colourParent;
768
769         /*
770         * The color bar pop menu
771         */
772         wxMenu c_popmenu; 
773         /*
774         * The figure changes submenu
775         */
776         wxMenu * changesMenu;
777         
778         
779         DECLARE_CLASS(pColorBar)
780         // any class wishing to process wxWindows events must use this macro
781         DECLARE_EVENT_TABLE()
782 };
783
784
785 #endif
786
787