Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

IO_Window Class Reference

An OpenGL window with associated input mechanisms. More...

#include <Interface/io.h>

List of all members.

Public Member Functions

 IO_Window (void)
 default constructor (invalid window)
 IO_Window (const std::string &title, IO_EventHandler handler, const ConStruct &cfg, bool menu)
 normal constructor
 IO_Window (IO_Window &w)
 copy constructor
IO_Windowoperator= (IO_Window &w)
 assignment operator
uint Width (void) const
 Get the width of the window.
uint Height (void) const
 Get the height of the window.
void Poll (void)
 Poll for new input events.
void Select (void) const
 Select this window as the current OpenGL rendering context.
bool KeyState (IO_KeyId id) const
 Get the state of the given key.
bool JoystickState (IO_KeyId id) const
 get the state of a joystick button
double JoystickAxisState (IO_KeyId id) const
 get the state of a joystick axis
void MouseMode (IO_MouseMode mm)
 Set the mode for the mouse.
IO_MouseMode MouseMode (void) const
 Get the current mouse mode.
IO_Position MousePos (void) const
 Get the coordinates of the mouse. In relative mode, these are in more or less arbitrary units, but on the order of 1 unit per screen's worth of movement. It's also affected by sensitivity. In absolute mode, the upper left corner of the screen is considered (0, 0) and the lower right corner is (600, 600).
void Update (void)
 Update the window. Under Windows, it does it indirectly by invalidating the window, thus forcing a WM_PAINT message. When that's received, it sends a call back to the main module, which makes the calls to do the rendering and swap buffers. This was necessary in order to force everything through the WM_PAINT pipeline.
ConStruct Config (void) const
 Get a config structure for the window.


Detailed Description

An OpenGL window with associated input mechanisms.


Member Function Documentation

bool IO_Window::KeyState IO_KeyId  id  )  const
 

Get the state of the given key.

Parameters:
id the key id
Returns:
true if pressed, false if not pressed

void IO_Window::MouseMode IO_MouseMode  mm  ) 
 

Set the mode for the mouse.

Parameters:
mode either IO_Relative or IO_Absolute.

IO_Position IO_Window::MousePos void   )  const
 

Get the coordinates of the mouse. In relative mode, these are in more or less arbitrary units, but on the order of 1 unit per screen's worth of movement. It's also affected by sensitivity. In absolute mode, the upper left corner of the screen is considered (0, 0) and the lower right corner is (600, 600).

Bug:
The range (0,0) to (600,600), is just messed up...

void IO_Window::Poll void   ) 
 

Poll for new input events.

Bug:
This is messed up....


The documentation for this class was generated from the following files:
Generated on Fri Jan 12 14:15:02 2007 for Construct by  doxygen 1.4.3-20050530