ge211
ge211::events Namespace Reference

Detailed Description

Types for representing mouse and keyboard events.

Classes

class  Key
 Represents a key on the keyboard. More...
 

Enumerations

enum  Mouse_button { left, middle, right }
 A representation of a mouse button. More...
 

Functions

std::ostream & operator<< (std::ostream &, Mouse_button)
 Prints a Mouse_button on a std::ostream. More...
 
std::ostream & operator<< (std::ostream &, Key::Type)
 Prints a Key::Type on a std::ostream. More...
 
std::ostream & operator<< (std::ostream &, Key)
 Prints a Key on a std::ostream. More...
 
bool operator== (Key a, Key b) noexcept
 Equality for keys.
 
bool operator!= (Key a, Key b) noexcept
 Disequality for keys.
 

Enumeration Type Documentation

◆ Mouse_button

enum Mouse_button
strong

A representation of a mouse button.

This is used by Abstract_game::on_mouse_down(Mouse_button, Position) and Abstract_game::on_mouse_up(Mouse_button, Position) to specify which mouse button was depressed or released.

Definition at line 18 of file ge211_event.h.

Function Documentation

◆ operator<<() [1/3]

std::ostream & operator<< ( std::ostream &  ,
Mouse_button   
)

Prints a Mouse_button on a std::ostream.

This function prints a representation suitable for debugging, but probably not suitable for end users.

Definition at line 85 of file ge211_event.cpp.

◆ operator<<() [2/3]

std::ostream & operator<< ( std::ostream &  ,
Key::Type   
)

Prints a Key::Type on a std::ostream.

This function prints a representation suitable for debugging, but probably not suitable for end users.

Definition at line 118 of file ge211_event.cpp.

◆ operator<<() [3/3]

std::ostream & operator<< ( std::ostream &  ,
Key   
)

Prints a Key on a std::ostream.

This function prints a representation suitable for debugging, but probably not suitable for end users.

Definition at line 124 of file ge211_event.cpp.