Drag[en]gine Game Engine  1.21
deRenderWindow Class Reference

Render window. More...

#include <deRenderWindow.h>

Inheritance diagram for deRenderWindow:
deResource deObject

Public Types

typedef deTObjectReference< deRenderWindowRef
 Type holding strong reference. More...
 
- Public Types inherited from deResource
typedef deTObjectReference< deResourceRef
 Type holding strong reference. More...
 
- Public Types inherited from deObject
typedef deTObjectReference< deObjectRef
 Type holding strong reference. More...
 

Public Member Functions

Management
int GetWidth () const
 Hosting render window or NULL if not set. 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...
 
deImageGetIcon () const
 Icon. More...
 
void SetIcon (deImage *icon)
 Set icon. 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.

Member Typedef Documentation

◆ Ref

Type holding strong reference.

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.

◆ GetHeight()

int deRenderWindow::GetHeight ( ) const
inline

Height in pixels.

◆ GetIcon()

deImage* deRenderWindow::GetIcon ( ) const
inline

Icon.

◆ GetNotifyScriptOnResize()

bool deRenderWindow::GetNotifyScriptOnResize ( ) const
inline

Script is notified about the window changing size.

◆ 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.

◆ GetPeerGraphic()

deBaseGraphicRenderWindow* deRenderWindow::GetPeerGraphic ( ) const
inline

Graphic system peer or NULL if not set.

◆ GetTitle()

const decString& deRenderWindow::GetTitle ( ) const
inline

Render window title.

◆ GetWidth()

int deRenderWindow::GetWidth ( ) const
inline

Hosting render window or NULL if not set.

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.

Render window.

Set render window.

For use by Graphic Module only.

Width in pixels.

◆ SetFullScreen()

void deRenderWindow::SetFullScreen ( bool  fullscreen)

Set if the window is full screen.

◆ SetIcon()

void deRenderWindow::SetIcon ( deImage icon)

Set icon.

◆ SetNotifyScriptOnResize()

void deRenderWindow::SetNotifyScriptOnResize ( bool  notify)

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

◆ 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.

◆ SetPeerGraphic()

void deRenderWindow::SetPeerGraphic ( deBaseGraphicRenderWindow peer)

Set graphic system peer or NULL if not set.

◆ SetSize()

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

Set size in pixels.

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

◆ SetTitle()

void deRenderWindow::SetTitle ( const char *  title)

Set render window title.


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