Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

sjgui::CKeys Class Reference

Keeps track of key actions. More...

#include <keys.h>

List of all members.

Static Public Member Functions

void SetKey (int ind, bool val=true)
 Sets ind key as pressed or released.

void PressKey (int ind)
void ReleaseKey (int ind)
bool IsKey (int ind)
 Returns true if key ind is pressed, false otherwise.

int GetTotalPressed ()
 Returns number of currently pressed keys.

int GetLastKey ()
 Returns last pressed key.

bool IsShift ()
 Returns true if shift is pressed, false otherwise.

bool IsAlt ()
 Returns true if alt is pressed, false otherwise.

bool IsCtrl ()
 Returns true if cntrl is pressed, false otherwise.


Detailed Description

Keeps track of key actions.

Predefined key names are:

SJ_KEY_BACKSPACE SJ_KEY_TAB SJ_KEY_ENTER SJ_KEY_ESC SJ_KEY_SPACE SJ_KEY_DELETE SJ_KEY_F1 SJ_KEY_F2 SJ_KEY_F3 SJ_KEY_F4 SJ_KEY_F5 SJ_KEY_F6 SJ_KEY_F7 SJ_KEY_F8 SJ_KEY_F9 SJ_KEY_F10 SJ_KEY_F11 SJ_KEY_F12 SJ_KEY_LEFT SJ_KEY_UP SJ_KEY_RIGHT SJ_KEY_DOWN SJ_KEY_PAGE_UP SJ_KEY_PAGE_DOWN SJ_KEY_HOME SJ_KEY_END SJ_KEY_INSERT
Mouse buttons:
SJ_KEY_MOUSE_LEFT SJ_KEY_MOUSE_RIGHT SJ_KEY_MOUSE_MIDDLE
Modifiers:
SJ_KEY_SHIFT SJ_KEY_ALT SJ_KEY_CTRL
Virtual keys:
SJ_KEY_IGNORE SJ_KEY_NULL SJ_KEY_MAXIMUM
Author:
Alexander Shyrokov
Version:
Revision
1.1.1.1


Member Function Documentation

bool sjgui::CKeys::IsKey int  ind  )  [inline, static]
 

Returns true if key ind is pressed, false otherwise.

void sjgui::CKeys::PressKey int  ind  )  [inline, static]
 

Parameters:
ind  Sets ind key as pressed.

void sjgui::CKeys::ReleaseKey int  ind  )  [inline, static]
 

Parameters:
ind  Sets ind key as released.


The documentation for this class was generated from the following file:
sjgui logo
Quick Links:

 News
 Description
 Screen Shots
 Projects
 Downloads
 Source Code
 Help/FAQ
 Want to help?
 Credits
 Disclaimer


Documentation:

 Documentation
 Reference
 Lessons


Useful links:

sjcomp logo
sjcomp

opengl logo

nehe logo

SourceForge.net Logo

Last modified:


Started by Alexander Shyrokov. Generated at Wed Apr 28 12:31:06 2004 for the sjgui by doxygen 1.3.1. SourceForge.net Logo