nux-0.9.48

nux::Event Class Reference

Nux event class. More...

#include <NuxGraphics/Events.h>

Public Member Functions

 Event ()
void Reset ()
int GetX () const
int GetY () const
int GetRootX () const
int GetRootY () const
int GetDeltaX () const
int GetDeltaY () const
unsigned long GetKeyState () const
unsigned long GetMouseState () const
unsigned long GetEventButton () const
bool GetButtonState (int button) const
unsigned long GetKeySym () const
 Return virtual key code of the key that has triggered the last event.
unsigned short GetKeyRepeatCount () const
const TCHARGetText () const
unsigned long GetVirtualKeyState (unsigned long VirtualKey) const
 Return the state of the Virtual key.

Data Fields

unsigned long VirtualKeycodeState [NUX_MAX_VK]
int width
int height
unsigned int ascii_code
int virtual_code
int e_x
int e_y
int e_x_root
int e_y_root
int e_dx
int e_dy
int e_clicks
int e_is_click
int e_x11_keycode
 X11 raw keycode.
int e_keysym
 Key symbol.
int e_wheeldelta
TCHAR e_text [NUX_EVENT_TEXT_BUFFER_SIZE]
unsigned long e_key_modifiers
unsigned long e_mouse_state
unsigned short e_key_repeat_count
int e_length
unsigned long e_event

Detailed Description

Nux event class.


Constructor & Destructor Documentation

nux::Event::Event ( )

Member Function Documentation

bool nux::Event::GetButtonState ( int  button) const

Check if a mouse button is down.

Parameters:
buttonThe button whose state is to be checked.
Returns:
True if the button is down.
int nux::Event::GetDeltaX ( ) const
int nux::Event::GetDeltaY ( ) const
unsigned long nux::Event::GetEventButton ( ) const

Get the button responsible for the event.

Returns:
The index of the button responsible for the event: 1 left mouse button, 2 middle mouse button, 3 right mouse button.
unsigned short nux::Event::GetKeyRepeatCount ( ) const
unsigned long nux::Event::GetKeyState ( ) const
unsigned long nux::Event::GetKeySym ( ) const

Return virtual key code of the key that has triggered the last event.

Return virtual key code of the key that has triggered the last event.

Returns:
the virtual key code.
unsigned long nux::Event::GetMouseState ( ) const
int nux::Event::GetRootX ( ) const
int nux::Event::GetRootY ( ) const
const TCHAR* nux::Event::GetText ( ) const
unsigned long nux::Event::GetVirtualKeyState ( unsigned long  VirtualKey) const

Return the state of the Virtual key.

Return the state of the Virtual key.

Parameters:
VirtualKeyvirtual key code.
Returns:
1 if the key is pressed, 0 if the key is released.
int nux::Event::GetX ( ) const
int nux::Event::GetY ( ) const
void nux::Event::Reset ( )

Field Documentation

unsigned int nux::Event::ascii_code
unsigned long nux::Event::e_event

Key symbol.

TCHAR nux::Event::e_text[NUX_EVENT_TEXT_BUFFER_SIZE]

X11 raw keycode.

unsigned long nux::Event::VirtualKeycodeState[NUX_MAX_VK]

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