clan::DisplayWindowDescription Class Reference - ClanLib SDK
Description: clan::DisplayWindowDescription Class Reference

Public Member Functions | List of all members
clan::DisplayWindowDescription Class Reference
clanDisplay Window

Display window description class. More...

`#include <display_window_description.h>`

## Public Member Functions
| DisplayWindowDescription ()
| Constructs a window description with default values.
| DisplayWindowDescription (const DisplayWindowDescription &copy)
| Constructs a DisplayWindowDescription.
| DisplayWindowDescription (const Rectf &position, bool client_area)
| Constructs a window description with default values and a position.
| DisplayWindowDescription (const std::string &title)
| Constructs a window description with default values and a title.
| DisplayWindowDescription (const std::string &title, const Rectf &position, bool client_area)
| Constructs a window description with default values, a title and a position.
| DisplayWindowDescription (const std::string &title, const Sizef &size, bool client_area)
| Constructs a window description with default values, a title and a size.
| ~DisplayWindowDescription ()
bool | get_allow_resize () const
| Returns true if window should be resizeable.
bool | get_allow_screensaver () const
| Returns true if the screensaver is allowed.
int | get_bpp () const
| Returns the numbers of bytes per pixel in the window.
int | get_depth_size () const
| Returns the minimum required depth buffer.
int | get_flipping_buffers () const
| Returns the amount of flipping buffers to be created.
int | get_fullscreen_monitor () const
| Returns the index of the monitor to go fullscreen on. See ScreenInfo.
DisplayWindowHandle | get_handle () const
int | get_multisampling () const
| Returns the number of samples per pixel.
DisplayWindow | get_owner () const
| Returns the window owning this one.
Rectf | get_position () const
| Returns the initial position of the window.
bool | get_position_client_area () const
| Returns if the client area is used for the initial position of the window.
int | get_refresh_rate () const
Sizef | get_size () const
| Returns the size of the window stored in description.
int | get_stencil_size () const
| Returns the minimum required stencil buffer.
int | get_swap_interval () const
| Returns the swap interval to be used for the window.
const std::string & | get_title () const
| Returns the window title stored in the description.
bool | has_caption () const
| Returns true if a title bar is shown.
bool | has_drop_shadow () const
| Returns true if the window is drawn with a drop shadow effect.
bool | has_maximize_button () const
| Returns true if the window has a maximize button.
bool | has_minimize_button () const
| Returns true if the window has a minimize button.
bool | has_no_activate () const
| Indicates if window is automatically activated or not.
bool | has_sysmenu () const
| Returns true if the window has a window menu on its title bar.
bool | is_dialog () const
| Returns true if it is a dialog window.
bool | is_fullscreen () const
| Returns if window should be initially fullscreen.
bool | is_layered () const
| Returns true if window is layered (black is transparent).
bool | is_main () const
| Returns true if it is a main window.
bool | is_popup () const
| Returns true if it is a popup window.
bool | is_topmost () const
| Returns true if the window should be placed above all non-topmost windows.
bool | is_update_supported () const
| Returns true if DisplayWindow::update should be supported.
bool | is_visible () const
| Returns true if the window is initially visible.
DisplayWindowDescription & | operator= (const DisplayWindowDescription &copy)
| Copy assignment operator.
void | set_allow_resize (bool allow_resize=true)
| Sets if windows should be resizable.
void | set_allow_screensaver (bool allow_screensaver=true)
| Allow the screensaver to appear.
void | set_bpp (int bpp)
| Sets the number of bytes per pixel.
void | set_depth_size (int value)
| Sets the minimum required depth buffer.
void | set_dialog_window ()
| Display the window as a modal dialog.
void | set_drop_shadow (bool value=true)
| Enables a drop shadow effect on the window.
void | set_flipping_buffers (int num_buffers=2)
| Sets the amount of flipping buffers to be used.
void | set_fullscreen (bool fullscreen=true, int monitor=0)
| Makes the window initially fullscreen.
void | set_handle (DisplayWindowHandle handle)
void | set_layered (bool layered)
| Creates a layered window (complex shaped window).
void | set_main_window ()
| Display this window as of the main windows of the application.
void | set_multisampling (int value)
| Sets the number of samples per pixel.
void | set_no_activate (bool value=true)
| Prevents window from being automatically activated.
void | set_owner_window (const DisplayWindow &owner)
| Specifies another window which owns this one.
void | set_popup_window ()
| Display the window as a popup.
void | set_position (const Rectf &position, bool client_area)
| Sets the position of the window (including window frame).
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).
void | set_stencil_size (int value)
| Sets the minimum required stencil buffer.
void | set_swap_interval (int interval=-1)
| Sets the swap interval to be used for the window.
void | set_title (const std::string &title)
| Sets the title of the window.
void | set_topmost (bool value=true)
| Sets if the window should be placed above all non-topmost windows.
void | set_update_supported (bool value) const
| Controls if DisplayWindow::update is supported.
void | set_visible (bool value=true)
| Toggles whether the window is created as initially visible.
void | show_caption (bool value=true)
| Controls if a title bar (including frame) is shown or not.
void | show_maximize_button (bool value=true)
| Sets if the window has a maximize button.
void | show_minimize_button (bool value=true)
| Sets if the window has a minimize button.
void | show_sysmenu (bool value=true)
| Sets if the window has a window menu on its title bar.

