Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

MouseStroke.h

Go to the documentation of this file.
00001 #ifndef HEADER_MOUSESTROKE_H
00002 #define HEADER_MOUSESTROKE_H
00003 
00004 #include "V2.h"
00005 
00006 #include "SDL.h"
00007 #include <string>
00008 
00009 /**
00010  * Contains info about mouse click.
00011  */
00012 class MouseStroke {
00013     private:
00014         Uint8 m_button;
00015         V2 m_loc;
00016     public:
00017         MouseStroke(const SDL_MouseButtonEvent &event);
00018 
00019         bool isLeft() const { return m_button == SDL_BUTTON_LEFT; }
00020         bool isMiddle() const { return m_button == SDL_BUTTON_MIDDLE; }
00021         bool isRight() const { return m_button == SDL_BUTTON_RIGHT; }
00022         V2 getLoc() const { return m_loc; }
00023         std::string toString() const;
00024 };
00025 
00026 #endif

Generated on Wed Jun 1 09:54:31 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2