pFigure.h

Go to the documentation of this file.
00001 #ifndef __pFIGURE__
00002 #define __pFIGURE__
00003 
00004 // ----------------------------------------------------------------------------
00005 // WX headers inclusion.
00006 // For compilers that support precompilation, includes <wx/wx.h>.
00007 // ----------------------------------------------------------------------------
00008 #include <wx/wxprec.h>
00009 #ifdef __BORLANDC__
00010 #pragma hdrstop
00011 #endif
00012 #ifndef WX_PRECOMP
00013 #include <wx/wx.h>
00014 #endif
00015 
00017 class pFigure :public  wxObject{
00018 
00019 public:
00020 
00021         //------------------------------------------------------------------------------------------------------------
00022         // Constructors & Destructors
00023         //------------------------------------------------------------------------------------------------------------
00032         pFigure(int edges_n, int _w, int _h,int _orientation, bool bar_orientation);
00033         ~pFigure();
00034 
00035         //------------------------------------------------------------------------------------------------------------
00036         // Methods
00037         //------------------------------------------------------------------------------------------------------------
00038 
00043         int getNumberEdges();
00044 
00049         void setNumberEdges(int n_edges);
00050         
00056         void getVertexPoints(wxPoint thePoints[]);
00057 
00062         void setVertexPoints(wxPoint * n_points);
00063 
00064         /*
00065         * Sets the heigth of the figure
00066         * @param _h The heigth to set
00067         */
00068         void setHeigth(int _h);
00069 
00070         /*
00071         * Gets the heigth of the figure
00072         * @retval heigth The heigth of the figure
00073         */
00074         int getHeigth();
00075 
00076         /*
00077         * Sets the width of the figure
00078         * @param _w The width to set
00079         */
00080         void setWidth(int _w);
00081 
00082         /*
00083         * Gets the width of the figure
00084         * @retval width The width of the figure
00085         */
00086         int getWidth();
00087 
00088         /*
00089         * Indicates if a pixel point is inside the figure
00090         * @param xFig_PixelPoint The known reference point inside the figure
00091         * @param xPixel The x-pixel coord asking for
00092         * @retval Returns true if the point is inside
00093         */
00094         bool isPointInside(int xFig_PixelPoint, int xPixel);
00095 
00096         /*
00097         * Sets the bar orientation 
00098         * @ bar_orientation The orientation to set (true for horizontal, false for vertical)
00099         */
00100         void setBarOrientation(bool bar_orientation);
00101 
00102         /*
00103         * Sets the bar orientation used for triangles
00104         * @ bar_orientation The orientation to set (LEFT = -4, RIGHT = -6, UP = -8, DOWN = -2)
00105         */
00106         void setFigureOrientation(int fig_orientation);
00107         
00108         //------------------------------------------------------------------------------------------------------------
00109         // Constants
00110         //------------------------------------------------------------------------------------------------------------
00111         
00112         enum
00113         {
00114                 TRIANGLE = 3,
00115                 RECTANGLE = 4,
00116                 LEFT = -4,
00117                 RIGHT = -6,
00118                 UP = -8,
00119                 DOWN = -2,
00120         };
00121 
00122 private:
00123 
00124         //------------------------------------------------------------------------------------------------------------
00125         // Attributes
00126         //------------------------------------------------------------------------------------------------------------
00127 
00128         /*
00129         * Represents the heigth of the figure
00130         */
00131         int heigth;
00132 
00133         /*
00134         * Represents the width of the figure
00135         */
00136         int width;
00137 
00138         /*
00139         * Represents the edges of the figure
00140         */
00141         int edges;
00142 
00146         int orientation;
00147 
00148         /*
00149         * Is the bar orientation (true for HORIZONTAL, false VERTICAL)
00150         */
00151         bool barOrientation;
00152 
00153         /*
00154         * Represents the vertex points distribution of the figure in pixels scale
00155         */
00156         wxPoint *v_points;
00157 
00158 DECLARE_CLASS(pColorBar)
00159 
00160 };
00161 #endif
00162 
00163 

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1