CKnob.hpp

Go to the documentation of this file.
00001 #ifndef __CKnob__
00002 #define __CKnob__
00003 
00004 #include "CAnimation.hpp"
00005 #include <MathTools/CBounds.hpp>
00006 
00007 //  ===========================================================================
00008 
00009 using Exponent::GUI::Controls::CAnimation;
00010 using Exponent::MathTools::CBounds;
00011 
00012 //  ===========================================================================
00013 
00014 namespace Exponent
00015 {
00016     namespace GUI
00017     {
00018         namespace Controls
00019         {
00037             class CKnob : public CAnimation
00038             {
00040                 EXPONENT_CLASS_DECLARATION;
00043 //  ===========================================================================
00044         
00045             public:
00046 
00047 //  ===========================================================================
00048 
00056                 CKnob(IControlRoot *root, const long uniqueId, const CRect &area, IActionListener *listener = NULL);
00057 
00061                 virtual ~CKnob();
00062 
00063 //  ===========================================================================
00064 
00069                 virtual void handleLeftButtonDown(CMouseEvent &event);
00070 
00075                 virtual void handleLeftButtonUp(CMouseEvent &event);
00076 
00081                 virtual void handleDoubleClick(CMouseEvent &event);
00082 
00087                 virtual void handleMouseScroll(CMouseEvent &event);
00088 
00093                 virtual void handleMouseMovement(CMouseEvent &event);
00094 
00095 //  ===========================================================================
00096 
00101                 virtual void setDefaultValue(const double value) { m_defaultValue = value; }
00102 
00107                 virtual void setDeltaCoefficient(const double coefficient) { m_coefficient = coefficient; }
00108 
00109 //  ===========================================================================
00110 
00111             protected:
00112 
00113 //  ===========================================================================
00114 
00115                 double m_defaultValue;              
00116                 double m_dragStartValue;            
00117                 double m_coefficient;               
00118                 bool m_drag;                        
00119                 CPoint m_dragStartPoint;            
00120             };
00121         }
00122     }
00123 }
00124 #endif  // End of CKnob.hpp

Infinity API - CKnob.hpp Source File generated on 7 Mar 2007