## Detailed Description

Display window description class.

This class allows you to setup a more advanced description when creating a display window.

## Constructor & Destructor Documentation

## ◆ DisplayWindowDescription() [1/6]

clan::DisplayWindowDescription::DisplayWindowDescription | ( |  | ) |

Constructs a window description with default values.

Referenced by DisplayWindowDescription(), and operator=().

## ◆ DisplayWindowDescription() [2/6]

clan::DisplayWindowDescription::DisplayWindowDescription | ( | const std::string & | title | ) |

Constructs a window description with default values and a title.

## ◆ DisplayWindowDescription() [3/6]

clan::DisplayWindowDescription::DisplayWindowDescription | ( | const std::string & | title,
|  | const Rectf & | position,
|  | bool | client_area )

Constructs a window description with default values, a title and a position.

## ◆ DisplayWindowDescription() [4/6]

clan::DisplayWindowDescription::DisplayWindowDescription | ( | const std::string & | title,
|  | const Sizef & | size,
|  | bool | client_area )

Constructs a window description with default values, a title and a size.

## ◆ DisplayWindowDescription() [5/6]

clan::DisplayWindowDescription::DisplayWindowDescription | ( | const Rectf & | position,
|  | bool | client_area )

Constructs a window description with default values and a position.

## ◆ DisplayWindowDescription() [6/6]

clan::DisplayWindowDescription::DisplayWindowDescription | ( | const DisplayWindowDescription & | copy | ) |

Constructs a DisplayWindowDescription.

Parameters

  copy | = Display Window Description

References DisplayWindowDescription().

## ◆ ~DisplayWindowDescription()

clan::DisplayWindowDescription::~DisplayWindowDescription | ( |  | ) |

## Member Function Documentation

## ◆ get_allow_resize()

bool clan::DisplayWindowDescription::get_allow_resize | ( |  | ) | const

Returns true if window should be resizeable.

## ◆ get_allow_screensaver()

bool clan::DisplayWindowDescription::get_allow_screensaver | ( |  | ) | const

Returns true if the screensaver is allowed.

## ◆ get_bpp()

int clan::DisplayWindowDescription::get_bpp | ( |  | ) | const

Returns the numbers of bytes per pixel in the window.

## ◆ get_depth_size()

int clan::DisplayWindowDescription::get_depth_size | ( |  | ) | const

Returns the minimum required depth buffer.

## ◆ get_flipping_buffers()

