Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

CSMouseCursor Class Reference

#include <CSMouseCursor.h>


Public Member Functions

 CSMouseCursor (std::string pictureName)
virtual ~CSMouseCursor ()
virtual std::string getType ()
virtual void paint (SDL_Surface *destination, SDL_Rect *parentViewport)
void setPosition (int x, int y)
void hide ()
void show ()

Static Public Attributes

const char * CLASS = "CSMouseCursor"


Constructor & Destructor Documentation

CSMouseCursor::CSMouseCursor std::string  pictureName  ) 
 

Definition at line 14 of file CSMouseCursor.cpp.

References Loadable< CSPicture >::load(), LOG_ENTER, and LOG_EXIT.

00015 {
00016     static char *functionName="CSMouseCursor";
00017     LOG_ENTER 
00018     mPicture = CSPictureLoader::INSTANCE.load(pictureName);
00019     mVisible = 1;
00020     mX = 0;
00021     mY = 0;
00022     LOG_EXIT
00023 }

Here is the call graph for this function:

CSMouseCursor::~CSMouseCursor  )  [virtual]
 

Definition at line 29 of file CSMouseCursor.cpp.

References LOG_ENTER, and LOG_EXIT.

00030 {
00031     static char *functionName="~CSMouseCursor";
00032     LOG_ENTER 
00033     mPicture = 0;
00034     LOG_EXIT
00035 }


Member Function Documentation

virtual std::string CSMouseCursor::getType  )  [inline, virtual]
 

Definition at line 27 of file CSMouseCursor.h.

References CLASS.

00027 {return (std::string) CLASS;}

void CSMouseCursor::paint SDL_Surface *  destination,
SDL_Rect *  parentViewport
[virtual]
 

Definition at line 41 of file CSMouseCursor.cpp.

References CSPicture::display().

Referenced by CSDesktop::paint().

00042 {
00043     static char *functionName="paint";
00044     if (mVisible) 
00045     {
00046         mPicture->display(parentViewport->x + mX, parentViewport->y + mY);
00047     }
00048 }

Here is the call graph for this function:

void CSMouseCursor::setPosition int  x,
int  y
 

Definition at line 54 of file CSMouseCursor.cpp.

Referenced by CSDesktop::paint().

00055 {
00056     static char *functionName="setPosition";
00057     mX = x;
00058     mY = y;
00059 }

void CSMouseCursor::hide  ) 
 

Definition at line 65 of file CSMouseCursor.cpp.

00066 {
00067     static char *functionName="hide";
00068     mVisible = 0;
00069 }

void CSMouseCursor::show  ) 
 

Definition at line 75 of file CSMouseCursor.cpp.

00076 {
00077     static char *functionName="show";
00078     mVisible = 1;
00079 }


Field Documentation

const char * CSMouseCursor::CLASS = "CSMouseCursor" [static]
 

Definition at line 8 of file CSMouseCursor.cpp.

Referenced by getType().


Generated on Wed Jul 14 00:44:56 2004 for CSLib by doxygen 1.3.6