Top-level window class. More...
#include <display_window.h>
Public Member Functions | |
virtual void | bring_to_front ()=0 |
Raises the window on top of other windows. More... | |
virtual void | capture_mouse (bool capture)=0 |
Capture/Release the mouse. More... | |
virtual Pointf | client_to_screen (const Pointf &client)=0 |
Convert from window client coordinates to screen coordinates. More... | |
virtual PixelBufferPtr | clipboard_image () const =0 |
Returns an image stored in the clipboard. Returns a null pixelbuffer if no image is available. More... | |
virtual std::string | clipboard_text () const =0 |
Returns the text stored in the clipboard. More... | |
virtual void | enable_alpha_channel (const Rectf &blur_rect)=0 |
Enable alpha channel for this window. More... | |
virtual void | extend_frame_into_client_area (float left, float top, float right, float bottom)=0 |
Exend the window frame into the client area. More... | |
virtual void | flip (int interval=-1)=0 |
Flip back buffer to front, making changes visible on screen. More... | |
virtual std::function< bool()> & | func_minimize_clicked ()=0 |
Callback called when a window is asked to minimize itself. More... | |
virtual std::function< void(Rectf &)> & | func_window_resize ()=0 |
Callback called when a window is being resized. More... | |
virtual const std::vector< InputDevicePtr > & | game_controllers () const =0 |
Returns the game controller input device. More... | |
virtual const GraphicContextPtr & | gc () const =0 |
Return the graphic context for the window. More... | |
virtual Rectf | geometry () const =0 |
Returns the position and size of the window frame. More... | |
virtual DisplayWindowHandle | handle () const =0 |
Returns an platform-specific internal display window handle object. More... | |
virtual bool | has_focus () const =0 |
Returns true if window has focus. More... | |
virtual void | hide ()=0 |
Hides the window. More... | |
virtual void | hide_cursor ()=0 |
Hides the mouse cursor. More... | |
const InputDevicePtr & | input_device (const std::string &device_name) const |
Returns the input device with the given device name. More... | |
virtual bool | is_clipboard_image_available () const =0 |
Returns true if an image is available in the clipboard. More... | |
virtual bool | is_clipboard_text_available () const =0 |
Returns true if text is available in the clipboard. More... | |
virtual bool | is_fullscreen () const =0 |
Returns true if window is currently running fullscreen. More... | |
virtual bool | is_maximized () const =0 |
Returns true if the window is maximized. More... | |
virtual bool | is_minimized () const =0 |
Returns true if the window is minimized. More... | |
virtual bool | is_visible () const =0 |
returns true if this display window is visible More... | |
virtual const InputDevicePtr & | keyboard () const =0 |
Returns the keyboard input device. More... | |
virtual void | maximize ()=0 |
Maximizes the window. More... | |
virtual Sizef | maximum_size (bool client_area=false)=0 |
Returns the maximum size the window can be resized to by the application user. More... | |
virtual void | minimize ()=0 |
Minimizes the window. More... | |
virtual Sizef | minimum_size (bool client_area=false)=0 |
Returns the minimum size the window can be resized to by the application user. More... | |
virtual const InputDevicePtr & | mouse () const =0 |
Returns the mouse input device. More... | |
virtual void | request_repaint ()=0 |
Invalidates the screen, causing a repaint. More... | |
virtual void | restore ()=0 |
Restores the window. More... | |
virtual Pointf | screen_to_client (const Pointf &screen)=0 |
Convert from screen coordinates to client coordinates. More... | |
virtual void | set_clipboard_image (const PixelBufferPtr &buf)=0 |
Stores an image in the clipboard. More... | |
virtual void | set_clipboard_text (const std::string &text)=0 |
Stores text in the clipboard. More... | |
virtual void | set_cursor (const CursorPtr &cursor)=0 |
Sets the current cursor icon. More... | |
virtual void | set_cursor (StandardCursor type)=0 |
Set cursor. More... | |
virtual void | set_enabled (bool enable)=0 |
Set enabled. More... | |
virtual void | set_large_icon (const PixelBufferPtr &image)=0 |
Sets the large icon used for this window. More... | |
virtual void | set_maximum_size (float width, float height, bool client_area)=0 |
Maximum size a window can be resized to by the application user. More... | |
virtual void | set_minimum_size (float width, float height, bool client_area)=0 |
Minimum size a window can be resized to by the application user. More... | |
virtual void | set_position (const Rectf &pos, bool client_area)=0 |
Set window position and size. More... | |
virtual void | set_position (float x, float y)=0 |
Set window position. More... | |
virtual void | set_size (float width, float height, bool client_area)=0 |
Resize window. More... | |
virtual void | set_small_icon (const PixelBufferPtr &image)=0 |
Sets the small icon used for this window. More... | |
virtual void | set_title (const std::string &title)=0 |
Change window title. More... | |
void | set_visible (bool visible, bool activate) |
Set visible. More... | |
virtual void | show (bool activate=true)=0 |
Displays the window in its current size and position. More... | |
virtual void | show_cursor ()=0 |
Shows the mouse cursor. More... | |
virtual Signal< void()> & | sig_got_focus ()=0 |
Signal emitted when window gain focus. More... | |
virtual Signal< void()> & | sig_lost_focus ()=0 |
Signal emitted when window lost focus. More... | |
virtual Signal< void()> & | sig_paint ()=0 |
Signal emitted when the window is invalidated. More... | |
virtual Signal< void(float, float)> & | sig_resize ()=0 |
Signal emitted when window is resized. More... | |
virtual Signal< void()> & | sig_window_close ()=0 |
Signal emitted when window is closed. More... | |
virtual Signal< void()> & | sig_window_destroy ()=0 |
Signal emitted when window is destroyed. More... | |
virtual Signal< void()> & | sig_window_flip ()=0 |
Signal emitted when window flip() was called. More... | |
virtual Signal< void()> & | sig_window_maximized ()=0 |
Signal emitted when window is maximized. More... | |
virtual Signal< void()> & | sig_window_minimized ()=0 |
Signal emitted when window is minimized. More... | |
virtual Signal< void()> & | sig_window_moved ()=0 |
Signal emitted after a window has been moved. More... | |
virtual Signal< void()> & | sig_window_restored ()=0 |
Signal emitted when window is restored. More... | |
virtual std::string | title () const =0 |
Returns the window title. More... | |
virtual void | toggle_fullscreen ()=0 |
virtual Rectf | viewport () const =0 |
Returns the drawable area of the window (excluding window frame). More... | |
Static Public Member Functions | |
static std::shared_ptr< DisplayWindow > | create (const std::string &title, float width, float height, bool start_fullscreen=false, bool allow_resize=true, int flipping_buffers=2) |
Constructs a window. More... | |
static std::shared_ptr< DisplayWindow > | create (const DisplayWindowDescription &description) |
Top-level window class.
|
pure virtual |
Raises the window on top of other windows.
|
pure virtual |
Capture/Release the mouse.
Convert from window client coordinates to screen coordinates.
|
pure virtual |
Returns an image stored in the clipboard. Returns a null pixelbuffer if no image is available.
|
pure virtual |
Returns the text stored in the clipboard.
|
static |
Constructs a window.
title | = Titlebar text. |
width | = Width in pixels of window. |
height | = Height in pixels of window. |
start_fullscreen | = If true, window will go fullscreen. |
allow_resize | = If true, window will have resize grabbers and can be resized. |
flipping_buffers | = Number of flipping buffers in system. Default is that there is a front buffer and a back buffer. |
description | = Structure that describes how to create the display window. |
|
static |
|
pure virtual |
Enable alpha channel for this window.
This is only supported on Windows Vista and above (Else use Layered windows instead)
blur_rect | = Blur rectangle. If size = 0, then the entire window is used |
|
pure virtual |
Exend the window frame into the client area.
Only implemented on win32
|
pure virtual |
Flip back buffer to front, making changes visible on screen.
The parameter interval specifies the minimum number of video frames that are displayed before a buffer swap will occur.
If interval is set to a value of 0, buffer swaps are not synchronized to a video frame.
If interval is set to a value of -1 (the default), then it will use the buffer swap used for previous flip. If its the first flip, it will use the system default.
interval | = See note |
|
pure virtual |
Callback called when a window is asked to minimize itself.
|
pure virtual |
Callback called when a window is being resized.
|
pure virtual |
Returns the game controller input device.
|
pure virtual |
Return the graphic context for the window.
|
pure virtual |
Returns the position and size of the window frame.
|
pure virtual |
Returns an platform-specific internal display window handle object.
|
pure virtual |
Returns true if window has focus.
|
pure virtual |
Hides the window.
|
pure virtual |
Hides the mouse cursor.
const InputDevicePtr& uicore::DisplayWindow::input_device | ( | const std::string & | device_name | ) | const |
Returns the input device with the given device name.
|
pure virtual |
Returns true if an image is available in the clipboard.
|
pure virtual |
Returns true if text is available in the clipboard.
|
pure virtual |
Returns true if window is currently running fullscreen.
|
pure virtual |
Returns true if the window is maximized.
|
pure virtual |
Returns true if the window is minimized.
|
pure virtual |
returns true if this display window is visible
|
pure virtual |
Returns the keyboard input device.
|
pure virtual |
Maximizes the window.
|
pure virtual |
Returns the maximum size the window can be resized to by the application user.
|
pure virtual |
Minimizes the window.
|
pure virtual |
Returns the minimum size the window can be resized to by the application user.
|
pure virtual |
Returns the mouse input device.
|
pure virtual |
Invalidates the screen, causing a repaint.
|
pure virtual |
Restores the window.
Convert from screen coordinates to client coordinates.
|
pure virtual |
Stores an image in the clipboard.
|
pure virtual |
Stores text in the clipboard.
|
pure virtual |
Sets the current cursor icon.
|
pure virtual |
Set cursor.
type | = Standard Cursor |
|
pure virtual |
Set enabled.
|
pure virtual |
Sets the large icon used for this window.
|
pure virtual |
Maximum size a window can be resized to by the application user.
|
pure virtual |
Minimum size a window can be resized to by the application user.
|
pure virtual |
Set window position and size.
pos | = Window position and size. |
client_area | = true - Position relative to window client area |
|
pure virtual |
Set window position.
x | Window x position on desktop. |
y | Window y position on desktop. |
|
pure virtual |
Resize window.
width | = New width of window in pixels. |
height | = New height of window in pixels. |
client_area | = true - relative to the window client area |
|
pure virtual |
Sets the small icon used for this window.
|
pure virtual |
Change window title.
void uicore::DisplayWindow::set_visible | ( | bool | visible, |
bool | activate | ||
) |
Set visible.
|
pure virtual |
Displays the window in its current size and position.
|
pure virtual |
Shows the mouse cursor.
|
pure virtual |
Signal emitted when window gain focus.
|
pure virtual |
Signal emitted when window lost focus.
|
pure virtual |
Signal emitted when the window is invalidated.
|
pure virtual |
Signal emitted when window is resized.
|
pure virtual |
Signal emitted when window is closed.
|
pure virtual |
Signal emitted when window is destroyed.
|
pure virtual |
|
pure virtual |
Signal emitted when window is maximized.
|
pure virtual |
Signal emitted when window is minimized.
|
pure virtual |
Signal emitted after a window has been moved.
|
pure virtual |
Signal emitted when window is restored.
|
pure virtual |
Returns the window title.
|
pure virtual |
Toggle fullscreen Only Win32 implementation for now
|
pure virtual |
Returns the drawable area of the window (excluding window frame).