XLE  v0.02.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
PlatformRig::OverlappedWindow Class Reference

An independent window in OS presentation scheme More...

#include <OverlappedWindow.h>

Inheritance diagram for PlatformRig::OverlappedWindow:
Inheritance graph
[legend]

Public Types

enum  PumpResult { Continue, Terminate }
 

Public Member Functions

const void * GetUnderlyingHandle () const
 
std::pair< Int2, Int2 > GetRect () const
 
void SetTitle (const char titleText[])
 
InputTranslatorGetInputTranslator ()
 
void AddWindowHandler (std::shared_ptr< IWindowHandler > handler)
 

Static Public Member Functions

static PumpResult DoMsgPump ()
 

Protected Attributes

std::unique_ptr< Pimpl > _pimpl
 

Detailed Description

An independent window in OS presentation scheme

Creates and manages an independent OS window. The result depends on the particular OS. But on an OS like Microsoft Windows, we should expect a new top-level window to appear. A normal game will have just one window like this, and will attach a rendering surface to the window.

To associate a presentation chain with the window, follow this example:

@code
RenderCore::IDevice* device = ...;
OverlappedWindow* window = ...;
auto rect = window->GetRect();
// create a new presentation attached to the underlying
// window handle
auto presentationChain = device->CreatePresentationChain(
window->GetUnderlyingHandle(),
rect.second[0] - rect.first[0], rect.second[1] - rect.first[1]);
for (;;;) { // start rendering / presentation loop
\endcode

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