CMomentaryButton.hpp

Go to the documentation of this file.
00001 #ifndef __CMomentaryButton__
00002 #define __CMomentaryButton__
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 CMomentaryButton : public CControl
00033             {
00035                 EXPONENT_CLASS_DECLARATION;
00038 //  ===========================================================================
00039 
00040             public:
00041 
00042 //  ===========================================================================
00043 
00051                 CMomentaryButton(IControlRoot *root, const long uniqueId, const CRect &area, IActionListener *listener = NULL);
00052 
00056                 virtual ~CMomentaryButton();
00057 
00058 //  ===========================================================================
00059                 
00065                 virtual void useCursorChange(const bool use = true) { m_cursorChange = use; }
00066 
00067 //  ===========================================================================
00068 
00073                 virtual void drawControl(CGraphics &graphics);
00074 
00075 //  ===========================================================================
00076 
00081                 virtual void handleLeftButtonDown(CMouseEvent &event);
00082 
00087                 virtual void handleLeftButtonUp(CMouseEvent &event);
00088 
00093                 virtual void handleMouseMovement(CMouseEvent &event);
00094 
00099                 virtual void handleDoubleClick(CMouseEvent &event);
00100 
00101 //  ===========================================================================
00102 
00107                 virtual void setDownImage(IImage *theImage);
00108 
00113                 virtual void setValue(const double value);
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 CMomentaryButton.hpp

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