CLatchingButton.hpp

Go to the documentation of this file.
00001 #ifndef __CLatchingButton__
00002 #define __CLatchingButton__
00003 
00004 #include "CControl.hpp"
00005 using Exponent::GUI::Controls::CControl;
00006 
00007 //  ===========================================================================
00008 
00009 namespace Exponent
00010 {
00011     namespace GUI
00012     {
00013         namespace Controls
00014         {
00032             class CLatchingButton : public CControl
00033             {
00035                 EXPONENT_CLASS_DECLARATION;
00038 //  ===========================================================================
00039         
00040             public:
00041 
00042 //  ===========================================================================
00043 
00051                 CLatchingButton(IControlRoot *root, const long uniqueId, const CRect &area, IActionListener *listener = NULL);
00052 
00056                 virtual ~CLatchingButton();
00057 
00058 //  ===========================================================================
00059 
00064                 virtual void setValue(const double value);
00065 
00070                 virtual bool isOn() const { return m_state; }
00071                 
00077                 virtual void useCursorChange(const bool use = true) { m_cursorChange = use; }
00078 
00079 //  ===========================================================================
00080 
00085                 virtual void drawControl(CGraphics &graphics);
00086 
00087 //  ===========================================================================
00088 
00093                 virtual void handleLeftButtonDown(CMouseEvent &event);
00094 
00099                 virtual void handleLeftButtonUp(CMouseEvent &event);
00100 
00105                 virtual void handleMouseMovement(CMouseEvent &event);
00106 
00107 //  ===========================================================================
00108 
00113                 virtual void setDownImage(IImage *theImage);
00114 
00119                 void setLabelText(const CString &text) { m_labelText = text; }
00120 
00121 //  ===========================================================================
00122 
00123             protected:
00124 
00125 //  ===========================================================================
00126 
00127                 IImage *m_downImage;    
00128                 bool m_state;           
00129                 bool m_cursorChange;    
00130                 CString m_labelText;    
00131             };
00132         }
00133     }
00134 }
00135 #endif  // End of CLatchingButton.hpp

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