Public Types | Public Member Functions | Static Public Member Functions

FIFE::MouseEvent Class Reference

#include <ec_mouseevent.h>

Inheritance diagram for FIFE::MouseEvent:
Inheritance graph
[legend]
Collaboration diagram for FIFE::MouseEvent:
Collaboration graph
[legend]

List of all members.

Public Types

enum  MouseEventType
enum  MouseButtonType

Public Member Functions

 MouseEvent ()
virtual ~MouseEvent ()
MouseButtonType getButton () const
MouseEventType getType () const
int getX () const
int getY () const
virtual bool isAltPressed () const
virtual bool isControlPressed () const
virtual bool isMetaPressed () const
virtual bool isShiftPressed () const
virtual void consume ()
virtual bool isConsumed () const
virtual void consumedByWidgets ()
virtual void setSource (IEventSource *source)
virtual void setSourceWidget (gcn::Widget *widget)
virtual int getTimeStamp () const
virtual void setTimeStamp (int timestamp)
virtual const std::string & getName () const
virtual std::string getDebugString () const
virtual std::string getAttrStr () const

Static Public Member Functions

static std::string mouseEventType2str (MouseEventType t)
static std::string mouseButtonType2str (MouseButtonType t)

Detailed Description

Class for mouse events

Definition at line 42 of file ec_mouseevent.h.


Member Enumeration Documentation

Mouse button types.

Definition at line 64 of file ec_mouseevent.h.

Mouse event types.

Definition at line 47 of file ec_mouseevent.h.


Constructor & Destructor Documentation

FIFE::MouseEvent::MouseEvent (  )  [inline]

Constructor.

Definition at line 76 of file ec_mouseevent.h.

virtual FIFE::MouseEvent::~MouseEvent (  )  [inline, virtual]

Destructor.

Definition at line 85 of file ec_mouseevent.h.


Member Function Documentation

virtual void FIFE::MouseEvent::consume (  )  [inline, virtual]

Marks the event as consumed.

Reimplemented from FIFE::InputEvent.

Definition at line 126 of file ec_mouseevent.h.

virtual void FIFE::MouseEvent::consumedByWidgets (  )  [inline, virtual]

Marks events as consumed by widget library.

Reimplemented from FIFE::InputEvent.

Definition at line 128 of file ec_mouseevent.h.

virtual std::string FIFE::MouseEvent::getAttrStr (  )  const [inline, virtual]

Gets attribute string of the event

Reimplemented from FIFE::InputEvent.

Definition at line 142 of file ec_mouseevent.h.

References mouseButtonType2str(), and mouseEventType2str().

MouseButtonType FIFE::MouseEvent::getButton (  )  const [inline]

Gets the button of the mouse event.

Returns:
the button of the mouse event.

Definition at line 91 of file ec_mouseevent.h.

virtual std::string FIFE::MouseEvent::getDebugString (  )  const [inline, virtual]

Gets the debugstring of the event

Reimplemented from FIFE::InputEvent.

Definition at line 141 of file ec_mouseevent.h.

virtual const std::string& FIFE::MouseEvent::getName (  )  const [inline, virtual]

Gets the name of the event

Reimplemented from FIFE::InputEvent.

Definition at line 137 of file ec_mouseevent.h.

virtual int FIFE::MouseEvent::getTimeStamp (  )  const [inline, virtual]

Gets the timestamp of the event

Reimplemented from FIFE::InputEvent.

Definition at line 134 of file ec_mouseevent.h.

MouseEventType FIFE::MouseEvent::getType (  )  const [inline]

Gets the type of the event.

Returns:
the type of the event.

Definition at line 98 of file ec_mouseevent.h.

int FIFE::MouseEvent::getX (  )  const [inline]

Gets the x coordinate of the mouse event. The coordinate is relative to the source event source.

Returns:
the x coordinate of the mouse event.

Definition at line 106 of file ec_mouseevent.h.

int FIFE::MouseEvent::getY (  )  const [inline]

Gets the y coordinate of the mouse event. The coordinate is relative to the source event source.

Returns:
the y coordinate of the mouse event.

Definition at line 114 of file ec_mouseevent.h.

virtual bool FIFE::MouseEvent::isAltPressed (  )  const [inline, virtual]

Checks whether alt is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 117 of file ec_mouseevent.h.

virtual bool FIFE::MouseEvent::isConsumed (  )  const [inline, virtual]

Checks if the event is consumed.

Returns:
true if the event is consumed, false otherwise.

Reimplemented from FIFE::InputEvent.

Definition at line 127 of file ec_mouseevent.h.

virtual bool FIFE::MouseEvent::isControlPressed (  )  const [inline, virtual]

Checks whether control is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 119 of file ec_mouseevent.h.

virtual bool FIFE::MouseEvent::isMetaPressed (  )  const [inline, virtual]

Checks whether meta is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 121 of file ec_mouseevent.h.

virtual bool FIFE::MouseEvent::isShiftPressed (  )  const [inline, virtual]

Checks whether shift is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 123 of file ec_mouseevent.h.

static std::string FIFE::MouseEvent::mouseButtonType2str ( MouseButtonType  t  )  [inline, static]

Returns string representation of given button type

Definition at line 192 of file ec_mouseevent.h.

Referenced by getAttrStr().

Here is the caller graph for this function:

static std::string FIFE::MouseEvent::mouseEventType2str ( MouseEventType  t  )  [inline, static]

Returns string representation of given event type

Definition at line 154 of file ec_mouseevent.h.

Referenced by getAttrStr().

Here is the caller graph for this function:

virtual void FIFE::MouseEvent::setSource ( IEventSource source  )  [inline, virtual]

Sets the source of the event.

Reimplemented from FIFE::InputEvent.

Definition at line 131 of file ec_mouseevent.h.

virtual void FIFE::MouseEvent::setSourceWidget ( gcn::Widget *  widget  )  [inline, virtual]

Set the source of the (widget) event.

See also:
getSourceWidget

Reimplemented from FIFE::InputEvent.

Definition at line 133 of file ec_mouseevent.h.

virtual void FIFE::MouseEvent::setTimeStamp ( int  timestamp  )  [inline, virtual]

Sets the timestamp of the event

Reimplemented from FIFE::InputEvent.

Definition at line 135 of file ec_mouseevent.h.


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