| public | abstract |
Inheritance Graph
graph BT
Window
Window --> ReferenceCounter
WindowSDL --> Window
click Window "classUtil_1_1UI_1_1Window"
click ReferenceCounter "classUtil_1_1ReferenceCounter"
click WindowSDL "classUtil_1_1UI_1_1WindowSDL"
Description
Abstract base class for all windows.
Author: Benjamin Eikel
Date: 2010-06-28
Classes
| struct | Util::UI::Window::Properties The Property struct is used to parameterize the creation of a window. |
Cursor
| const std::shared_ptr< Cursor > & | getCursor() const Get the current cursor. |
| void | hideCursor() Hide the cursor. |
| void | setCursor(std::shared_ptr< Cursor > _cursor) |
| void | showCursor() Show the cursor. |
| void | warpCursor(int x, int y) Set the cursor to the given location inside the window. |
Protected Attributes
| uint32_t | width Stores the size of the window’s client area. |
| uint32_t | height |
| bool | shareContext |
| Properties | properties |
Public Functions
| ~Window() Destroy the window and free the allocated resources. |
|
| std::deque< Event > | fetchEvents() Return any pending events for this window. |
| uint32_t | getHeight() const Return the height of the client area of the window. |
| uint32_t | getWidth() const Return the width of the client area of the window. |
| void | swapBuffers() Swap front and back buffer of the window. |
| int32_t | getSwapInterval() const |
| void | grabInput() Grap control of mouse and keyboard input. |
| void | ungrabInput() Release control of mouse and keyboard input. |
| void | setIcon(const Bitmap & icon) Set an image that is shown as the window’s icon. |
| std::string | getClipboardText() const |
| void | setClipboardText(const std::string & text) |
| void | makeCurrent() Enables rendering to this window. |
| const Properties & | getProperties() const Returns the properties, the window was created with. |
Protected Functions
| Window(const Properties & properties) |
Documentation
function
Util::UI::Window::getCursor
| public | const | inline |
| const std::shared_ptr< Cursor > & getCursor( | ) const |
Get the current cursor.
Defined in Util/UI/Window.h:153
function
Util::UI::Window::hideCursor
| public | inline |
| void hideCursor( | ) |
Hide the cursor.
Defined in Util/UI/Window.h:157
function
Util::UI::Window::setCursor
| public | inline |
| void setCursor( | std::shared_ptr< Cursor > | _cursor ) |
Set the given cursor inside the window (only takes effect, when the cursor is visible)
Note: if _cursor is nullptr, the system’s default cursor is enabled.
Defined in Util/UI/Window.h:165
function
Util::UI::Window::showCursor
| public | inline |
| void showCursor( | ) |
Show the cursor.
Defined in Util/UI/Window.h:171
function
Util::UI::Window::warpCursor
| public | virtual |
| void warpCursor( | int | x, |
| int | y | |
| ) |
Set the cursor to the given location inside the window.
Defined in Util/UI/Window.h:178
variable
Util::UI::Window::width
| protected |
| uint32_t width |
Stores the size of the window’s client area.
Defined in Util/UI/Window.h:126
variable
Util::UI::Window::height
| protected |
| uint32_t height |
Defined in Util/UI/Window.h:126
variable
Util::UI::Window::shareContext
| protected |
| bool shareContext |
Defined in Util/UI/Window.h:127
variable
Util::UI::Window::properties
| protected |
| Properties properties |
Defined in Util/UI/Window.h:128
function
Util::UI::Window::~Window
| public | inline | virtual |
| ~Window( | ) |
Destroy the window and free the allocated resources.
Defined in Util/UI/Window.h:63
function
Util::UI::Window::fetchEvents
| public | virtual |
| std::deque< Event > fetchEvents( | ) |
Return any pending events for this window.
Defined in Util/UI/Window.h:67
function
Util::UI::Window::getHeight
| public | const | inline |
| uint32_t getHeight( | ) const |
Return the height of the client area of the window.
Defined in Util/UI/Window.h:70
function
Util::UI::Window::getWidth
| public | const | inline |
| uint32_t getWidth( | ) const |
Return the width of the client area of the window.
Defined in Util/UI/Window.h:75
function
Util::UI::Window::swapBuffers
| public | virtual |
| void swapBuffers( | ) |
Swap front and back buffer of the window.
Defined in Util/UI/Window.h:80
function
Util::UI::Window::getSwapInterval
| public | const | inline | virtual |
| int32_t getSwapInterval( | ) const |
Return the swap interval for the window (known as “sync to vblank”, or “vsync”).
Returns
A value of-1indicates that the window implementation does not support the query. A value of0means that the buffer swaps are not synchronized. A value greater than zero means that the buffer is swapped only after this number of video frames.
Defined in Util/UI/Window.h:91
function
Util::UI::Window::grabInput
| public | virtual |
| void grabInput( | ) |
Grap control of mouse and keyboard input.
Defined in Util/UI/Window.h:96
function
Util::UI::Window::ungrabInput
| public | virtual |
| void ungrabInput( | ) |
Release control of mouse and keyboard input.
Defined in Util/UI/Window.h:99
function
Util::UI::Window::setIcon
| public | virtual |
| void setIcon( | const Bitmap & | icon ) |
Set an image that is shown as the window’s icon.
Defined in Util/UI/Window.h:102
function
Util::UI::Window::getClipboardText
| public | const | virtual |
| std::string getClipboardText( | ) const |
Read text from the clipboard.
Returns
String that was stored in the clipboard, or an empty string if the clipboard was empty.
Defined in Util/UI/Window.h:110
function
Util::UI::Window::setClipboardText
| public | virtual |
| void setClipboardText( | const std::string & | text ) |
Write the given text to the clipboard.
Parameters
- text
- String that is written to the clipboard.
Defined in Util/UI/Window.h:117
function
Util::UI::Window::makeCurrent
| public | virtual |
| void makeCurrent( | ) |
Enables rendering to this window.
Defined in Util/UI/Window.h:120
function
Util::UI::Window::getProperties
| public | const | inline |
| const Properties & getProperties( | ) const |
Returns the properties, the window was created with.
Defined in Util/UI/Window.h:123
function
Util::UI::Window::Window
| protected | inline |
| Window( | const Properties & | properties ) |
Create the window and initialize a rendering context.
Defined in Util/UI/Window.h:133