|
ClanLib
2.3.7
|
Top-level window class. More...
#include <display_window.h>
Public Member Functions | |
Construction | |
| CL_DisplayWindow () | |
| Constructs a null instance. More... | |
| CL_DisplayWindow (const CL_StringRef &title, int width, int height, bool start_fullscreen=false, bool allow_resize=false, int flipping_buffers=2, CL_DisplayTarget target=CL_DisplayTarget()) | |
| Constructs a window. More... | |
| CL_DisplayWindow (const CL_DisplayWindowDescription &description, CL_DisplayTarget target=CL_DisplayTarget()) | |
| Constructs a window. More... | |
| CL_DisplayWindow (CL_DisplayWindowProvider *provider) | |
| Constructs a window. More... | |
| ~CL_DisplayWindow () | |
Attributes | |
| CL_Rect | get_geometry () const |
| Returns the position and size of the window frame. More... | |
| CL_Rect | get_viewport () const |
| Returns the drawable area of the window (excluding window frame). More... | |
| bool | is_fullscreen () const |
| Returns true if window is currently running fullscreen. More... | |
| bool | has_focus () const |
| Returns true if window has focus. More... | |
| CL_GraphicContext & | get_gc () const |
| Return the graphic context for the window. More... | |
| CL_InputContext & | get_ic () const |
| Return the input context for the window. More... | |
| CL_Signal_v0 & | sig_lost_focus () |
| Signal emitted when window lost focus. More... | |
| CL_Signal_v0 & | sig_got_focus () |
| Signal emitted when window gain focus. More... | |
| CL_Signal_v2< int, int > & | sig_resize () |
| Signal emitted when window is resized. More... | |
| CL_Signal_v1< const CL_Rect & > & | sig_paint () |
| Signal emitted when an area of the window is invalidated. More... | |
| CL_Signal_v0 & | sig_window_close () |
| Signal emitted when window is closed. More... | |
| CL_Signal_v0 & | sig_window_destroy () |
| Signal emitted when window is destroyed. More... | |
| CL_Signal_v0 & | sig_window_minimized () |
| Signal emitted when window is minimized. More... | |
| CL_Signal_v0 & | sig_window_maximized () |
| Signal emitted when window is maximized. More... | |
| CL_Signal_v0 & | sig_window_restored () |
| Signal emitted when window is restored. More... | |
| CL_Signal_v0 & | sig_window_moved () |
| Signal emitted after a window has been moved. More... | |
| CL_Callback_v1< CL_Rect & > & | func_window_resize () |
| Callback called when a window is being resized. More... | |
| CL_Callback_0< bool > & | func_minimize_clicked () |
| Callback called when a window is asked to minimize itself. More... | |
| bool | is_null () const |
| Returns true if this object is invalid. More... | |
| void | throw_if_null () const |
| Throw an exception if this object is invalid. More... | |
| bool | is_visible () const |
| returns true if this display window is visible More... | |
| bool | is_minimized () const |
| Returns true if the window is minimized. More... | |
| bool | is_maximized () const |
| Returns true if the window is maximized. More... | |
| CL_DisplayWindowProvider * | get_provider () const |
| Returns the display window provider. More... | |
| bool | is_clipboard_text_available () const |
| Returns true if text is available in the clipboard. More... | |
| bool | is_clipboard_image_available () const |
| Returns true if an image is available in the clipboard. More... | |
| CL_String | get_clipboard_text () const |
| Returns the text stored in the clipboard. More... | |
| CL_PixelBuffer | get_clipboard_image () const |
| Returns an image stored in the clipboard. More... | |
| CL_Size | get_minimum_size (bool client_area=false) |
| Returns the minimum size the window can be resized to by the application user. More... | |
| CL_Size | get_maximum_size (bool client_area=false) |
| Returns the maximum size the window can be resized to by the application user. More... | |
| CL_String | get_title () const |
| Returns the window title. More... | |
| Display * | get_display () const |
| Returns the X11 display handle. More... | |
| Window | get_window () const |
| Handle to X11 window handle. More... | |
Operations | |
| CL_Point | client_to_screen (const CL_Point &client) |
| Convert from window client coordinates to screen coordinates. More... | |
| CL_Point | screen_to_client (const CL_Point &screen) |
| Convert from screen coordinates to client coordinates. More... | |
| void | capture_mouse (bool capture) |
| Capture/Release the mouse. More... | |
| void | request_repaint (const CL_Rect &rect) |
| Invalidates a region of a screen, causing a repaint. More... | |
| void | set_title (const CL_StringRef &title) |
| Change window title. More... | |
| void | set_position (const CL_Rect &pos, bool client_area) |
| Set window position and size. More... | |
| void | set_position (int x, int y) |
| Set window position and size. More... | |
| void | set_enabled (bool enable) |
| Set enabled. More... | |
| void | set_visible (bool visible, bool activate) |
| Set visible. More... | |
| void | set_size (int width, int height, bool client_area) |
| Resize window. More... | |
| void | set_minimum_size (int width, int height, bool client_area) |
| Minimum size a window can be resized to by the application user. More... | |
| void | set_maximum_size (int width, int height, bool client_area) |
| Maximum size a window can be resized to by the application user. More... | |
| void | minimize () |
| Minimizes the window. More... | |
| void | restore () |
| Restores the window. More... | |
| void | maximize () |
| Maximizes the window. More... | |
| void | show (bool activate=true) |
| Displays the window in its current size and position. More... | |
| void | hide () |
| Hides the window. More... | |
| void | bring_to_front () |
| Raises the window on top of other windows. More... | |
| void | update (const CL_Rect &rect) |
| Copy the specified rectangle area from back buffer to front buffer. More... | |
| void | flip (int interval=-1) |
| Flip back buffer to front, making changes visible on screen. More... | |
| void | show_cursor () |
| Shows the mouse cursor. More... | |
| void | set_cursor (const CL_Cursor &cursor) |
| Sets the current cursor icon. More... | |
| void | set_cursor (CL_StandardCursor type) |
| Set cursor. More... | |
| void | hide_cursor () |
| Hides the mouse cursor. More... | |
| void | set_clipboard_text (const CL_StringRef &text) |
| Stores text in the clipboard. More... | |
| void | set_clipboard_image (const CL_PixelBuffer &buf) |
| Stores an image in the clipboard. More... | |
| void | set_large_icon (const CL_PixelBuffer &image) |
| Sets the large icon used for this window. More... | |
| void | set_small_icon (const CL_PixelBuffer &image) |
| Sets the small icon used for this window. More... | |
Top-level window class.
| CL_DisplayWindow::CL_DisplayWindow | ( | ) |
Constructs a null instance.
| CL_DisplayWindow::CL_DisplayWindow | ( | const CL_StringRef & | title, |
| int | width, | ||
| int | height, | ||
| bool | start_fullscreen = false, |
||
| bool | allow_resize = false, |
||
| int | flipping_buffers = 2, |
||
| CL_DisplayTarget | target = CL_DisplayTarget() |
||
| ) |
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. |
| target | = Display target used to create the window. |
| CL_DisplayWindow::CL_DisplayWindow | ( | const CL_DisplayWindowDescription & | description, |
| CL_DisplayTarget | target = CL_DisplayTarget() |
||
| ) |
Constructs a window.
| description | = Structure that describes how to create the display window. |
| target | = Display target used to create the window. |
| CL_DisplayWindow::CL_DisplayWindow | ( | CL_DisplayWindowProvider * | provider) |
Constructs a window.
| provider | = Display target implementation object. |
| CL_DisplayWindow::~CL_DisplayWindow | ( | ) |
| void CL_DisplayWindow::bring_to_front | ( | ) |
Raises the window on top of other windows.
| void CL_DisplayWindow::capture_mouse | ( | bool | capture) |
Capture/Release the mouse.
Convert from window client coordinates to screen coordinates.
| void CL_DisplayWindow::flip | ( | int | interval = -1) |
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 |
| CL_Callback_0<bool>& CL_DisplayWindow::func_minimize_clicked | ( | ) |
Callback called when a window is asked to minimize itself.
| CL_Callback_v1<CL_Rect &>& CL_DisplayWindow::func_window_resize | ( | ) |
Callback called when a window is being resized.
| CL_PixelBuffer CL_DisplayWindow::get_clipboard_image | ( | ) | const |
Returns an image stored in the clipboard.
Returns a null pixelbuffer if no image is available.
| CL_String CL_DisplayWindow::get_clipboard_text | ( | ) | const |
Returns the text stored in the clipboard.
| Display* CL_DisplayWindow::get_display | ( | ) | const |
Returns the X11 display handle.
| CL_GraphicContext& CL_DisplayWindow::get_gc | ( | ) | const |
Return the graphic context for the window.
| CL_Rect CL_DisplayWindow::get_geometry | ( | ) | const |
Returns the position and size of the window frame.
| CL_InputContext& CL_DisplayWindow::get_ic | ( | ) | const |
Return the input context for the window.
| CL_Size CL_DisplayWindow::get_maximum_size | ( | bool | client_area = false) |
Returns the maximum size the window can be resized to by the application user.
| CL_Size CL_DisplayWindow::get_minimum_size | ( | bool | client_area = false) |
Returns the minimum size the window can be resized to by the application user.
| CL_DisplayWindowProvider* CL_DisplayWindow::get_provider | ( | ) | const |
Returns the display window provider.
| CL_String CL_DisplayWindow::get_title | ( | ) | const |
Returns the window title.
| CL_Rect CL_DisplayWindow::get_viewport | ( | ) | const |
Returns the drawable area of the window (excluding window frame).
| Window CL_DisplayWindow::get_window | ( | ) | const |
Handle to X11 window handle.
| bool CL_DisplayWindow::has_focus | ( | ) | const |
Returns true if window has focus.
| void CL_DisplayWindow::hide | ( | ) |
Hides the window.
| void CL_DisplayWindow::hide_cursor | ( | ) |
Hides the mouse cursor.
| bool CL_DisplayWindow::is_clipboard_image_available | ( | ) | const |
Returns true if an image is available in the clipboard.
| bool CL_DisplayWindow::is_clipboard_text_available | ( | ) | const |
Returns true if text is available in the clipboard.
| bool CL_DisplayWindow::is_fullscreen | ( | ) | const |
Returns true if window is currently running fullscreen.
| bool CL_DisplayWindow::is_maximized | ( | ) | const |
Returns true if the window is maximized.
| bool CL_DisplayWindow::is_minimized | ( | ) | const |
Returns true if the window is minimized.
|
inline |
Returns true if this object is invalid.
| bool CL_DisplayWindow::is_visible | ( | ) | const |
returns true if this display window is visible
| void CL_DisplayWindow::maximize | ( | ) |
Maximizes the window.
| void CL_DisplayWindow::minimize | ( | ) |
Minimizes the window.
| void CL_DisplayWindow::request_repaint | ( | const CL_Rect & | rect) |
Invalidates a region of a screen, causing a repaint.
| void CL_DisplayWindow::restore | ( | ) |
Restores the window.
Convert from screen coordinates to client coordinates.
| void CL_DisplayWindow::set_clipboard_image | ( | const CL_PixelBuffer & | buf) |
Stores an image in the clipboard.
| void CL_DisplayWindow::set_clipboard_text | ( | const CL_StringRef & | text) |
Stores text in the clipboard.
| void CL_DisplayWindow::set_cursor | ( | const CL_Cursor & | cursor) |
Sets the current cursor icon.
| void CL_DisplayWindow::set_cursor | ( | CL_StandardCursor | type) |
Set cursor.
| type | = Standard Cursor |
| void CL_DisplayWindow::set_enabled | ( | bool | enable) |
Set enabled.
| enable | = bool |
| void CL_DisplayWindow::set_large_icon | ( | const CL_PixelBuffer & | image) |
Sets the large icon used for this window.
| void CL_DisplayWindow::set_maximum_size | ( | int | width, |
| int | height, | ||
| bool | client_area | ||
| ) |
Maximum size a window can be resized to by the application user.
| void CL_DisplayWindow::set_minimum_size | ( | int | width, |
| int | height, | ||
| bool | client_area | ||
| ) |
Minimum size a window can be resized to by the application user.
| void CL_DisplayWindow::set_position | ( | const CL_Rect & | pos, |
| bool | client_area | ||
| ) |
Set window position and size.
| pos | = Window position and size. |
| client_area | = true - Position relative to window client area |
| void CL_DisplayWindow::set_position | ( | int | x, |
| int | y | ||
| ) |
Set window position and size.
| x | Window x position on desktop. |
| y | Window y position on desktop. |
| void CL_DisplayWindow::set_size | ( | int | width, |
| int | height, | ||
| bool | client_area | ||
| ) |
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 |
| void CL_DisplayWindow::set_small_icon | ( | const CL_PixelBuffer & | image) |
Sets the small icon used for this window.
| void CL_DisplayWindow::set_title | ( | const CL_StringRef & | title) |
Change window title.
| void CL_DisplayWindow::set_visible | ( | bool | visible, |
| bool | activate | ||
| ) |
Set visible.
| visible | = bool |
| activate | = bool |
| void CL_DisplayWindow::show | ( | bool | activate = true) |
Displays the window in its current size and position.
| void CL_DisplayWindow::show_cursor | ( | ) |
Shows the mouse cursor.
| CL_Signal_v0& CL_DisplayWindow::sig_got_focus | ( | ) |
Signal emitted when window gain focus.
| CL_Signal_v0& CL_DisplayWindow::sig_lost_focus | ( | ) |
Signal emitted when window lost focus.
| CL_Signal_v1<const CL_Rect &>& CL_DisplayWindow::sig_paint | ( | ) |
Signal emitted when an area of the window is invalidated.
| CL_Signal_v2<int, int>& CL_DisplayWindow::sig_resize | ( | ) |
Signal emitted when window is resized.
| CL_Signal_v0& CL_DisplayWindow::sig_window_close | ( | ) |
Signal emitted when window is closed.
| CL_Signal_v0& CL_DisplayWindow::sig_window_destroy | ( | ) |
Signal emitted when window is destroyed.
| CL_Signal_v0& CL_DisplayWindow::sig_window_maximized | ( | ) |
Signal emitted when window is maximized.
| CL_Signal_v0& CL_DisplayWindow::sig_window_minimized | ( | ) |
Signal emitted when window is minimized.
| CL_Signal_v0& CL_DisplayWindow::sig_window_moved | ( | ) |
Signal emitted after a window has been moved.
| CL_Signal_v0& CL_DisplayWindow::sig_window_restored | ( | ) |
Signal emitted when window is restored.
| void CL_DisplayWindow::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
| void CL_DisplayWindow::update | ( | const CL_Rect & | rect) |
Copy the specified rectangle area from back buffer to front buffer.
| rect | Area that should be copied. |
1.8.4