int clan::DisplayWindowDescription::get_flipping_buffers | ( |  | ) | const

Returns the amount of flipping buffers to be created.

## ◆ get_fullscreen_monitor()

int clan::DisplayWindowDescription::get_fullscreen_monitor | ( |  | ) | const

Returns the index of the monitor to go fullscreen on. See ScreenInfo.

## ◆ get_handle()

DisplayWindowHandle clan::DisplayWindowDescription::get_handle | ( |  | ) | const

Returns an platform-specific internal display window handle object.

## ◆ get_multisampling()

int clan::DisplayWindowDescription::get_multisampling | ( |  | ) | const

Returns the number of samples per pixel.

## ◆ get_owner()

DisplayWindow clan::DisplayWindowDescription::get_owner | ( |  | ) | const

Returns the window owning this one.

## ◆ get_position()

Rectf clan::DisplayWindowDescription::get_position | ( |  | ) | const

Returns the initial position of the window.

## ◆ get_position_client_area()

bool clan::DisplayWindowDescription::get_position_client_area | ( |  | ) | const

Returns if the client area is used for the initial position of the window.

## ◆ get_refresh_rate()

int clan::DisplayWindowDescription::get_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.

## ◆ get_size()

Sizef clan::DisplayWindowDescription::get_size | ( |  | ) | const

Returns the size of the window stored in description.

## ◆ get_stencil_size()

int clan::DisplayWindowDescription::get_stencil_size | ( |  | ) | const

Returns the minimum required stencil buffer.

## ◆ get_swap_interval()

int clan::DisplayWindowDescription::get_swap_interval | ( |  | ) | const

Returns the swap interval to be used for the window.

## ◆ get_title()

const std::string & clan::DisplayWindowDescription::get_title | ( |  | ) | const

Returns the window title stored in the description.

## ◆ has_caption()

bool clan::DisplayWindowDescription::has_caption | ( |  | ) | const

Returns true if a title bar is shown.

## ◆ has_drop_shadow()

bool clan::DisplayWindowDescription::has_drop_shadow | ( |  | ) | const

Returns true if the window is drawn with a drop shadow effect.

## ◆ has_maximize_button()

bool clan::DisplayWindowDescription::has_maximize_button | ( |  | ) | const

Returns true if the window has a maximize button.

## ◆ has_minimize_button()

bool clan::DisplayWindowDescription::has_minimize_button | ( |  | ) | const

Returns true if the window has a minimize button.

## ◆ has_no_activate()

bool clan::DisplayWindowDescription::has_no_activate | ( |  | ) | const

Indicates if window is automatically activated or not.

## ◆ has_sysmenu()

bool clan::DisplayWindowDescription::has_sysmenu | ( |  | ) | const

Returns true if the window has a window menu on its title bar.

## ◆ is_dialog()

bool clan::DisplayWindowDescription::is_dialog | ( |  | ) | const

Returns true if it is a dialog window.

## ◆ is_fullscreen()

bool clan::DisplayWindowDescription::is_fullscreen | ( |  | ) | const

Returns if window should be initially fullscreen.

## ◆ is_layered()

bool clan::DisplayWindowDescription::is_layered | ( |  | ) | const

Returns true if window is layered (black is transparent).

## ◆ is_main()

bool clan::DisplayWindowDescription::is_main | ( |  | ) | const

Returns true if it is a main window.

## ◆ is_popup()

bool clan::DisplayWindowDescription::is_popup | ( |  | ) | const

Returns true if it is a popup window.

## ◆ is_topmost()

bool clan::DisplayWindowDescription::is_topmost | ( |  | ) | const

Returns true if the window should be placed above all non-topmost windows.

## ◆ is_update_supported()

bool clan::DisplayWindowDescription::is_update_supported | ( |  | ) | const

Returns true if DisplayWindow::update should be supported.

## ◆ is_visible()

bool clan::DisplayWindowDescription::is_visible | ( |  | ) | const

