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

MouseStroke Class Reference

Collaboration diagram for MouseStroke:

Collaboration graph
[legend]

Detailed Description

Contains info about mouse click.

Definition at line 12 of file MouseStroke.h.

Public Member Functions

 MouseStroke (const SDL_MouseButtonEvent &event)
 Create new stroke from MouseButtonEvent.
bool isLeft () const
bool isMiddle () const
bool isRight () const
V2 getLoc () const
std::string toString () const
 Return text fashion.


Constructor & Destructor Documentation

MouseStroke::MouseStroke const SDL_MouseButtonEvent &  event  ) 
 

Create new stroke from MouseButtonEvent.

Definition at line 17 of file MouseStroke.cpp.

00018     : m_loc(event.x, event.y)
00019 {
00020     m_button = event.button;
00021 }


Member Function Documentation

V2 MouseStroke::getLoc  )  const [inline]
 

Definition at line 22 of file MouseStroke.h.

00022 { return m_loc; }

bool MouseStroke::isLeft  )  const [inline]
 

Definition at line 19 of file MouseStroke.h.

00019 { return m_button == SDL_BUTTON_LEFT; }

bool MouseStroke::isMiddle  )  const [inline]
 

Definition at line 20 of file MouseStroke.h.

00020 { return m_button == SDL_BUTTON_MIDDLE; }

bool MouseStroke::isRight  )  const [inline]
 

Definition at line 21 of file MouseStroke.h.

00021 { return m_button == SDL_BUTTON_RIGHT; }

std::string MouseStroke::toString  )  const
 

Return text fashion.

Definition at line 27 of file MouseStroke.cpp.

00028 {
00029     return StringTool::toString(m_button);
00030 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:55:57 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2