_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
gcn::MouseInput Class Reference

#include <mouseinput.h>

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.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Enum with mouse input values.

Enumerator
EMPTY 
LEFT 
RIGHT 
MIDDLE 
WHEEL_UP 
WHEEL_DOWN 
PRESS 
RELEASE 
MOTION 

Constructor & Destructor Documentation

◆ MouseInput() [1/2]

gcn::MouseInput::MouseInput ( )
inline

Constructor.

◆ MouseInput() [2/2]

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

Constructor.

Parameters
buttonthe button pressed.
typethe type of input.
mousexthe mouse x coordinate.
mouseythe mouse y coordinate.
timeStampthe mouse inputs time stamp.

Member Function Documentation

◆ getButton()

int gcn::MouseInput::getButton ( ) const

Gets the button pressed.

Returns
the button pressed.

◆ getTimeStamp()

int gcn::MouseInput::getTimeStamp ( ) const

Gets the time stamp of the input.

Returns
the time stamp of the input.

◆ getType()

int gcn::MouseInput::getType ( ) const

Gets the input type.

Returns
the input type.

◆ setButton()

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

Sets the button pressed.

Parameters
buttonthe button pressed.

◆ setTimeStamp()

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

Sets the timestamp for the input.

Parameters
timeStampthe timestamp of the input.

◆ setType()

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

Sets the input type.

Parameters
typethe type of input.

Member Data Documentation

◆ mButton

int gcn::MouseInput::mButton
protected

◆ mTimeStamp

int gcn::MouseInput::mTimeStamp
protected

◆ mType

int gcn::MouseInput::mType
protected

◆ x

int gcn::MouseInput::x

◆ y

int gcn::MouseInput::y

The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.