Returns true if the window is initially visible.

## ◆ operator=()

DisplayWindowDescription & clan::DisplayWindowDescription::operator= | ( | const DisplayWindowDescription & | copy | ) |

Copy assignment operator.

References DisplayWindowDescription().

## ◆ set_allow_resize()

void clan::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)

## ◆ set_allow_screensaver()

void clan::DisplayWindowDescription::set_allow_screensaver | ( | bool | allow_screensaver = true | ) |

Allow the screensaver to appear.

Parameters

  allow_screensaver | = Allow the allow_screensaver (default is true)

## ◆ set_bpp()

void clan::DisplayWindowDescription::set_bpp | ( | int | bpp | ) |

Sets the number of bytes per pixel.

## ◆ set_depth_size()

void clan::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.

## ◆ set_dialog_window()

void clan::DisplayWindowDescription::set_dialog_window | ( |  | ) |

Display the window as a modal dialog.

Window is shown on the taskbar

## ◆ set_drop_shadow()

void clan::DisplayWindowDescription::set_drop_shadow | ( | bool | value = true | ) |

Enables a drop shadow effect on the window.

## ◆ set_flipping_buffers()

void clan::DisplayWindowDescription::set_flipping_buffers | ( | int | num_buffers = 2 | ) |

Sets the amount of flipping buffers to be used.

## ◆ set_fullscreen()

void clan::DisplayWindowDescription::set_fullscreen | ( | bool | fullscreen = true,
|  | int | monitor = 0 )

Makes the window initially fullscreen.

## ◆ set_handle()

void clan::DisplayWindowDescription::set_handle | ( | DisplayWindowHandle | handle | ) |

Sets the platform-specific internal display window handle object.

## ◆ set_layered()

void clan::DisplayWindowDescription::set_layered | ( | bool | layered | ) |

Creates a layered window (complex shaped window).

Use with set_popup_window()

## ◆ set_main_window()

void clan::DisplayWindowDescription::set_main_window | ( |  | ) |

Display this window as of the main windows of the application.

Window is shown on the taskbar

## ◆ set_multisampling()

void clan::DisplayWindowDescription::set_multisampling | ( | int | value | ) |

Sets the number of samples per pixel.

## ◆ set_no_activate()

void clan::DisplayWindowDescription::set_no_activate | ( | bool | value = true | ) |

Prevents window from being automatically activated.

## ◆ set_owner_window()

void clan::DisplayWindowDescription::set_owner_window | ( | const DisplayWindow & | owner | ) |

Specifies another window which owns this one.

## ◆ set_popup_window()

void clan::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

## ◆ set_position()

void clan::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

Parameters

  position | = Window position
  client_area | = false = include the window frame. true = exclude the window frame

## ◆ set_refresh_rate()

void clan::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.

## ◆ set_size()

void clan::DisplayWindowDescription::set_size | ( | const Sizef & | size,
|  | bool | client_area )

Sets the size of the window (including window frame).

Parameters

  size | = Window size
  client_area | = false = include the window frame. true = exclude the window frame

## ◆ set_stencil_size()

void clan::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.

## ◆ set_swap_interval()

void clan::DisplayWindowDescription::set_swap_interval | ( | int | interval = -1 | ) |

Sets the swap interval to be used for the window.

## ◆ set_title()

void clan::DisplayWindowDescription::set_title | ( | const std::string & | title | ) |

Sets the title of the window.

## ◆ set_topmost()

void clan::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)

## ◆ set_update_supported()

void clan::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.

## ◆ set_visible()

void clan::DisplayWindowDescription::set_visible | ( | bool | value = true | ) |

Toggles whether the window is created as initially visible.

## ◆ show_caption()

void clan::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)

## ◆ show_maximize_button()

void clan::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)

## ◆ show_minimize_button()

void clan::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)

## ◆ show_sysmenu()

void clan::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)

The documentation for this class was generated from the following file:

- display_window_description.h