CCursor.hpp

Go to the documentation of this file.
00001 #ifndef __CCursor__
00002 #define __CCursor__
00003 
00004 #include <Basics/CCountedObject.hpp>
00005 using Exponent::Basics::CCountedObject;
00006 
00007 //  ===========================================================================
00008 
00009 namespace Exponent
00010 {
00011     namespace GUI
00012     {
00013         namespace Windowing
00014         {
00032             class CCursor : public CCountedObject
00033             {
00035                 EXPONENT_CLASS_DECLARATION;
00038 //  ===========================================================================
00039 
00040             public:
00041 
00042 //  ===========================================================================
00043 
00044                 static CCursor CCURSOR_ARROW;       
00045                 static CCursor CCURSOR_HAND;        
00046                 static CCursor CCURSOR_IBEAM;       
00047                 static CCursor CCURSOR_RESIZE;      
00048                 static CCursor CCURSOR_HOUR;        
00049                 static CCursor CCURSOR_UP_DOWN;     
00050                 static CCursor CCURSOR_LEFT_RIGHT;  
00051                 static CCursor CCURSOR_SIZE_ALL;    
00053 //  ===========================================================================
00054 
00059                 enum EMouseCursor
00060                 {
00061                     e_arrowCursor = 0,              
00062                     e_handCursor,                   
00063                     e_hourGlassCursor,              
00064                     e_upDownArrowCursor,            
00065                     e_leftRightArrowCursor,         
00066                     e_iBeamCursor,                  
00067                     e_resizeCursor,                 
00068                     e_sizeAllCursor,                
00070                     e_numberOfCursors,              
00071                 };
00072 
00073 //  ===========================================================================
00074 
00079                 CCursor(EMouseCursor cursor = e_arrowCursor);
00080 
00082                 #ifdef WIN32
00083 
00089                     CCursor(HINSTANCE instance, const long resourceId);
00091                 #else
00092 
00097                     CCursor(const long resourceId);
00099                 #endif
00100 
00105                 virtual ~CCursor();
00106 
00107 //  ===========================================================================
00108 
00110                 #ifdef WIN32
00111 
00116                     HCURSOR getCursor() const;
00117                     
00123                     void setCursor(HINSTANCE instance, const long resourceId);
00124 
00130                     void setAnimatedCursor(HINSTANCE instance, const unsigned long resourceId);
00132                 #else
00133 
00138                     CCrsrHandle getCursor() const;
00139 
00144                     EMouseCursor getCursorId() const { return m_cursorId; }
00145 
00150                     void setCursor(const long resourceId);
00152                 #endif
00153 
00155 //  ===========================================================================
00156 
00161                 void setCursor(EMouseCursor cursor);
00162 
00163 //  ===========================================================================
00164 
00168                 void showCursor();
00169 
00173                 void hideCursor();
00174 
00175 //  ===========================================================================
00176 
00177             protected:
00178 
00179 //  ===========================================================================
00180 
00182                 #ifdef WIN32
00183 
00184                     HCURSOR m_cursor;               
00186                 #else
00187 
00188                     EMouseCursor m_cursorId;        
00189                     CCrsrHandle m_cursor;           
00191                 #endif
00192 
00193             };
00194         }
00195     }
00196 }
00197 #endif  // End of CCursor.hpp

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