![]() |
Public API Reference |
![]() |
This interface represents a native window. More...
#include <ivideo/natwin.h>
Public Types | |
enum | WindowDecoration { decoCaption, decoClientFrame } |
Window decorations that can be shown or hidden. More... | |
Public Member Functions | |
virtual bool | FitSizeToWorkingArea (int &desiredWidth, int &desiredHeight)=0 |
Take a desired window contents size and compute a contents size so the window would (in windowed mode) fit onto the current working area. | |
virtual bool | GetWindowDecoration (WindowDecoration decoration)=0 |
Return whether a decoration is visible. | |
virtual void | SetIcon (iImage *image)=0 |
Sets the icon of this window with the provided one. | |
virtual void | SetTitle (const char *title)=0 |
Set the title for this window. | |
virtual void | SetTitle (const wchar_t *title)=0 |
Set the title for this window. | |
virtual bool | SetWindowDecoration (WindowDecoration decoration, bool flag)=0 |
Show or hide a window decoration. | |
Window transparency | |
Window transparency allows windows to be transparent, that is, the background behind it shows through (desktop, other windows...) where the framebuffer alpha is not opaque. (Clearing the framebuffer leaves the alpha at zero - fully transparent - so not rendering every pixel would be enough to see something.) Note that window transparency is not available on all platforms or certain configurations:
| |
virtual bool | IsWindowTransparencyAvailable ()=0 |
Return whether window transparency is available. | |
virtual bool | SetWindowTransparent (bool transparent)=0 |
Set whether window transparency is desired. | |
virtual bool | GetWindowTransparent ()=0 |
Query the window transparency state. |
This interface represents a native window.
Main ways to get pointers to this interface:
Window decorations that can be shown or hidden.
virtual bool iNativeWindow::FitSizeToWorkingArea | ( | int & | desiredWidth, |
int & | desiredHeight | ||
) | [pure virtual] |
Take a desired window contents size and compute a contents size so the window would (in windowed mode) fit onto the current working area.
This functions computes a size so the window would fit into the current working area, taking window decorations and frame into account. The “working area” is the area on the screen where windows are typically placed, e.g. on Windows the desktop but without the task bar. On multi-monitor systems, the workspace size depends on the monitor the window is currently on (or would be created on).
Since this function works with “content sizes” the returned sizes are suitable for passing to iGraphics2D::Resize().
desiredWidth | The desired contents width, will be corrected to fit into the workspace width. |
desiredHeight | The desired contents height, will be corrected to fit into the workspace height. |
Implemented in csGraphics2D.
virtual bool iNativeWindow::GetWindowDecoration | ( | WindowDecoration | decoration | ) | [pure virtual] |
Return whether a decoration is visible.
Implemented in csGraphics2D.
virtual bool iNativeWindow::GetWindowTransparent | ( | ) | [pure virtual] |
Query the window transparency state.
Implemented in csGraphics2D.
virtual bool iNativeWindow::IsWindowTransparencyAvailable | ( | ) | [pure virtual] |
Return whether window transparency is available.
Returns true when the current platform and OS version generally support transparency and the user enabled it.
Implemented in csGraphics2D.
virtual void iNativeWindow::SetIcon | ( | iImage * | image | ) | [pure virtual] |
Sets the icon of this window with the provided one.
image | the iImage to set as the icon of this window. |
Implemented in csGraphics2D.
virtual void iNativeWindow::SetTitle | ( | const char * | title | ) | [pure virtual] |
Set the title for this window.
title
is expected to be UTF-8 encoded. Implemented in csGraphics2D.
virtual void iNativeWindow::SetTitle | ( | const wchar_t * | title | ) | [pure virtual] |
Set the title for this window.
Implemented in csGraphics2D.
virtual bool iNativeWindow::SetWindowDecoration | ( | WindowDecoration | decoration, |
bool | flag | ||
) | [pure virtual] |
Show or hide a window decoration.
decoration | Decoration to change |
flag | Whether to show (true ) or hide (false ) a decoration. |
Implemented in csGraphics2D.
virtual bool iNativeWindow::SetWindowTransparent | ( | bool | transparent | ) | [pure virtual] |
Set whether window transparency is desired.
transparent | "Transparency desired" flag. |
Implemented in csGraphics2D.