SimpleGL  1.1.0
A framework for platform independent rendering
Public Member Functions | List of all members
sgl::MouseButtonEvent Class Reference

This class defines a mouse button event, created by the MouseButtonCallback. More...

#include <event.hpp>

Inheritance diagram for sgl::MouseButtonEvent:
sgl::Event

Public Member Functions

 MouseButtonEvent (MouseButton button, Action action, Modifier mods)
 Creates a new mouse button event. More...
 
 ~MouseButtonEvent (void) override
 Deletes a mouse button event. More...
 
MouseButton getButton ()
 Returns the mouse button of the event. More...
 
Action getAction ()
 Returns the action of the event. More...
 
Modifier getMods ()
 Returns the modifier bits of the event. More...
 
- Public Member Functions inherited from sgl::Event
 Event (EventType type)
 Creates a new event. More...
 
virtual ~Event (void)
 Deletes a event. More...
 
EventType getType ()
 Returns the event type. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from sgl::Event
static std::vector< Event * > getEvents ()
 Returns the list of events. More...
 
static void addEvent (Event *event)
 Adds an event to the list. More...
 
static void clearEvents ()
 Clears the event list, this should be called after every loop. More...
 
- Protected Attributes inherited from sgl::Event
EventType type
 Stores the event type. More...
 
- Static Protected Attributes inherited from sgl::Event
static std::vector< Event * > events
 Stores the events that got received. More...
 

Detailed Description

This class defines a mouse button event, created by the MouseButtonCallback.

Definition at line 155 of file event.hpp.

Constructor & Destructor Documentation

sgl::MouseButtonEvent::MouseButtonEvent ( MouseButton  button,
Action  action,
Modifier  mods 
)

Creates a new mouse button event.

Parameters
buttonThe button of the event.
actionThe action of the event.
modsA bit field that describes which modifier keys were active.

Definition at line 67 of file event.cpp.

sgl::MouseButtonEvent::~MouseButtonEvent ( void  )
override

Deletes a mouse button event.

Definition at line 73 of file event.cpp.

Member Function Documentation

Action sgl::MouseButtonEvent::getAction ( )

Returns the action of the event.

Returns
The action of the event.

Definition at line 81 of file event.cpp.

MouseButton sgl::MouseButtonEvent::getButton ( )

Returns the mouse button of the event.

Returns
The mouse button of the event.

Definition at line 77 of file event.cpp.

Modifier sgl::MouseButtonEvent::getMods ( )

Returns the modifier bits of the event.

Returns
The modifier bits of the event.

Definition at line 85 of file event.cpp.


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