display_window_description.h
1 /*
2 ** ClanLib SDK
3 ** Copyright (c) 1997-2013 The ClanLib Team
4 **
5 ** This software is provided 'as-is', without any express or implied
6 ** warranty. In no event will the authors be held liable for any damages
7 ** arising from the use of this software.
8 **
9 ** Permission is granted to anyone to use this software for any purpose,
10 ** including commercial applications, and to alter it and redistribute it
11 ** freely, subject to the following restrictions:
12 **
13 ** 1. The origin of this software must not be misrepresented; you must not
14 ** claim that you wrote the original software. If you use this software
15 ** in a product, an acknowledgment in the product documentation would be
16 ** appreciated but is not required.
17 ** 2. Altered source versions must be plainly marked as such, and must not be
18 ** misrepresented as being the original software.
19 ** 3. This notice may not be removed or altered from any source distribution.
20 **
21 ** Note: Some of the libraries ClanLib may link to may have additional
22 ** requirements or restrictions.
23 **
24 ** File Author(s):
25 **
26 ** Magnus Norddahl
27 ** Harry Storbacka
28 ** Kenneth Gangstoe
29 */
30 
31 
32 #pragma once
33 
34 #include "../api_display.h"
35 #include <memory>
36 #ifdef WIN32
37 #include <windows.h>
38 #endif
39 
40 namespace clan
41 {
44 
45 class Size;
46 class Rect;
47 class DisplayWindow;
48 class DisplayWindowDescription_Impl;
49 
53 class CL_API_DISPLAY DisplayWindowDescription
54 {
57 public:
60 
62  DisplayWindowDescription(const std::string &title);
63 
65  DisplayWindowDescription(const std::string &title, const Rect &position, bool client_area);
66 
68  DisplayWindowDescription(const std::string &title, const Size &size, bool client_area);
69 
71  DisplayWindowDescription(const Rect &position, bool client_area);
72 
76 
77  virtual ~DisplayWindowDescription();
78 
82 public:
84  const std::string &get_title() const;
85 
87  Size get_size() const;
88 
90  Rect get_position() const;
91 
93  bool get_position_client_area() const;
94 
96  bool is_fullscreen() const;
97 
99  int get_flipping_buffers() const;
100 
102  int get_swap_interval() const;
103 
105  bool get_allow_resize() const;
106 
108  int get_bpp() const;
109 
111 
113  int get_refresh_rate() const;
114 
116  bool is_layered() const;
117 
118 #ifdef WIN32
119  HWND get_handle() const;
121 #endif
122 
124  bool has_caption() const;
125 
127  bool has_sysmenu() const;
128 
130  bool has_minimize_button() const;
131 
133  bool has_maximize_button() const;
134 
136  bool is_tool_window() const;
137 
139  bool is_dialog() const;
140 
142  bool is_visible() const;
143 
145  bool is_topmost() const;
146 
148 
149  bool get_using_gui_window_cache() const;
150 
152  bool has_drop_shadow() const;
153 
155  DisplayWindow get_owner() const;
156 
158  bool get_tablet_context() const;
159 
161  int get_depth_size() const;
162 
164  int get_stencil_size() const;
165 
167  int get_fullscreen_monitor() const;
168 
170  bool get_allow_screensaver() const;
171 
173  bool is_update_supported() const;
174 
176  int get_multisampling() const;
180 public:
182  DisplayWindowDescription &operator =(const DisplayWindowDescription &copy);
183 
185  void show_caption(bool value = true);
186 
188  void show_sysmenu(bool value = true);
189 
191  void show_minimize_button(bool value = true);
192 
194  void show_maximize_button(bool value = true);
195 
197  void set_visible(bool value = true);
198 
200  void set_topmost(bool value = true);
201 
203  void set_tool_window(bool value = true);
204 
206  void set_dialog_window(bool value = true);
207 
209  void set_drop_shadow(bool value = true);
210 
212  void set_owner_window(const DisplayWindow &owner);
213 
215  void set_title(const std::string &title);
216 
220  void set_size(const Size &size, bool client_area);
221 
228  void set_position(const Rect &position, bool client_area);
229 
231  void set_fullscreen(bool fullscreen = true, int monitor = 0);
232 
234  void set_flipping_buffers(int num_buffers = 2);
235 
237  void set_swap_interval(int interval = -1);
238 
240  void set_allow_resize(bool allow_resize = true);
241 
243  void set_bpp(int bpp);
244 
246 
248  void set_refresh_rate(int refresh_rate);
249 
251  void set_tablet_context(bool create);
252 
254 
257  void set_using_gui_window_cache(bool value);
258 
260  void set_layered(bool layered);
261 
265  void set_allow_screensaver(bool allow_screensaver = true);
266 
267 #ifdef WIN32
268  void set_handle(HWND handle);
270 #endif
271 
273 
275  void set_depth_size(int value);
276 
278 
280  void set_stencil_size(int value);
281 
286  void set_update_supported(bool value) const;
287 
289  void set_multisampling(int value);
290 
294 private:
295  std::shared_ptr<DisplayWindowDescription_Impl> impl;
297 };
298 
299 }
300 
2D (left,top,right,bottom) rectangle structure - Integer
Definition: rect.h:453
Display window description class.
Definition: display_window_description.h:53
2D (width,height) size structure - Integer
Definition: size.h:157
Top-level window class.
Definition: display_window.h:85