Display window description class. More...
#include <display_window_description.h>
Public Member Functions | |
DisplayWindowDescription () | |
Constructs a window description with default values. More... | |
DisplayWindowDescription (const std::string &title) | |
Constructs a window description with default values and a title. More... | |
DisplayWindowDescription (const std::string &title, const Rectf &position, bool client_area) | |
Constructs a window description with default values, a title and a position. More... | |
DisplayWindowDescription (const std::string &title, const Sizef &size, bool client_area) | |
Constructs a window description with default values, a title and a size. More... | |
DisplayWindowDescription (const Rectf &position, bool client_area) | |
Constructs a window description with default values and a position. More... | |
DisplayWindowDescription (const DisplayWindowDescription ©) | |
Constructs a DisplayWindowDescription. More... | |
~DisplayWindowDescription () | |
bool | allow_alt_enter () const |
Returns true if alt-enter enters fullscreen or not. More... | |
bool | allow_resize () const |
Returns true if window should be resizeable. More... | |
bool | allow_screensaver () const |
Returns true if the screensaver is allowed. More... | |
int | bpp () const |
Returns the numbers of bytes per pixel in the window. More... | |
int | depth_size () const |
Returns the minimum required depth buffer. More... | |
int | flipping_buffers () const |
Returns the amount of flipping buffers to be created. More... | |
int | fullscreen_monitor () const |
Returns the index of the monitor to go fullscreen on. See ScreenInfo. More... | |
DisplayWindowHandle | handle () const |
bool | has_caption () const |
Returns true if a title bar is shown. More... | |
bool | has_drop_shadow () const |
Returns true if the window is drawn with a drop shadow effect. More... | |
bool | has_maximize_button () const |
Returns true if the window has a maximize button. More... | |
bool | has_minimize_button () const |
Returns true if the window has a minimize button. More... | |
bool | has_no_activate () const |
Indicates if window is automatically activated or not. More... | |
bool | has_sysmenu () const |
Returns true if the window has a window menu on its title bar. More... | |
bool | is_dialog () const |
Returns true if it is a dialog window. More... | |
bool | is_fullscreen () const |
Returns if window should be initially fullscreen. More... | |
bool | is_layered () const |
Returns true if window is layered (black is transparent) More... | |
bool | is_main () const |
Returns true if it is a main window. More... | |
bool | is_popup () const |
Returns true if it is a popup window. More... | |
bool | is_topmost () const |
Returns true if the window should be placed above all non-topmost windows. More... | |
bool | is_update_supported () const |
Returns true if DisplayWindow::update should be supported. More... | |
bool | is_visible () const |
Returns true if the window is initially visible. More... | |
int | multisampling () const |
Returns the number of samples per pixel. More... | |
DisplayWindowDescription & | operator= (const DisplayWindowDescription ©) |
Copy assignment operator. More... | |
DisplayWindowPtr | owner () const |
Returns the window owning this one. More... | |
Rectf | position () const |
Returns the initial position of the window. More... | |
bool | position_client_area () const |
Returns if the client area is used for the initial position of the window. More... | |
int | refresh_rate () const |
void | set_allow_alt_enter (bool value=true) |
Sets if alt-enter switches to fullscreen or not. More... | |
void | set_allow_resize (bool allow_resize=true) |
Sets if windows should be resizable. More... | |
void | set_allow_screensaver (bool allow_screensaver=true) |
Allow the screensaver to appear. More... | |
void | set_bpp (int bpp) |
Sets the number of bytes per pixel. More... | |
void | set_depth_size (int value) |
Sets the minimum required depth buffer. More... | |
void | set_dialog_window () |
Display the window as a modal dialog. More... | |
void | set_drop_shadow (bool value=true) |
Enables a drop shadow effect on the window. More... | |
void | set_flipping_buffers (int num_buffers=2) |
Sets the amount of flipping buffers to be used. More... | |
void | set_fullscreen (bool fullscreen=true, int monitor=0) |
Makes the window initially fullscreen. More... | |
void | set_handle (DisplayWindowHandle handle) |
void | set_layered (bool layered) |
Creates a layered window (complex shaped window) More... | |
void | set_main_window () |
Display this window as of the main windows of the application. More... | |
void | set_multisampling (int value) |
Sets the number of samples per pixel. More... | |
void | set_no_activate (bool value=true) |
Prevents window from being automatically activated. More... | |
void | set_owner_window (const DisplayWindowPtr &owner) |
Specifies another window which owns this one. More... | |
void | set_popup_window () |
Display the window as a popup. More... | |
void | set_position (const Rectf &position, bool client_area) |
Sets the position of the window (including window frame). More... | |
void | set_refresh_rate (int refresh_rate) |
void | set_size (const Sizef &size, bool client_area) |
Sets the size of the window (including window frame). More... | |
void | set_stencil_size (int value) |
Sets the minimum required stencil buffer. More... | |
void | set_swap_interval (int interval=-1) |
Sets the swap interval to be used for the window. More... | |
void | set_title (const std::string &title) |
Sets the title of the window. More... | |
void | set_topmost (bool value=true) |
Sets if the window should be placed above all non-topmost windows. More... | |
void | set_update_supported (bool value) const |
Controls if DisplayWindow::update is supported. More... | |
void | set_visible (bool value=true) |
Toggles whether the window is created as initially visible. More... | |
void | show_caption (bool value=true) |
Controls if a title bar (including frame) is shown or not. More... | |
void | show_maximize_button (bool value=true) |
Sets if the window has a maximize button. More... | |
void | show_minimize_button (bool value=true) |
Sets if the window has a minimize button. More... | |
void | show_sysmenu (bool value=true) |
Sets if the window has a window menu on its title bar. More... | |
Sizef | size () const |
Returns the size of the window stored in description. More... | |
int | stencil_size () const |
Returns the minimum required stencil buffer. More... | |
int | swap_interval () const |
Returns the swap interval to be used for the window. More... | |
const std::string & | title () const |
Returns the window title stored in the description. More... | |
Display window description class.
This class allows you to setup a more advanced description when creating a display window.
uicore::DisplayWindowDescription::DisplayWindowDescription | ( | ) |
Constructs a window description with default values.
uicore::DisplayWindowDescription::DisplayWindowDescription | ( | const std::string & | title | ) |
Constructs a window description with default values and a title.
uicore::DisplayWindowDescription::DisplayWindowDescription | ( | const std::string & | title, |
const Rectf & | position, | ||
bool | client_area | ||
) |
Constructs a window description with default values, a title and a position.
uicore::DisplayWindowDescription::DisplayWindowDescription | ( | const std::string & | title, |
const Sizef & | size, | ||
bool | client_area | ||
) |
Constructs a window description with default values, a title and a size.
uicore::DisplayWindowDescription::DisplayWindowDescription | ( | const Rectf & | position, |
bool | client_area | ||
) |
Constructs a window description with default values and a position.
uicore::DisplayWindowDescription::DisplayWindowDescription | ( | const DisplayWindowDescription & | copy | ) |
Constructs a DisplayWindowDescription.
copy | = Display Window Description |
uicore::DisplayWindowDescription::~DisplayWindowDescription | ( | ) |
bool uicore::DisplayWindowDescription::allow_alt_enter | ( | ) | const |
Returns true if alt-enter enters fullscreen or not.
bool uicore::DisplayWindowDescription::allow_resize | ( | ) | const |
Returns true if window should be resizeable.
bool uicore::DisplayWindowDescription::allow_screensaver | ( | ) | const |
Returns true if the screensaver is allowed.
int uicore::DisplayWindowDescription::bpp | ( | ) | const |
Returns the numbers of bytes per pixel in the window.
int uicore::DisplayWindowDescription::depth_size | ( | ) | const |
Returns the minimum required depth buffer.
int uicore::DisplayWindowDescription::flipping_buffers | ( | ) | const |
Returns the amount of flipping buffers to be created.
int uicore::DisplayWindowDescription::fullscreen_monitor | ( | ) | const |
Returns the index of the monitor to go fullscreen on. See ScreenInfo.
DisplayWindowHandle uicore::DisplayWindowDescription::handle | ( | ) | const |
Returns an platform-specific internal display window handle object.
bool uicore::DisplayWindowDescription::has_caption | ( | ) | const |
Returns true if a title bar is shown.
bool uicore::DisplayWindowDescription::has_drop_shadow | ( | ) | const |
Returns true if the window is drawn with a drop shadow effect.
bool uicore::DisplayWindowDescription::has_maximize_button | ( | ) | const |
Returns true if the window has a maximize button.
bool uicore::DisplayWindowDescription::has_minimize_button | ( | ) | const |
Returns true if the window has a minimize button.
bool uicore::DisplayWindowDescription::has_no_activate | ( | ) | const |
Indicates if window is automatically activated or not.
bool uicore::DisplayWindowDescription::has_sysmenu | ( | ) | const |
Returns true if the window has a window menu on its title bar.
bool uicore::DisplayWindowDescription::is_dialog | ( | ) | const |
Returns true if it is a dialog window.
bool uicore::DisplayWindowDescription::is_fullscreen | ( | ) | const |
Returns if window should be initially fullscreen.
bool uicore::DisplayWindowDescription::is_layered | ( | ) | const |
Returns true if window is layered (black is transparent)
bool uicore::DisplayWindowDescription::is_main | ( | ) | const |
Returns true if it is a main window.
bool uicore::DisplayWindowDescription::is_popup | ( | ) | const |
Returns true if it is a popup window.
bool uicore::DisplayWindowDescription::is_topmost | ( | ) | const |
Returns true if the window should be placed above all non-topmost windows.
bool uicore::DisplayWindowDescription::is_update_supported | ( | ) | const |
Returns true if DisplayWindow::update should be supported.
bool uicore::DisplayWindowDescription::is_visible | ( | ) | const |
Returns true if the window is initially visible.
int uicore::DisplayWindowDescription::multisampling | ( | ) | const |
Returns the number of samples per pixel.
DisplayWindowDescription& uicore::DisplayWindowDescription::operator= | ( | const DisplayWindowDescription & | copy | ) |
Copy assignment operator.
DisplayWindowPtr uicore::DisplayWindowDescription::owner | ( | ) | const |
Returns the window owning this one.
Rectf uicore::DisplayWindowDescription::position | ( | ) | const |
Returns the initial position of the window.
bool uicore::DisplayWindowDescription::position_client_area | ( | ) | const |
Returns if the client area is used for the initial position of the window.
int uicore::DisplayWindowDescription::refresh_rate | ( | ) | const |
Returns the refresh rate of the DisplayMode in Hertz (cycles per second). This value is also known as the vertical refresh rate.
void uicore::DisplayWindowDescription::set_allow_alt_enter | ( | bool | value = true | ) |
Sets if alt-enter switches to fullscreen or not.
void uicore::DisplayWindowDescription::set_allow_resize | ( | bool | allow_resize = true | ) |
Sets if windows should be resizable.
This is used for all window types (Main, Dialog and Popup)
void uicore::DisplayWindowDescription::set_allow_screensaver | ( | bool | allow_screensaver = true | ) |
Allow the screensaver to appear.
allow_screensaver | = Allow the allow_screensaver (default is true) |
void uicore::DisplayWindowDescription::set_bpp | ( | int | bpp | ) |
Sets the number of bytes per pixel.
void uicore::DisplayWindowDescription::set_depth_size | ( | int | value | ) |
Sets the minimum required depth buffer.
If this value is zero, the smallest available depth buffer is preferred. Otherwise, the largest available depth buffer of at least the minimum size is preferred.
void uicore::DisplayWindowDescription::set_dialog_window | ( | ) |
Display the window as a modal dialog.
Window is shown on the taskbar
void uicore::DisplayWindowDescription::set_drop_shadow | ( | bool | value = true | ) |
Enables a drop shadow effect on the window.
void uicore::DisplayWindowDescription::set_flipping_buffers | ( | int | num_buffers = 2 | ) |
Sets the amount of flipping buffers to be used.
void uicore::DisplayWindowDescription::set_fullscreen | ( | bool | fullscreen = true , |
int | monitor = 0 |
||
) |
Makes the window initially fullscreen.
void uicore::DisplayWindowDescription::set_handle | ( | DisplayWindowHandle | handle | ) |
Sets the platform-specific internal display window handle object.
void uicore::DisplayWindowDescription::set_layered | ( | bool | layered | ) |
Creates a layered window (complex shaped window)
Use with set_popup_window()
void uicore::DisplayWindowDescription::set_main_window | ( | ) |
Display this window as of the main windows of the application.
Window is shown on the taskbar
void uicore::DisplayWindowDescription::set_multisampling | ( | int | value | ) |
Sets the number of samples per pixel.
void uicore::DisplayWindowDescription::set_no_activate | ( | bool | value = true | ) |
Prevents window from being automatically activated.
void uicore::DisplayWindowDescription::set_owner_window | ( | const DisplayWindowPtr & | owner | ) |
Specifies another window which owns this one.
void uicore::DisplayWindowDescription::set_popup_window | ( | ) |
Display the window as a popup.
This is treated as a transparent window (without clickthrough). If clickthrough is also required, use set_layered_window() as well
void uicore::DisplayWindowDescription::set_position | ( | const Rectf & | position, |
bool | client_area | ||
) |
Sets the position of the window (including window frame).
The default position, is centred on the screen. If this is wanted, use set_size() instead
position | = Window position |
client_area | = false = include the window frame. true = exclude the window frame |
void uicore::DisplayWindowDescription::set_refresh_rate | ( | int | refresh_rate | ) |
Sets the refresh rate of the DisplayMode in Hertz (cycles per second). This value is also known as the vertical refresh rate.
void uicore::DisplayWindowDescription::set_size | ( | const Sizef & | size, |
bool | client_area | ||
) |
Sets the size of the window (including window frame).
size | = Window size |
client_area | = false = include the window frame. true = exclude the window frame |
void uicore::DisplayWindowDescription::set_stencil_size | ( | int | value | ) |
Sets the minimum required stencil buffer.
If this value is zero, the smallest available stencil buffer is preferred. Otherwise, the largest available stencil buffer of at least the minimum size is preferred.
void uicore::DisplayWindowDescription::set_swap_interval | ( | int | interval = -1 | ) |
Sets the swap interval to be used for the window.
void uicore::DisplayWindowDescription::set_title | ( | const std::string & | title | ) |
Sets the title of the window.
void uicore::DisplayWindowDescription::set_topmost | ( | bool | value = true | ) |
Sets if the window should be placed above all non-topmost windows.
This is used for all window types (Main, Dialog and Popup)
void uicore::DisplayWindowDescription::set_update_supported | ( | bool | value | ) | const |
Controls if DisplayWindow::update is supported.
The Direct3D target needs to know at window creation time if the application intends to update the screen by calling DisplayWindow::update.
void uicore::DisplayWindowDescription::set_visible | ( | bool | value = true | ) |
Toggles whether the window is created as initially visible.
void uicore::DisplayWindowDescription::show_caption | ( | bool | value = true | ) |
Controls if a title bar (including frame) is shown or not.
This is only used for the popup window types (Not Main and Dialog)
void uicore::DisplayWindowDescription::show_maximize_button | ( | bool | value = true | ) |
Sets if the window has a maximize button.
This is only used for the main and dialog window types (Not Popup)
void uicore::DisplayWindowDescription::show_minimize_button | ( | bool | value = true | ) |
Sets if the window has a minimize button.
This is only used for the main and dialog window types (Not Popup)
void uicore::DisplayWindowDescription::show_sysmenu | ( | bool | value = true | ) |
Sets if the window has a window menu on its title bar.
This is only used for the main window type (not Dialog and Popup)
Sizef uicore::DisplayWindowDescription::size | ( | ) | const |
Returns the size of the window stored in description.
int uicore::DisplayWindowDescription::stencil_size | ( | ) | const |
Returns the minimum required stencil buffer.
int uicore::DisplayWindowDescription::swap_interval | ( | ) | const |
Returns the swap interval to be used for the window.
const std::string& uicore::DisplayWindowDescription::title | ( | ) | const |
Returns the window title stored in the description.