Quad Pang
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
Controller Class Reference

Contollers are classes that are receiving user input from mouse and keyboard. More...

#include <Controllers.h>

Inheritance diagram for Controller:
BongoOrthoMover BongoOrthoMover BongoRealMover BongoRealMover MenuController MenuController ShortcutController ShortcutController ViewController ViewController

List of all members.

Public Member Functions

virtual ~Controller ()
virtual bool Init (XRes *resource, XCongo *xcongo)
 Call to perform initalization based on resource.
virtual bool ProcessKey (int key, Engine::KeyEvent type, int x, int y)=0
 Process key event.
virtual ~Controller ()
virtual bool Init (XRes *resource, XCongo *xcongo)
 Call to perform initalization based on resource.
virtual bool ProcessKey (int key, Engine::KeyEvent type, int x, int y)=0
 Process key event.
Mouse Events
virtual bool ProcessMousePress (int button, int state, int x, int y)
 Called when mouse is pressed over the window.
virtual bool ProcessMouseMove (int x, int y)
 Called when mouse is moving over the window.
virtual bool ProcessMousePress (int button, int state, int x, int y)
 Called when mouse is pressed over the window.
virtual bool ProcessMouseMove (int x, int y)
 Called when mouse is moving over the window.

Detailed Description

Contollers are classes that are receiving user input from mouse and keyboard.

All controllers are associated to the object that is beeing controlled.

Definition at line 20 of file Controllers.h.


Constructor & Destructor Documentation

virtual Controller::~Controller ( ) [inline, virtual]

Definition at line 23 of file Controllers.h.

{}
virtual Controller::~Controller ( ) [inline, virtual]

Definition at line 23 of file Controllers.h.

{}

Member Function Documentation

virtual bool Controller::Init ( XRes resource,
XCongo xcongo 
) [inline, virtual]

Call to perform initalization based on resource.

Reimplemented in ViewController, ViewController, BongoRealMover, BongoRealMover, BongoOrthoMover, and BongoOrthoMover.

Definition at line 26 of file Controllers.h.

Referenced by Factory::CreateQuadMover().

{ return true; }
virtual bool Controller::Init ( XRes resource,
XCongo xcongo 
) [inline, virtual]

Call to perform initalization based on resource.

Reimplemented in ViewController, ViewController, BongoRealMover, BongoRealMover, BongoOrthoMover, and BongoOrthoMover.

Definition at line 26 of file Controllers.h.

{ return true; }
virtual bool Controller::ProcessKey ( int  key,
Engine::KeyEvent  type,
int  x,
int  y 
) [pure virtual]

Process key event.

Parameters:
keyKey which triggered action
typeKEY_UP or KEY_DOWN
xcursor position
ycursor position
Returns:
true if key is processed and should not be forwarded to other controlers

Implemented in ViewController, ViewController, BongoRealMover, BongoRealMover, BongoOrthoMover, BongoOrthoMover, ShortcutController, ShortcutController, MenuController, and MenuController.

virtual bool Controller::ProcessKey ( int  key,
Engine::KeyEvent  type,
int  x,
int  y 
) [pure virtual]

Process key event.

Parameters:
keyKey which triggered action
typeKEY_UP or KEY_DOWN
xcursor position
ycursor position
Returns:
true if key is processed and should not be forwarded to other controlers

Implemented in ViewController, ViewController, BongoRealMover, BongoRealMover, BongoOrthoMover, BongoOrthoMover, ShortcutController, ShortcutController, MenuController, and MenuController.

virtual bool Controller::ProcessMouseMove ( int  x,
int  y 
) [inline, virtual]

Called when mouse is moving over the window.

Parameters:
xCursor position
yCursor position
Returns:
true if mouse is processed and should not be forwarded to other controllers

Definition at line 93 of file Controllers.h.

{ return false; }
virtual bool Controller::ProcessMouseMove ( int  x,
int  y 
) [inline, virtual]

Called when mouse is moving over the window.

Parameters:
xCursor position
yCursor position
Returns:
true if mouse is processed and should not be forwarded to other controllers

Definition at line 93 of file Controllers.h.

{ return false; }
virtual bool Controller::ProcessMousePress ( int  button,
int  state,
int  x,
int  y 
) [inline, virtual]

Called when mouse is pressed over the window.

Parameters:
buttonThe button parameter is one of:
  • GLUT_LEFT_BUTTON
  • GLUT_MIDDLE_BUTTON
  • GLUT_RIGHT_BUTTON
stateThe state parameter is either GLUT_UP or GLUT_DOWN indicating whether the callback was due to a release or press respectively.
xCursor position
yCursor position
Returns:
true if mouse is processed and should not be forwarded to other controllers

Definition at line 78 of file Controllers.h.

{ return false; }
virtual bool Controller::ProcessMousePress ( int  button,
int  state,
int  x,
int  y 
) [inline, virtual]

Called when mouse is pressed over the window.

Parameters:
buttonThe button parameter is one of:
  • GLUT_LEFT_BUTTON
  • GLUT_MIDDLE_BUTTON
  • GLUT_RIGHT_BUTTON
stateThe state parameter is either GLUT_UP or GLUT_DOWN indicating whether the callback was due to a release or press respectively.
xCursor position
yCursor position
Returns:
true if mouse is processed and should not be forwarded to other controllers

Definition at line 78 of file Controllers.h.

{ return false; }

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