____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

gcn::MouseInput Class Reference

#include <mouseinput.h>

List of all members.

Public Types

enum  {
  EMPTY = 0, LEFT, RIGHT, MIDDLE,
  WHEEL_UP, WHEEL_DOWN, PRESS, RELEASE,
  MOTION
}

Public Member Functions

 MouseInput ()
 MouseInput (int button, int type, int mousex, int mousey, int timeStamp)
void setType (int type)
int getType () const
void setButton (int button)
int getButton () const
void setTimeStamp (int timeStamp)
int getTimeStamp () const

Public Attributes

int x
int y

Protected Attributes

int mType
int mButton
int mTimeStamp


Detailed Description

Internal class representing mouse input. Generally you won't have to bother using this class.

Definition at line 67 of file mouseinput.h.


Member Enumeration Documentation

anonymous enum

Enum with mouse input values.

Enumerator:
EMPTY 
LEFT 
RIGHT 
MIDDLE 
WHEEL_UP 
WHEEL_DOWN 
PRESS 
RELEASE 
MOTION 

Definition at line 132 of file mouseinput.h.


Constructor & Destructor Documentation

gcn::MouseInput::MouseInput (  )  [inline]

Constructor.

Definition at line 74 of file mouseinput.h.

gcn::MouseInput::MouseInput ( int  button,
int  type,
int  mousex,
int  mousey,
int  timeStamp 
)

Constructor.

Parameters:
button the button pressed.
type the type of input.
mousex the mouse x coordinate.
mousey the mouse y coordinate.
timeStamp the mouse inputs time stamp.

Definition at line 63 of file mouseinput.cpp.

References mButton, mTimeStamp, mType, x, and y.


Member Function Documentation

void gcn::MouseInput::setType ( int  type  ) 

Sets the input type.

Parameters:
type the type of input.

Definition at line 72 of file mouseinput.cpp.

References mType.

Referenced by gcn::SDLInput::pushInput().

int gcn::MouseInput::getType (  )  const

Gets the input type.

Returns:
the input type.

Definition at line 77 of file mouseinput.cpp.

References mType.

Referenced by gcn::Widget::_mouseInputMessage().

void gcn::MouseInput::setButton ( int  button  ) 

Sets the button pressed.

Parameters:
button the button pressed.

Definition at line 82 of file mouseinput.cpp.

References mButton.

Referenced by gcn::SDLInput::pushInput().

int gcn::MouseInput::getButton (  )  const

Gets the button pressed.

Returns:
the button pressed.

Definition at line 87 of file mouseinput.cpp.

References mButton.

Referenced by gcn::Widget::_mouseInputMessage().

void gcn::MouseInput::setTimeStamp ( int  timeStamp  ) 

Sets the timestamp for the input.

Parameters:
timeStamp the timestamp of the input.

Definition at line 97 of file mouseinput.cpp.

References mTimeStamp.

Referenced by gcn::SDLInput::pushInput().

int gcn::MouseInput::getTimeStamp (  )  const

Gets the time stamp of the input.

Returns:
the time stamp of the input.

Definition at line 92 of file mouseinput.cpp.

References mTimeStamp.

Referenced by gcn::Widget::_mouseInputMessage().


Member Data Documentation

int gcn::MouseInput::mType [protected]

Definition at line 148 of file mouseinput.h.

Referenced by getType(), MouseInput(), and setType().

int gcn::MouseInput::mButton [protected]

Definition at line 149 of file mouseinput.h.

Referenced by getButton(), MouseInput(), and setButton().

int gcn::MouseInput::mTimeStamp [protected]

Definition at line 150 of file mouseinput.h.

Referenced by getTimeStamp(), MouseInput(), and setTimeStamp().


The documentation for this class was generated from the following files:

Generated on Sat Feb 21 00:28:26 2009 for Bos Wars by  doxygen 1.5.6