GLUTWindow Class Reference

#include <TAPsGLUTWindow.hpp>

Collaboration diagram for GLUTWindow:

Collaboration graph
[legend]

List of all members.

Public Member Functions

GLUTCallbackFnsGetGLUTObject () const
int GetID () const
 GLUTWindow (std::string const title, GLUTCallbackFns *const pGLUT, int width=256, int height=256)
virtual void Initialize ()
void SetGLUT (GLUTCallbackFns *const pGLUT)
 ~GLUTWindow ()

Static Public Member Functions

static void Display ()
static int GetMainID ()
static void Idle ()
static void Keyboard (unsigned char key, int x, int y)
static void Motion (int x, int y)
static void Mouse (int button, int state, int x, int y)
static void Reshape (int width, int height)
static void Special (int key, int x, int y)

Protected Attributes

int m_iID
GLUTCallbackFnsm_pGLUT
std::string m_strTitle

Static Protected Attributes

static int m_siID = -1
static GLUTCallbackFnsm_spGLUT = NULL


Detailed Description

Definition at line 20 of file TAPsGLUTWindow.hpp.


Constructor & Destructor Documentation

GLUTWindow::GLUTWindow ( std::string const   title,
GLUTCallbackFns *const   pGLUT,
int  width = 256,
int  height = 256 
)

Definition at line 25 of file TAPsGLUTWindow.cpp.

00028     :   m_strTitle( title ),
00029         m_pGLUT( NULL )
00030 {
00031     glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH );
00032     glutInitWindowSize( width, height );
00033     const char * p = title.data();
00034     m_iID = glutCreateWindow( p );
00035     SetGLUT( pGLUT );
00036 }

GLUTWindow::~GLUTWindow (  ) 

Definition at line 38 of file TAPsGLUTWindow.cpp.

00039 {}


Member Function Documentation

static void GLUTWindow::Display (  )  [inline, static]

Definition at line 45 of file TAPsGLUTWindow.hpp.

00046     {
00047         assert( m_spGLUT );
00048         m_spGLUT->DisplayFn();
00049     }

GLUTCallbackFns* GLUTWindow::GetGLUTObject (  )  const [inline]

Definition at line 39 of file TAPsGLUTWindow.hpp.

00039 { return m_pGLUT; }

int GLUTWindow::GetID (  )  const [inline]

Definition at line 40 of file TAPsGLUTWindow.hpp.

00040 { return m_iID; }

static int GLUTWindow::GetMainID (  )  [inline, static]

Definition at line 37 of file TAPsGLUTWindow.hpp.

00037 { return m_siID; }

static void GLUTWindow::Idle (  )  [inline, static]

Definition at line 75 of file TAPsGLUTWindow.hpp.

00076     {
00077         assert( m_spGLUT );
00078         m_spGLUT->IdleFn();
00079     }

virtual void GLUTWindow::Initialize (  )  [inline, virtual]

Definition at line 42 of file TAPsGLUTWindow.hpp.

00042 {}

static void GLUTWindow::Keyboard ( unsigned char  key,
int  x,
int  y 
) [inline, static]

Definition at line 65 of file TAPsGLUTWindow.hpp.

00066     {
00067         assert( m_spGLUT );
00068         m_spGLUT->KeyboardFn( key, x, y );
00069     }

static void GLUTWindow::Motion ( int  x,
int  y 
) [inline, static]

Definition at line 60 of file TAPsGLUTWindow.hpp.

00061     {
00062         assert( m_spGLUT );
00063         m_spGLUT->MotionFn( x, y );
00064     }

static void GLUTWindow::Mouse ( int  button,
int  state,
int  x,
int  y 
) [inline, static]

Definition at line 55 of file TAPsGLUTWindow.hpp.

00056     {
00057         assert( m_spGLUT );
00058         m_spGLUT->MouseFn( button, state, x, y );
00059     }

static void GLUTWindow::Reshape ( int  width,
int  height 
) [inline, static]

Definition at line 50 of file TAPsGLUTWindow.hpp.

00051     {
00052         assert( m_spGLUT );
00053         m_spGLUT->ReshapeFn( width, height );
00054     }

void GLUTWindow::SetGLUT ( GLUTCallbackFns *const   pGLUT  ) 

Definition at line 44 of file TAPsGLUTWindow.cpp.

00045 {
00046     assert( pGLUT );
00047     m_spGLUT = m_pGLUT = pGLUT;
00048     m_siID = m_iID;
00049     glutDisplayFunc( Display );
00050     glutReshapeFunc( Reshape );
00051     glutMouseFunc( Mouse );
00052     glutMotionFunc( Motion );
00053     glutKeyboardFunc( Keyboard );
00054     glutSpecialFunc( Special );
00055     glutIdleFunc( Idle );
00056 }

static void GLUTWindow::Special ( int  key,
int  x,
int  y 
) [inline, static]

Definition at line 70 of file TAPsGLUTWindow.hpp.

00071     {
00072         assert( m_spGLUT );
00073         m_spGLUT->SpecialFn( key, x, y );
00074     }


Member Data Documentation

int GLUTWindow::m_iID [protected]

Definition at line 24 of file TAPsGLUTWindow.hpp.

Definition at line 25 of file TAPsGLUTWindow.hpp.

BEGIN_NAMESPACE_TAPs__OpenGL int GLUTWindow::m_siID = -1 [static, protected]

Definition at line 26 of file TAPsGLUTWindow.hpp.

GLUTCallbackFns * GLUTWindow::m_spGLUT = NULL [static, protected]

Definition at line 27 of file TAPsGLUTWindow.hpp.

std::string GLUTWindow::m_strTitle [protected]

Definition at line 23 of file TAPsGLUTWindow.hpp.


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

Generated on Mon Oct 13 11:44:52 2008 for TAPs by  doxygen 1.5.6