Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ONE::util::MouseEvent Class Reference

Inheritance diagram for ONE::util::MouseEvent:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Button {
  NONE = 0, LEFT = 1, MIDDLE = 1<<1, RIGHT = 1<<2,
  WHEEL_UP = 1<<3, WHEEL_DOWN = 1<<4, ANY = 0xFFFFFFFF
}
enum  Type { MOTION = SDL_MOUSEMOTION, BUTTON_DOWN = SDL_MOUSEBUTTONDOWN, BUTTON_UP = SDL_MOUSEBUTTONUP }

Public Member Functions

void consume ()
 Event (MouseDispatcher *src)
 creates a new event.
unsigned int getButton () const
ushort getClickCount () const
SDL_keysym getKeysym () const
SDLMod getModifier () const
const Point & getMovement () const
const Point & getPosition () const
MouseDispatchergetSource () const
 provides access to the source of the event.
Type getType () const
bool isConsumed () const
 MouseEvent (const SDL_MouseButtonEvent &e, ushort cnt=1, SDLMod mod=KMOD_NONE)
 MouseEvent (const Point &pos, const Type &tp, const unsigned int &btn, ushort cnt=1, SDLMod mod=KMOD_NONE)
 MouseEvent (const SDL_MouseMotionEvent &e, SDLMod mod=KMOD_NONE)
 MouseEvent (const Point &pos, const Point &mov, const unsigned int &btn, SDLMod mod=KMOD_NONE)

Static Public Attributes

static ushort MULTICLICK_DELAY
 maximum time allowed between subsequent clicks to generate a multi-click event

Member Enumeration Documentation

enum ONE::util::MouseEvent::Button
 

Enumerator:
NONE 
LEFT 
MIDDLE 
RIGHT 
WHEEL_UP 
WHEEL_DOWN 
ANY 

enum ONE::util::MouseEvent::Type
 

Enumerator:
MOTION 
BUTTON_DOWN 
BUTTON_UP 


Constructor & Destructor Documentation

ONE::util::MouseEvent::MouseEvent const Point pos,
const Point mov,
const unsigned int &  btn,
SDLMod  mod = KMOD_NONE
 

ONE::util::MouseEvent::MouseEvent const SDL_MouseMotionEvent &  e,
SDLMod  mod = KMOD_NONE
 

ONE::util::MouseEvent::MouseEvent const Point pos,
const Type tp,
const unsigned int &  btn,
ushort  cnt = 1,
SDLMod  mod = KMOD_NONE
 

ONE::util::MouseEvent::MouseEvent const SDL_MouseButtonEvent &  e,
ushort  cnt = 1,
SDLMod  mod = KMOD_NONE
 


Member Function Documentation

void ONE::util::MouseEvent::consume  )  [inline]
 

ONE::util::Event< MouseDispatcher >::Event MouseDispatcher src  )  [inherited]
 

creates a new event.

Parameters:
src the source of the event

unsigned int ONE::util::MouseEvent::getButton  )  const [inline]
 

ushort ONE::util::MouseEvent::getClickCount  )  const [inline]
 

SDL_keysym ONE::util::MouseEvent::getKeysym  )  const
 

SDLMod ONE::util::MouseEvent::getModifier  )  const [inline]
 

const Point & ONE::util::MouseEvent::getMovement  )  const [inline]
 

const Point & ONE::util::MouseEvent::getPosition  )  const [inline]
 

MouseDispatcher * ONE::util::Event< MouseDispatcher >::getSource  )  const [inherited]
 

provides access to the source of the event.

The source of an event is the EventDispatcher that created and dispatched it.

Returns:
this event's source

MouseEvent::Type ONE::util::MouseEvent::getType  )  const [inline]
 

bool ONE::util::MouseEvent::isConsumed  )  const [inline]
 


Member Data Documentation

ushort ONE::util::MouseEvent::MULTICLICK_DELAY [static]
 

maximum time allowed between subsequent clicks to generate a multi-click event

Each subsequent click may occur this many miliseconds or less after the previous click. Times shorter than the current frame duration are not guaranteed to properly separate events.


Generated on Wed Sep 7 19:03:32 2005 for ONEngine by  doxygen 1.4.3