Drag[en]gine Game Engine  1.0
deRenderWindow Class Reference

Render window. More...

#include <deRenderWindow.h>

Inheritance diagram for deRenderWindow:
deResource deObject

Public Member Functions

Management
Window GetHostWindow () const
 Hosting render window or NULL if not set. More...
 
void SetHostWindow (Window window)
 Set hosting render window or NULL to let the graphic system create a window. More...
 
Window GetWindow () const
 Render window. More...
 
void SetWindow (Window window)
 Set render window. More...
 
int GetWidth () const
 Width in pixels. More...
 
int GetHeight () const
 Height in pixels. More...
 
void SetSize (int width, int height)
 Set size in pixels. More...
 
bool GetFullScreen () const
 Window is full screen. More...
 
void SetFullScreen (bool fullscreen)
 Set if the window is full screen. More...
 
bool GetNotifyScriptOnResize () const
 Script is notified about the window changing size. More...
 
void SetNotifyScriptOnResize (bool notify)
 Set if the script is notified about the window chaning size. More...
 
bool GetPaint () const
 Painting enabled. More...
 
void SetPaint (bool paint)
 Set if painting is enabled. More...
 
const decStringGetTitle () const
 Render window title. More...
 
void SetTitle (const char *title)
 Set render window title. More...
 
deCanvasViewGetCanvasView () const
 Canvas defining the content to render. More...
 
System Peers
deBaseGraphicRenderWindowGetPeerGraphic () const
 Graphic system peer or NULL if not set. More...
 
void SetPeerGraphic (deBaseGraphicRenderWindow *peer)
 Set graphic system peer or NULL if not set. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deRenderWindow (deRenderWindowManager *manager)
 Create render window. More...
 
virtual ~deRenderWindow ()
 Clean up render window. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Render window.

Render windows are used by hosting applications to redirect the rendered output of an embedded engine session into one or more sub windows. The graphic module decides how the window is used for rendering. The window is peered so changing the graphic module is not a problem. The only actions required by the hosting application is to notify the render window about size changes so the graphic module can take the necessary steps.

Hosting Window Handle
For working with the hosting window handle you can use two different ways. You can either specify the hosting window using a generic function which mangles the window handle into an integer value or use an OS specific function. The generic function has the advantage that you do not have to worry about the operating system your application is running on. Most GUI toolkits provide a generic access to the window handles so you can simply carry over the value. The OS specific functions are convenient if you work with only one OS or you need specific code anyways.
Author
Pl├╝ss Roland
Version
1.0
Date
2015

Constructor & Destructor Documentation

◆ deRenderWindow()

deRenderWindow::deRenderWindow ( deRenderWindowManager manager)

Create render window.

◆ ~deRenderWindow()

virtual deRenderWindow::~deRenderWindow ( )
protectedvirtual

Clean up render window.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ GetCanvasView()

deCanvasView* deRenderWindow::GetCanvasView ( ) const
inline

Canvas defining the content to render.

The canvas view is automatically resized to fill the entire window.

◆ GetFullScreen()

bool deRenderWindow::GetFullScreen ( ) const
inline

Window is full screen.

References SetFullScreen().

◆ GetHeight()

int deRenderWindow::GetHeight ( ) const
inline

Height in pixels.

References SetSize().

◆ GetHostWindow()

Window deRenderWindow::GetHostWindow ( ) const
inline

Hosting render window or NULL if not set.

References GetWindow(), and SetHostWindow().

◆ GetNotifyScriptOnResize()

bool deRenderWindow::GetNotifyScriptOnResize ( ) const
inline

Script is notified about the window changing size.

References SetNotifyScriptOnResize().

◆ GetPaint()

bool deRenderWindow::GetPaint ( ) const
inline

Painting enabled.

Render windows can be hidden by other windows in a GUI toolkit or otherwise set invisible due to properties outside of the knowledge of the Graphic Module. Disabling painting avoids the Graphic Module wasting time rendering render window content if it is not visible.

References SetPaint().

◆ GetPeerGraphic()

deBaseGraphicRenderWindow* deRenderWindow::GetPeerGraphic ( ) const
inline

Graphic system peer or NULL if not set.

References SetPeerGraphic().

◆ GetTitle()

const decString& deRenderWindow::GetTitle ( ) const
inline

Render window title.

References SetTitle().

◆ GetWidth()

int deRenderWindow::GetWidth ( ) const
inline

Width in pixels.

◆ GetWindow()

Window deRenderWindow::GetWindow ( ) const
inline

Render window.

References SetWindow().

Referenced by GetHostWindow().

◆ SetFullScreen()

void deRenderWindow::SetFullScreen ( bool  fullscreen)

Set if the window is full screen.

Referenced by GetFullScreen().

◆ SetHostWindow()

void deRenderWindow::SetHostWindow ( Window  window)

Set hosting render window or NULL to let the graphic system create a window.

This has to be set before creating the graphic module peer. For this reason for use only by deRenderWindowManager.

Referenced by GetHostWindow().

◆ SetNotifyScriptOnResize()

void deRenderWindow::SetNotifyScriptOnResize ( bool  notify)

Set if the script is notified about the window chaning size.

Referenced by GetNotifyScriptOnResize().

◆ SetPaint()

void deRenderWindow::SetPaint ( bool  paint)

Set if painting is enabled.

Render windows can be hidden by other windows in a GUI toolkit or otherwise set invisible due to properties outside of the knowledge of the Graphic Module. Disabling painting avoids the Graphic Module wasting time rendering render window content if it is not visible.

Referenced by GetPaint().

◆ SetPeerGraphic()

void deRenderWindow::SetPeerGraphic ( deBaseGraphicRenderWindow peer)

Set graphic system peer or NULL if not set.

Referenced by GetPeerGraphic().

◆ SetSize()

void deRenderWindow::SetSize ( int  width,
int  height 
)

Set size in pixels.

Exceptions
deeInvalidParamwidth is less than 1.
deeInvalidParamheight is less than 1.

Referenced by GetHeight().

◆ SetTitle()

void deRenderWindow::SetTitle ( const char *  title)

Set render window title.

Referenced by GetTitle().

◆ SetWindow()

void deRenderWindow::SetWindow ( Window  window)

Set render window.

For use by Graphic Module only.

Referenced by GetWindow().


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