V-ARTContributions
Public Member Functions | Protected Attributes | Friends | List of all members
VART::ViewerGlutOGL::KbHandler Class Reference

Keyboard handler. More...

#include <viewerglutogl.h>

Public Member Functions

virtual ~KbHandler ()
 
virtual void HandleKey (unsigned char key)
 Called when a key is pressed. More...
 
virtual void OnKeyDown (int key)
 Called when a key is pressed. More...
 
virtual void HandleSpecialKey (int key)
 Called when a special key is pressed. More...
 
virtual void OnKeyUp (int key)
 Called when a key is released. More...
 

Protected Attributes

ViewerGlutOGLviewerPtr
 Points to the viewer on which the handler was attached. More...
 

Friends

class ViewerGlutOGL
 

Detailed Description

Keyboard handler.

Definition at line 48 of file viewerglutogl.h.

Constructor & Destructor Documentation

virtual VART::ViewerGlutOGL::KbHandler::~KbHandler ( )
inlinevirtual

Definition at line 52 of file viewerglutogl.h.

Member Function Documentation

virtual void VART::ViewerGlutOGL::KbHandler::HandleKey ( unsigned char  key)
inlinevirtual

Called when a key is pressed.

Deprecated:
Please use OnKeyDown.

Definition at line 56 of file viewerglutogl.h.

virtual void VART::ViewerGlutOGL::KbHandler::HandleSpecialKey ( int  key)
inlinevirtual

Called when a special key is pressed.

Deprecated:
Please use OnKeyDown.

Definition at line 67 of file viewerglutogl.h.

void VART::ViewerGlutOGL::KbHandler::OnKeyDown ( int  key)
virtual

Called when a key is pressed.

Implement this method on your keyboard handler. It will be called when a key is pressed. Includes what GLUT calls "special keys". If you keep a key pressed, several such events (key down) will be dispached, because GLUT handles it as many key ups and downs.

Definition at line 22 of file viewerglutogl.cpp.

virtual void VART::ViewerGlutOGL::KbHandler::OnKeyUp ( int  key)
inlinevirtual

Called when a key is released.

This method may be implemented on your keyboard handler. It will be called when a key is released. Includes what GLUT calls "special keys". If you keep a key pressed, several such events (key down) will be dispached, because GLUT handles it as many key ups and downs.

Definition at line 75 of file viewerglutogl.h.

Friends And Related Function Documentation

friend class ViewerGlutOGL
friend

Definition at line 50 of file viewerglutogl.h.

Member Data Documentation

ViewerGlutOGL* VART::ViewerGlutOGL::KbHandler::viewerPtr
protected

Points to the viewer on which the handler was attached.

Definition at line 78 of file viewerglutogl.h.

Referenced by VART::ViewerGlutOGL::SetKbHandler().


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