ClanLib  2.3.7
display_window_description.h
Go to the documentation of this file.
1 /*
2 ** ClanLib SDK
3 ** Copyright (c) 1997-2011 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 
33 
34 #pragma once
35 
36 #include "../api_display.h"
37 #include "../../Core/Text/string_types.h"
38 #include "../../Core/System/sharedptr.h"
39 #ifdef WIN32
40 #include <windows.h>
41 #endif
42 
43 class CL_Size;
44 class CL_Rect;
45 class CL_DisplayWindow;
46 class CL_DisplayWindowDescription_Impl;
47 
49 {
50 public:
52 };
53 
59 {
62 public:
65 
68 
70  CL_DisplayWindowDescription(const CL_String &title, const CL_Rect &position, bool client_area);
71 
73  CL_DisplayWindowDescription(const CL_String &title, const CL_Size &size, bool client_area);
74 
76  CL_DisplayWindowDescription(const CL_Rect &position, bool client_area);
77 
81 
82  virtual ~CL_DisplayWindowDescription();
83 
87 public:
89  const CL_String &get_title() const;
90 
92  bool get_decorations() const;
93 
95  CL_Size get_size() const;
96 
98  CL_Rect get_position() const;
99 
101  bool get_position_client_area() const;
102 
104  bool is_fullscreen() const;
105 
107  int get_flipping_buffers() const;
108 
110  int get_swap_interval() const;
111 
113  bool get_allow_resize() const;
114 
116  int get_bpp() const;
117 
119 
121  int get_refresh_rate() const;
122 
124  bool is_layered() const;
125 
126 #ifdef WIN32
127  HWND get_handle() const;
129 #endif
130 
132  bool has_caption() const;
133 
135  bool has_sysmenu() const;
136 
138  bool has_minimize_button() const;
139 
141  bool has_maximize_button() const;
142 
144  bool has_border() const;
145 
147  bool is_tool_window() const;
148 
150  bool is_dialog() const;
151 
153  bool is_visible() const;
154 
156  bool is_topmost() const;
157 
159 
160  bool get_using_gui_window_cache() const;
161 
163  bool has_drop_shadow() const;
164 
166  CL_DisplayWindow get_owner() const;
167 
169  bool get_tablet_context() const;
170 
172  CL_SharedPtr<CL_DisplayWindowDescriptionData> get_data(const CL_String &data_name) const;
173 
175  int get_depth_size() const;
176 
178  int get_stencil_size() const;
179 
181  int get_fullscreen_monitor() const;
182 
186 public:
189 
191  void show_caption(bool value = true);
192 
194  void show_sysmenu(bool value = true);
195 
197  void show_minimize_button(bool value = true);
198 
200  void show_maximize_button(bool value = true);
201 
203  void show_border(bool value = true);
204 
208  void set_decorations(bool decorations);
209 
211  void set_visible(bool value = true);
212 
214  void set_topmost(bool value = true);
215 
217  void set_tool_window(bool value = true);
218 
220  void set_dialog_window(bool value = true);
221 
223  void set_drop_shadow(bool value = true);
224 
226  void set_owner_window(const CL_DisplayWindow &owner);
227 
229  void set_title(const CL_String &title);
230 
234  void set_size(const CL_Size &size, bool client_area);
235 
242  void set_position(const CL_Rect &position, bool client_area);
243 
245  void set_fullscreen(bool fullscreen = true, int monitor = 0);
246 
248  void set_flipping_buffers(int num_buffers = 2);
249 
251  void set_swap_interval(int interval = -1);
252 
254  void set_allow_resize(bool allow_resize);
255 
257  void set_bpp(int bpp);
258 
260 
262  void set_refresh_rate(int refresh_rate);
263 
265  void set_tablet_context(bool create);
266 
268 
271  void set_using_gui_window_cache(bool value);
272 
274  void set_layered(bool layered);
275 
276 #ifdef WIN32
277  void set_handle(HWND handle);
279 #endif
280 
282  void set_data(const CL_String &data_name, const CL_SharedPtr<CL_DisplayWindowDescriptionData> &ptr);
283 
285 
287  void set_depth_size(int value);
288 
290 
292  void set_stencil_size(int value);
293 
297 private:
298  CL_SharedPtr<CL_DisplayWindowDescription_Impl> impl;
300 };
301