Keos::CWin32Window Class Reference

OpenGL Win32 IRenderWindow implementation. More...

#include <KeosWin32Window.h>

Inheritance diagram for Keos::CWin32Window:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CWin32Window ()
 Constructor.
 ~CWin32Window ()
 Destructor.
void Create (const String &strName, uint nWidth, uint nHeight, uint nColourDepth, bool bFullScreen)
 See IRenderWindow.
void Destroy (void)
 See IRenderWindow.
bool IsClosed (void) const
 See IRenderWindow.
void Reposition (int nLeft, int nTop)
 See IRenderWindow.
void Resize (uint nWidth, uint nHeight)
 See IRenderWindow.
void SwapBuffers (bool bWaitForVSync)
 See IRenderWindow.
HWND GetWindowHandle () const
 Return the Win32 window handle.
HDC GetHDC () const
 Return the handle of the device context object.
virtual void WindowMovedOrResized (void)
 Method for dealing with resize / move & 3d library.
bool IsReady () const
void SetReady (bool bSet)
void SetActive (bool bSet)
 Used to set the active state of the render target.

Static Protected Member Functions

static LRESULT CALLBACK WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 Window procedure callback.

Protected Attributes

HWND m_HWnd
 Win32 Window handle.
HDC m_HDC
 Handle of the device context object.
HGLRC m_Glrc
 Handle to OpenGL rendering context.
bool m_bReady
 Is ready i.e. available for update.
bool m_bClosed
 Indicates whether the window has been closed by the user.

Detailed Description

OpenGL Win32 IRenderWindow implementation.

Definition at line 33 of file KeosWin32Window.h.


Constructor & Destructor Documentation

Keos::CWin32Window::CWin32Window (  ) 

Constructor.

Definition at line 35 of file KeosWin32Window.cpp.

References Keos::IRenderTarget::m_bActive, m_bClosed, Keos::IRenderWindow::m_bIsFullScreen, m_bReady, and m_HWnd.

Keos::CWin32Window::~CWin32Window (  ) 

Destructor.

Definition at line 45 of file KeosWin32Window.cpp.

References Destroy().


Member Function Documentation

void Keos::CWin32Window::Create ( const String strName,
uint  nWidth,
uint  nHeight,
uint  nColourDepth,
bool  bFullScreen 
) [virtual]

See IRenderWindow.

Todo:
Faire fonctionner

Implements Keos::IRenderWindow.

Definition at line 51 of file KeosWin32Window.cpp.

References Destroy(), HDC(), KEOS_OGL_LIB, Keos::ILogger::Log(), Keos::IRenderTarget::m_bIsDepthBuffered, Keos::IRenderWindow::m_bIsFullScreen, m_bReady, m_Glrc, m_HDC, m_HWnd, Keos::IRenderTarget::m_nColourDepth, Keos::IRenderTarget::m_nHeight, Keos::IRenderWindow::m_nLeft, Keos::IRenderWindow::m_nTop, Keos::IRenderTarget::m_nWidth, Keos::IRenderTarget::m_strName, OGL_EXCEPT, and WndProc().

void Keos::CWin32Window::Destroy ( void   )  [virtual]

See IRenderWindow.

Implements Keos::IRenderWindow.

Definition at line 225 of file KeosWin32Window.cpp.

References Keos::IRenderTarget::m_bActive, Keos::IRenderWindow::m_bIsFullScreen, m_Glrc, m_HDC, and m_HWnd.

Referenced by Create(), and ~CWin32Window().

bool Keos::CWin32Window::IsClosed ( void   )  const [virtual]

See IRenderWindow.

Implements Keos::IRenderWindow.

Definition at line 249 of file KeosWin32Window.cpp.

References m_bClosed.

void Keos::CWin32Window::Reposition ( int  nLeft,
int  nTop 
) [virtual]

See IRenderWindow.

Todo:

Implements Keos::IRenderWindow.

Definition at line 255 of file KeosWin32Window.cpp.

void Keos::CWin32Window::Resize ( uint  nWidth,
uint  nHeight 
) [virtual]

See IRenderWindow.

Todo:
resize window

Implements Keos::IRenderWindow.

Definition at line 261 of file KeosWin32Window.cpp.

References Keos::IRenderTarget::m_nWidth.

Referenced by WindowMovedOrResized().

void Keos::CWin32Window::SwapBuffers ( bool  bWaitForVSync  )  [virtual]

See IRenderWindow.

Implements Keos::IRenderWindow.

Definition at line 278 of file KeosWin32Window.cpp.

References HDC(), and m_HDC.

HWND Keos::CWin32Window::GetWindowHandle (  )  const [inline]

Return the Win32 window handle.

Definition at line 71 of file KeosWin32Window.h.

References m_HWnd.

Referenced by WindowMovedOrResized().

HDC Keos::CWin32Window::GetHDC (  )  const [inline]

Return the handle of the device context object.

Definition at line 78 of file KeosWin32Window.h.

References m_HDC.

void Keos::CWin32Window::WindowMovedOrResized ( void   )  [virtual]

Method for dealing with resize / move & 3d library.

Definition at line 270 of file KeosWin32Window.cpp.

References GetWindowHandle(), and Resize().

Referenced by WndProc().

bool Keos::CWin32Window::IsReady (  )  const [inline]

Definition at line 87 of file KeosWin32Window.h.

References m_bReady.

void Keos::CWin32Window::SetReady ( bool  bSet  )  [inline]

Definition at line 91 of file KeosWin32Window.h.

References m_bReady.

void Keos::CWin32Window::SetActive ( bool  bSet  )  [inline, virtual]

Used to set the active state of the render target.

Reimplemented from Keos::IRenderTarget.

Definition at line 95 of file KeosWin32Window.h.

References Keos::IRenderTarget::m_bActive.

LRESULT Keos::CWin32Window::WndProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
) [static, protected]

Window procedure callback.

Definition at line 284 of file KeosWin32Window.cpp.

References Keos::CSingleton< T >::Instance(), Keos::IRenderTarget::m_bActive, m_bClosed, m_bReady, m_HWnd, Keos::IRenderTarget::Update(), and WindowMovedOrResized().

Referenced by Create().


Member Data Documentation

HWND Keos::CWin32Window::m_HWnd [protected]

Win32 Window handle.

Definition at line 103 of file KeosWin32Window.h.

Referenced by Create(), CWin32Window(), Destroy(), GetWindowHandle(), and WndProc().

HDC Keos::CWin32Window::m_HDC [protected]

Handle of the device context object.

Definition at line 105 of file KeosWin32Window.h.

Referenced by Create(), Destroy(), GetHDC(), and SwapBuffers().

HGLRC Keos::CWin32Window::m_Glrc [protected]

Handle to OpenGL rendering context.

Definition at line 107 of file KeosWin32Window.h.

Referenced by Create(), and Destroy().

bool Keos::CWin32Window::m_bReady [protected]

Is ready i.e. available for update.

Definition at line 109 of file KeosWin32Window.h.

Referenced by Create(), CWin32Window(), IsReady(), SetReady(), and WndProc().

bool Keos::CWin32Window::m_bClosed [protected]

Indicates whether the window has been closed by the user.

Definition at line 111 of file KeosWin32Window.h.

Referenced by CWin32Window(), IsClosed(), and WndProc().


The documentation for this class was generated from the following files:
Generated on Fri Mar 9 14:29:33 2007 for Keos by  doxygen 1.5.1-p1