Drag[en]gine Game Engine 1.32.3
Loading...
Searching...
No Matches
deRenderWindow Class Reference

Render window. More...

#include <deRenderWindow.h>

Inheritance diagram for deRenderWindow:
deResource deObject

Public Types

using Ref = deTObjectReference< deRenderWindow >
 Type holding strong reference.
 
- Public Types inherited from deResource
using Ref = deTObjectReference< deResource >
 Type holding strong reference.
 
- Public Types inherited from deObject
using Ref = deTObjectReference< deObject >
 Type holding strong reference.
 

Public Member Functions

Management
int GetX () const
 Hosting render window or NULL if not set.
 
int GetY () const
 Y position in pixels.
 
void SetPosition (int x, int y)
 Set position in pixels.
 
int GetWidth () const
 Width in pixels.
 
int GetHeight () const
 Height in pixels.
 
void SetSize (int width, int height)
 Set size in pixels.
 
bool GetFullScreen () const
 Window is full screen.
 
void SetFullScreen (bool fullscreen)
 Set if the window is full screen.
 
int GetScaleFactor () const
 Window scale factor multiplied by 100 (monitor/DPI scaling).
 
void SetScaleFactor (int scaleFactor)
 Set window scale factor multiplied by 100 (monitor/DPI scaling).
 
bool GetHdrOutput () const
 Render window is using HDR output.
 
void SetHdrOutput (bool hdrOutput)
 Set if the render window is using HDR output.
 
bool GetNotifyScriptOnResize () const
 Script is notified about the window changing size.
 
void SetNotifyScriptOnResize (bool notify)
 Set if the script is notified about the window chaning size.
 
bool GetPaint () const
 Painting enabled.
 
void SetPaint (bool paint)
 Set if painting is enabled.
 
const decStringGetTitle () const
 Render window title.
 
void SetTitle (const char *title)
 Set render window title.
 
const deImage::RefGetIcon () const
 Icon.
 
void SetIcon (deImage *icon)
 Set icon.
 
const deCanvasView::RefGetCanvasView () const
 Canvas defining the content to render.
 
System Peers
deBaseGraphicRenderWindowGetPeerGraphic () const
 Graphic system peer or NULL if not set.
 
void SetPeerGraphic (deBaseGraphicRenderWindow *peer)
 Set graphic system peer or NULL if not set.
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking.
 
deEngineGetEngine () const
 Game engine object from resource manager.
 
decTLinkedList< deResource >::Element & GetLLManager ()
 Resource manager linked list.
 
const decTLinkedList< deResource >::Element & GetLLManager () const
 
void MarkLeaking ()
 Marks the resource leaking.
 
 deResource (deResourceManager *resourceManager)
 Create resource.
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count.
 
void AddReference ()
 Add reference increasing reference count by 1.
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0.
 
cWeakRefDataAddWeakReference ()
 Add weak reference.
 
 deObject ()
 Create object with reference count of 1.
 

Constructors and Destructors

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

Additional Inherited Members

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

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()

deRenderWindow::~deRenderWindow ( )
overrideprotected

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()

const deCanvasView::Ref & 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.

◆ GetHdrOutput()

bool deRenderWindow::GetHdrOutput ( ) const
inline

Render window is using HDR output.

◆ GetHeight()

int deRenderWindow::GetHeight ( ) const
inline

Height in pixels.

◆ GetIcon()

const deImage::Ref & 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.

◆ GetScaleFactor()

int deRenderWindow::GetScaleFactor ( ) const
inline

Window scale factor multiplied by 100 (monitor/DPI scaling).

◆ GetTitle()

const decString & deRenderWindow::GetTitle ( ) const
inline

Render window title.

◆ GetWidth()

int deRenderWindow::GetWidth ( ) const
inline

Width in pixels.

◆ GetX()

int deRenderWindow::GetX ( ) 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.

X position in pixels.

◆ GetY()

int deRenderWindow::GetY ( ) const
inline

Y position in pixels.

◆ SetFullScreen()

void deRenderWindow::SetFullScreen ( bool  fullscreen)

Set if the window is full screen.

◆ SetHdrOutput()

void deRenderWindow::SetHdrOutput ( bool  hdrOutput)

Set if the render window is using HDR output.

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

◆ SetPosition()

void deRenderWindow::SetPosition ( int  x,
int  y 
)

Set position in pixels.

◆ SetScaleFactor()

void deRenderWindow::SetScaleFactor ( int  scaleFactor)

Set window scale factor multiplied by 100 (monitor/DPI scaling).

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