display_window_description.h

Go to the documentation of this file.
00001 /*
00002 **  ClanLib SDK
00003 **  Copyright (c) 1997-2011 The ClanLib Team
00004 **
00005 **  This software is provided 'as-is', without any express or implied
00006 **  warranty.  In no event will the authors be held liable for any damages
00007 **  arising from the use of this software.
00008 **
00009 **  Permission is granted to anyone to use this software for any purpose,
00010 **  including commercial applications, and to alter it and redistribute it
00011 **  freely, subject to the following restrictions:
00012 **
00013 **  1. The origin of this software must not be misrepresented; you must not
00014 **     claim that you wrote the original software. If you use this software
00015 **     in a product, an acknowledgment in the product documentation would be
00016 **     appreciated but is not required.
00017 **  2. Altered source versions must be plainly marked as such, and must not be
00018 **     misrepresented as being the original software.
00019 **  3. This notice may not be removed or altered from any source distribution.
00020 **
00021 **  Note: Some of the libraries ClanLib may link to may have additional
00022 **  requirements or restrictions.
00023 **
00024 **  File Author(s):
00025 **
00026 **    Magnus Norddahl
00027 **    Harry Storbacka
00028 **    Kenneth Gangstoe
00029 */
00030 
00033 
00034 #pragma once
00035 
00036 #include "../api_display.h"
00037 #include "../../Core/Text/string_types.h"
00038 #include "../../Core/System/sharedptr.h"
00039 #ifdef WIN32
00040 #include <windows.h>
00041 #endif
00042 
00043 class CL_Size;
00044 class CL_Rect;
00045 class CL_DisplayWindow;
00046 class CL_DisplayWindowDescription_Impl;
00047 
00048 class CL_DisplayWindowDescriptionData
00049 {
00050 public:
00051         virtual ~CL_DisplayWindowDescriptionData() { }
00052 };
00053 
00058 class CL_API_DISPLAY CL_DisplayWindowDescription
00059 {
00062 public:
00064         CL_DisplayWindowDescription();
00065 
00067         CL_DisplayWindowDescription(const CL_String &title);
00068 
00070         CL_DisplayWindowDescription(const CL_String &title, const CL_Rect &position, bool client_area);
00071 
00073         CL_DisplayWindowDescription(const CL_String &title, const CL_Size &size, bool client_area);
00074 
00076         CL_DisplayWindowDescription(const CL_Rect &position, bool client_area);
00077 
00080         CL_DisplayWindowDescription(const CL_DisplayWindowDescription &copy);
00081 
00082         virtual ~CL_DisplayWindowDescription();
00083 
00087 public:
00089         const CL_String &get_title() const;
00090 
00092         bool get_decorations() const;
00093 
00095         CL_Size get_size() const;
00096 
00098         CL_Rect get_position() const;
00099 
00101         bool get_position_client_area() const;
00102 
00104         bool is_fullscreen() const;
00105 
00107         int get_flipping_buffers() const;
00108 
00110         int get_swap_interval() const;
00111 
00113         bool get_allow_resize() const;
00114 
00116         int get_bpp() const;
00117 
00119 
00121         int get_refresh_rate() const;
00122 
00124         bool is_layered() const;
00125 
00126 #ifdef WIN32
00127 
00128         HWND get_handle() const;
00129 #endif
00130 
00132         bool has_caption() const;
00133 
00135         bool has_sysmenu() const;
00136 
00138         bool has_minimize_button() const;
00139 
00141         bool has_maximize_button() const;
00142 
00144         bool has_border() const;
00145 
00147         bool is_tool_window() const;
00148 
00150         bool is_dialog() const;
00151 
00153         bool is_visible() const;
00154 
00156         bool is_topmost() const;
00157 
00159 
00160         bool get_using_gui_window_cache() const;
00161 
00163         bool has_drop_shadow() const;
00164 
00166         CL_DisplayWindow get_owner() const;
00167 
00169         bool get_tablet_context() const;
00170 
00172         CL_SharedPtr<CL_DisplayWindowDescriptionData> get_data(const CL_String &data_name) const;
00173 
00175         int get_depth_size() const;
00176 
00178         int get_stencil_size() const;
00179 
00181         int get_fullscreen_monitor() const;
00182 
00186 public:
00188         CL_DisplayWindowDescription &operator =(const CL_DisplayWindowDescription &copy);
00189 
00191         void show_caption(bool value = true);
00192 
00194         void show_sysmenu(bool value = true);
00195 
00197         void show_minimize_button(bool value = true);
00198 
00200         void show_maximize_button(bool value = true);
00201 
00203         void show_border(bool value = true);
00204 
00208         void set_decorations(bool decorations);
00209 
00211         void set_visible(bool value = true);
00212 
00214         void set_topmost(bool value = true);
00215 
00217         void set_tool_window(bool value = true);
00218 
00220         void set_dialog_window(bool value = true);
00221 
00223         void set_drop_shadow(bool value = true);
00224 
00226         void set_owner_window(const CL_DisplayWindow &owner);
00227 
00229         void set_title(const CL_String &title);
00230 
00234         void set_size(const CL_Size &size, bool client_area);
00235 
00242         void set_position(const CL_Rect &position, bool client_area);
00243 
00245         void set_fullscreen(bool fullscreen = true, int monitor = 0);
00246 
00248         void set_flipping_buffers(int num_buffers = 2);
00249 
00251         void set_swap_interval(int interval = -1);
00252 
00254         void set_allow_resize(bool allow_resize);
00255 
00257         void set_bpp(int bpp);
00258 
00260 
00262         void set_refresh_rate(int refresh_rate);
00263 
00265         void set_tablet_context(bool create);
00266 
00268 
00271         void set_using_gui_window_cache(bool value);
00272 
00274         void set_layered(bool layered);
00275 
00276 #ifdef WIN32
00277 
00278         void set_handle(HWND handle);
00279 #endif
00280 
00282         void set_data(const CL_String &data_name, const CL_SharedPtr<CL_DisplayWindowDescriptionData> &ptr);
00283 
00285 
00287         void set_depth_size(int value);
00288 
00290 
00292         void set_stencil_size(int value);
00293 
00297 private:
00298         CL_SharedPtr<CL_DisplayWindowDescription_Impl> impl;
00300 };
00301