CMouse.hpp

Go to the documentation of this file.
00001 #ifndef __CMouse__
00002 #define __CMouse__
00003 
00004 #include <MathTools/CPoint.hpp>
00005 #include "CCursor.hpp"
00006 #include "SWindowHandle.hpp"
00007 
00008 //  ===========================================================================
00009 
00010 using Exponent::MathTools::CPoint;
00011 using Exponent::GUI::Windowing::CCursor;
00012 using Exponent::GUI::Windowing::SWindowHandle;
00013 
00014 //  ===========================================================================
00015 
00016 namespace Exponent
00017 {
00018     namespace GUI
00019     {
00020         namespace Windowing
00021         {
00039             class CMouse
00040             {
00041             public:
00042 
00043 //  ===========================================================================
00044 
00050                 CMouse(const CPoint &point, CCursor *cursor = &CCursor::CCURSOR_ARROW);
00051 
00053                 #ifdef WIN32
00054 
00060                     CMouse(LPARAM lParam, CCursor *cursor = &CCursor::CCURSOR_ARROW);
00062                 #endif
00063 
00068                 CMouse();
00069 
00073                 virtual ~CMouse();
00074 
00075 //  ===========================================================================
00076 
00081                 void setCursor(CCursor *cursor = &CCursor::CCURSOR_ARROW);
00082 
00087                 CCursor *getCursor() const { return m_cursor; }
00088 
00089 //  ===========================================================================
00090 
00095                 void setPosition(const CPoint &point);
00096 
00098                 #ifdef WIN32
00099 
00104                     void setPosition(LPARAM lParam);
00106                 #endif
00107 
00113                 const CPoint &getPosition() const { return m_position; }
00114 
00119                 long getXPosition() const { return m_position.getXPosition(); }
00120 
00125                 long getYPosition() const { return m_position.getYPosition(); }
00126 
00127 //  ===========================================================================
00128 
00133                 void capture(SWindowHandle *windowHandle) const;
00134 
00140                 bool isCaptured(SWindowHandle *windowHandle) const;
00141 
00145                 void release() const;
00146 
00151                 bool isCaptured() const;
00152 
00153 //  ===========================================================================
00154 
00155             protected:
00156 
00157 //  ===========================================================================
00158 
00159                 CPoint m_position;      
00160                 CCursor *m_cursor;      
00161             };
00162         }
00163     }
00164 }
00165 #endif  // End of CCursor.hpp

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