Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATGUI/CATCursor.h Source File

CATCursor.h

Go to the documentation of this file.
00001 /// \file  CATCursor.h
00002 /// \brief Cursor class for GUI
00003 /// \ingroup CATGUI
00004 ///
00005 /// Copyright (c) 2003-2008 by Michael Ellison.
00006 /// See COPYING.txt for the \ref gaslicense License (MIT License).
00007 ///
00008 // $Author: mikeellison $
00009 // $Date: 2008-01-23 01:43:25 -0600 (Wed, 23 Jan 2008) $
00010 // $Revision:   $
00011 // $NoKeywords: $
00012 
00013 #ifndef _CATCursor_H_
00014 #define _CATCursor_H_
00015 
00016 #include "CATInternal.h"
00017 
00018 /// Cursor types
00019 enum CATCURSORTYPE
00020 {
00021     CATCURSOR_HIDE,
00022     CATCURSOR_NOACTION,
00023     CATCURSOR_ARROW,
00024     CATCURSOR_WAIT,
00025     CATCURSOR_TEXT,
00026     CATCURSOR_HAND,
00027     CATCURSOR_LEFTRIGHT,
00028     CATCURSOR_TOPBOTTOM,
00029     CATCURSOR_SIZE,
00030     CATCURSOR_MOVE,
00031     //------------
00032     CATCURSOR_NUMCURSORS
00033 };
00034 
00035 /// \class CATCursor
00036 /// \brief Cursor class for GUI
00037 /// \ingroup CATGUI
00038 ///
00039 /// Right now, this mainly just a shell for cursor types. 
00040 /// Eventually, this should be expanded to include custom cursors from
00041 /// skins and the like.
00042 class CATCursor
00043 {
00044 public:
00045     /// CATCursor constructor - defaults to using the standard
00046     /// arrow cursor.
00047     CATCursor(CATCURSORTYPE type = CATCURSOR_ARROW);
00048 
00049     /// CATCursor() destructor
00050     virtual ~CATCursor();
00051 
00052     /// SetType() sets the type of cursor to be used.
00053     ///
00054     /// \param type - The identifier for the cursor (see CATCURSORTYPE)
00055     /// \sa CATCURSORTYPE
00056     void           SetType(CATCURSORTYPE type);
00057 
00058     /// GetType() retrieves the cursor type.
00059     /// \sa CATCURSORTYPE
00060     CATCURSORTYPE   GetType();
00061 
00062     /// GetOSCursor() retrieves an OS-specific handle for the
00063     /// cursor.
00064     ///
00065     /// For Windows, this will be an HCURSOR.  
00066     ///
00067     /// Currently, no release is required - the class should
00068     /// delete any created cursors on destruction if necessary.
00069     CATOSCURSOR     GetOSCursor();
00070 
00071     /// ShowCursor() shows the cursor
00072     void           ShowCursor();
00073 
00074     /// HideCursor() hides the cursor
00075     void           HideCursor();
00076 protected:
00077     /// fType holds the current cursor type
00078     CATCURSORTYPE   fType;
00079 
00080     /// fHidden holds the current cursor state - true if hidden, false otherwise
00081     bool           fHidden;
00082 };
00083 
00084 #endif // _CATCursor_H_
00085 
00086 

Generated on Mon Feb 11 04:09:52 2008 for Game Accessibility Suite by doxygen 1.5.4