- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- File List
- File Members

# CXYPad.hpp

Go to the documentation of this file.

    00001 #ifndef __CXYPad__
    00002 #define __CXYPad__
    00003
    00004 #include "CControl.hpp"
    00005 #include "CRolloverButton.hpp"
    00006 #include <MathTools/CBounds.hpp>
    00007
    00008 //  ===========================================================================
    00009
    00010 using Exponent::GUI::Controls::CControl;
    00011 using Exponent::GUI::Controls::CRolloverButton;
    00012 using Exponent::MathTools::CBounds;
    00013
    00014 //  ===========================================================================
    00015
    00016 namespace Exponent
    00017 {
    00018     namespace GUI
    00019     {
    00020         namespace Controls
    00021         {
    00040             class CXYPad : public CControl
    00041             {
    00043                 EXPONENT_CLASS_DECLARATION;
    00046 //  ===========================================================================
    00047
    00048             public:
    00049
    00057                 CXYPad(IControlRoot *root, const long uniqueId, const CRect &area, IActionListener *listener = NULL);
    00058
    00062                 virtual ~CXYPad();
    00063
    00064 //  ===========================================================================
    00065
    00070                 virtual void handleLeftButtonDown(CMouseEvent &event);
    00071
    00076                 virtual void handleLeftButtonUp(CMouseEvent &event);
    00077
    00082                 virtual void handleDoubleClick(CMouseEvent &event);
    00083
    00088                 virtual void handleMouseMovement(CMouseEvent &event);
    00089
    00094                 virtual void drawControl(CGraphics &graphics);
    00095
    00096 //  ===========================================================================
    00097
    00102                 virtual double getXValue() { return m_xValue; }
    00103
    00108                 virtual double getYValue() { return m_yValue; }
    00109
    00110 //  ===========================================================================
    00111
    00116                 virtual void setXValue(const double xValue);
    00117
    00122                 virtual void setYValue(const double yValue);
    00123
    00130                 virtual void setHandleImage(IImage *handleImage, IImage *rolloverHandleImage, IImage *downHandleImage);
    00131
    00140                 virtual void setColours(CAlphaColour frameColour, CAlphaColour backgroundColour, CAlphaColour handleColour, CAlphaColour handleOverColour, CAlphaColour handleDownColour);
    00141
    00142 //  ===========================================================================
    00143
    00144             protected:
    00145
    00146 //  ===========================================================================
    00147
    00152                 virtual void checkAndLock(const CPoint &point);
    00153
    00154 //  ===========================================================================
    00155
    00156                 CRect m_handleArea;
    00157                 CPoint m_grabOffset;
    00158                 CRolloverButton::ERolloverState m_state;
    00160                 bool m_isDragging;
    00161                 double m_verticalRange;
    00162                 double m_horizontalRange;
    00164                 double m_xValue;
    00165                 double m_yValue;
    00167                 IImage *m_handleImage;
    00168                 IImage *m_handleRolloverImage;
    00169                 IImage *m_handleDownImage;
    00171                 CAlphaColour m_handleColour;
    00172                 CAlphaColour m_handleOverColour;
    00173                 CAlphaColour m_handleDownColour;
    00174             };
    00175         }
    00176     }
    00177 }
    00178 #endif  // End of CXYPad.hpp