Drag[en]gine Game Engine
1.21
|
Render window. More...
#include <deRenderWindow.h>
Public Types | |
typedef deTObjectReference< deRenderWindow > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deResource | |
typedef deTObjectReference< deResource > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deObject | |
typedef deTObjectReference< deObject > | Ref |
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 decString & | GetTitle () const |
Render window title. More... | |
void | SetTitle (const char *title) |
Set render window title. More... | |
deImage * | GetIcon () const |
Icon. More... | |
void | SetIcon (deImage *icon) |
Set icon. More... | |
deCanvasView * | GetCanvasView () const |
Canvas defining the content to render. More... | |
System Peers | |
deBaseGraphicRenderWindow * | GetPeerGraphic () 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 | |
deResourceManager * | GetResourceManager () const |
Resource manager or NULL if resource is leaking. More... | |
deEngine * | GetEngine () const |
Game engine object from resource manager. More... | |
deResource * | GetLLManagerPrev () const |
Previous resource in the resource manager linked list. More... | |
void | SetLLManagerPrev (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
deResource * | GetLLManagerNext () 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... | |
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.
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.
Type holding strong reference.
deRenderWindow::deRenderWindow | ( | deRenderWindowManager * | manager | ) |
Create render window.
|
protectedvirtual |
Clean up render window.
|
inline |
Canvas defining the content to render.
The canvas view is automatically resized to fill the entire window.
|
inline |
Window is full screen.
|
inline |
Height in pixels.
|
inline |
Icon.
|
inline |
Script is notified about the window changing size.
|
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.
|
inline |
Graphic system peer or NULL if not set.
|
inline |
Render window title.
|
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.
void deRenderWindow::SetFullScreen | ( | bool | fullscreen | ) |
Set if the window is full screen.
void deRenderWindow::SetIcon | ( | deImage * | icon | ) |
Set icon.
void deRenderWindow::SetNotifyScriptOnResize | ( | bool | notify | ) |
Set if the script is notified about the window chaning size.
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.
void deRenderWindow::SetPeerGraphic | ( | deBaseGraphicRenderWindow * | peer | ) |
Set graphic system peer or NULL if not set.
void deRenderWindow::SetSize | ( | int | width, |
int | height | ||
) |
Set size in pixels.
deeInvalidParam | width is less than 1. |
deeInvalidParam | height is less than 1. |
void deRenderWindow::SetTitle | ( | const char * | title | ) |
Set render window title.