Allolib  1.0
C++ Components For Interactive Multimedia
al::Mouse Class Reference

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/io/al_Window.hpp>

Public Types

enum  { LEFT = 0 , MIDDLE = 1 , RIGHT = 2 , EXTRA = 3 }
 

Public Member Functions

int x () const
 
int y () const
 
int dx () const
 Get change in x position, in pixels.
 
int dy () const
 Get change in y position, in pixels.
 
double scrollX () const
 Get x scroll amount.
 
double scrollY () const
 Get y scroll amount.
 
int button () const
 Get last clicked button.
 
bool down () const
 Get state of last clicked button.
 
bool down (int button) const
 Get state of a button.
 
bool left () const
 Get whether left button is down.
 
bool middle () const
 Get whether middle button is down.
 
bool right () const
 Get whether right button is down.
 

Protected Member Functions

void button (int b, bool v)
 
void position (int x, int y)
 
void scroll (double x, double y)
 

Protected Attributes

int mX
 
int mY
 
int mDX
 
int mDY
 
double mScrollX
 
double mScrollY
 
int mButton
 
int mBX [AL_MOUSE_MAX_BUTTONS]
 
int mBY [AL_MOUSE_MAX_BUTTONS]
 
bool mB [AL_MOUSE_MAX_BUTTONS]
 

Friends

class WindowImpl
 

Detailed Description

Mouse state

Definition at line 145 of file al_Window.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
LEFT 

Left button

MIDDLE 

Middle button

RIGHT 

Right button

EXTRA 

Start of any extra buttons

Definition at line 147 of file al_Window.hpp.

Member Function Documentation

◆ x()

int al::Mouse::x ( ) const

Get x position relative to top-left corner of window, in pixels

◆ y()

int al::Mouse::y ( ) const

Get x position relative to top-left corner of window, in pixels


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