Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

# Keos::CWin32Window Class Reference

OpenGL Win32 IRenderWindow implementation. More...

`#include <KeosWin32Window.h>`

Inheritance diagram for Keos::CWin32Window:

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 m_bClosed, 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. Implements Keos::IRenderWindow. Definition at line 51 of file KeosWin32Window.cpp. References Destroy(), HDC(), KEOS_OGL_LIB, m_bReady, m_Glrc, m_HDC, m_HWnd, OGL_EXCEPT, and WndProc().

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

| See IRenderWindow. Implements Keos::IRenderWindow. Definition at line 222 of file KeosWin32Window.cpp. References m_Glrc, m_HDC, and m_HWnd. Referenced by Create(), and ~CWin32Window().

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

| Return the handle of the device context object. Definition at line 75 of file KeosWin32Window.h. 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().

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

| See IRenderWindow. Implements Keos::IRenderWindow. Definition at line 244 of file KeosWin32Window.cpp. References m_bClosed.

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

| Definition at line 81 of file KeosWin32Window.h. References m_bReady.

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

| See IRenderWindow. Implements Keos::IRenderWindow. Definition at line 250 of file KeosWin32Window.cpp.

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

| See IRenderWindow. Implements Keos::IRenderWindow. Definition at line 256 of file KeosWin32Window.cpp. Referenced by WindowMovedOrResized().

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 83 of file KeosWin32Window.h.

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

| Definition at line 82 of file KeosWin32Window.h. References m_bReady.

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

| See IRenderWindow. Implements Keos::IRenderWindow. Definition at line 273 of file KeosWin32Window.cpp. References HDC(), and m_HDC.

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

| Method for dealing with resize / move & 3d library. Definition at line 265 of file KeosWin32Window.cpp. References GetWindowHandle(), and Resize(). Referenced by WndProc().

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

| Window procedure callback. Definition at line 279 of file KeosWin32Window.cpp. References Keos::IRenderTarget::m_bActive, m_bClosed, m_bReady, m_HWnd, Keos::IRenderTarget::Update(), and WindowMovedOrResized(). Referenced by Create().

## Member Data Documentation

bool Keos::CWin32Window::m_bClosed`[protected]`

| Indicates whether the window has been closed by the user. Definition at line 96 of file KeosWin32Window.h. Referenced by CWin32Window(), IsClosed(), and WndProc().

bool Keos::CWin32Window::m_bReady`[protected]`

| Is ready i.e. available for update. Definition at line 94 of file KeosWin32Window.h. Referenced by Create(), CWin32Window(), IsReady(), SetReady(), and WndProc().

HGLRC Keos::CWin32Window::m_Glrc`[protected]`

| Handle to OpenGL rendering context. Definition at line 92 of file KeosWin32Window.h. Referenced by Create(), and Destroy().

HDC Keos::CWin32Window::m_HDC`[protected]`

| Handle of the device context object. Definition at line 90 of file KeosWin32Window.h. Referenced by Create(), Destroy(), GetHDC(), and SwapBuffers().

HWND Keos::CWin32Window::m_HWnd`[protected]`

| Win32 Window handle. Definition at line 88 of file KeosWin32Window.h. Referenced by Create(), CWin32Window(), Destroy(), GetWindowHandle(), and WndProc().

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

- RenderSystems/OpenGL/KeosWin32Window.h
- RenderSystems/OpenGL/KeosWin32Window.cpp