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

InputContext Class Reference

#include <input_context.hxx>

Inheritance diagram for InputContext:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 InputContext ()
virtual ~InputContext ()
virtual bool get_key (int key)=0
virtual int get_mouse_x ()=0
virtual int get_mouse_y ()=0
Vector2d get_mouse_pos ()
bool get_event (Event *event)

Protected Attributes

std::queue< Eventevents

Constructor & Destructor Documentation

InputContext::InputContext   [inline]
 

Definition at line 35 of file input_context.hxx.

virtual InputContext::~InputContext   [inline, virtual]
 

Definition at line 36 of file input_context.hxx.


Member Function Documentation

bool InputContext::get_event Event   event
 

If an event is in the queue, copy it to event and return true, else return false and leave event untouched

Definition at line 23 of file input_context.cxx.

References events.

virtual bool InputContext::get_key int    key [pure virtual]
 

Returns:
true if the button with the given keycode is currently pressed, false otherwise

Implemented in GlutDisplay, and X11Display.

Vector2d InputContext::get_mouse_pos   [inline]
 

Definition at line 50 of file input_context.hxx.

References get_mouse_y().

Referenced by WorldViewColliderTool::draw_background(), WorldViewInsertTool::draw_foreground(), WorldViewColliderTool::draw_foreground(), WorldGUIManager::draw_overlay(), WorldViewColliderTool::on_primary_button_press(), and WorldViewColliderTool::on_primary_button_release().

virtual int InputContext::get_mouse_x   [pure virtual]
 

Returns:
mouse x coordinate

Implemented in GlutDisplay, and X11Display.

Referenced by WorldViewInsertTool::draw_background(), WorldViewZoomTool::draw_foreground(), WorldViewSelectTool::draw_foreground(), and WorldViewInsertTool::draw_foreground().

virtual int InputContext::get_mouse_y   [pure virtual]
 

Returns:
mouse y coordinate

Implemented in GlutDisplay, and X11Display.

Referenced by WorldViewInsertTool::draw_background(), WorldViewZoomTool::draw_foreground(), WorldViewSelectTool::draw_foreground(), WorldViewInsertTool::draw_foreground(), and get_mouse_pos().


Member Data Documentation

std::queue<Event> InputContext::events [protected]
 

Definition at line 33 of file input_context.hxx.

Referenced by get_event(), GlutDisplay::keyboard_func(), and GlutDisplay::mouse_func().


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 10:25:22 2003 for Construo by doxygen1.3-rc3

Rabisu Mirror Service We provide mirrors to support Open source communities. Our mirror server is located in Istanbul/Turkey region.

Please do not hesitate to contact mirror@rabisu.com for new open source mirror submissions.