Class window#
Defined in File window.h
Class Documentation#
-
class window#
Abstract class to render in a window or an image.
A class to render things in a window or an image. An icon and windowName can be set which can be shown by a window manager.
Public Types
-
enum class Type : unsigned char#
Enumeration of supported window types#
NONE: A mock window without rendering capabilities. NATIVE: A window using the native graphical stack. NATIVE_OFFSCREEN: A native window rendering to an offscreen buffer, not visible on screen. EXTERNAL: An external window that assume the OpenGL context would have been created by. another framework
Values:
-
enumerator NONE#
-
enumerator NATIVE#
-
enumerator NATIVE_OFFSCREEN#
-
enumerator EXTERNAL#
-
enumerator NONE#
Public Functions
-
virtual bool render() = 0#
Perform a render of the window to the screen. All dynamic options are updated if needed. Return true on success, false otherwise.
-
virtual image renderToImage(bool noBackground = false) = 0#
Perform a render of the window to the screen and save the result in a f3d::image. of ChannelType BYTE and 3 or 4 components (RGB or RGBA). Set noBackground to true to have a transparent background. Return the resulting f3d::image.
-
virtual int getWidth() const = 0#
Get the width of the window.
-
virtual int getHeight() const = 0#
Get the height of the window.
-
virtual window &setIcon(const unsigned char *icon, size_t iconSize) = 0#
Set the icon to be shown by a window manager. icon should be an unsigned char array. iconSize should be the sizeof(icon).
-
virtual window &setWindowName(const std::string &windowName) = 0#
Set the window name to be shown by a window manager.
-
enum class Type : unsigned char#