gui_window_manager_provider.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 **    Mark Page
00029 */
00030 
00033 
00034 #pragma once
00035 
00036 #include "../api_gui.h"
00037 #include "../gui_window_manager.h"
00038 
00039 class CL_GUIWindowManager;
00040 class CL_GraphicContext;
00041 class CL_InputEvent;
00042 class CL_InputState;
00043 class CL_Cursor;
00044 class CL_DisplayWindow;
00045 class CL_GUITopLevelWindow;
00046 
00050 class CL_API_GUI CL_GUIWindowManagerProvider
00051 {
00054 public:
00055         virtual ~CL_GUIWindowManagerProvider() { }
00057 
00060 public:
00061         virtual CL_GUIWindowManager::CL_WindowManagerType get_window_manager_type() const = 0;
00062 
00066 public:
00068         virtual void destroy() = 0;
00069 
00073         virtual void set_site(CL_GUIWindowManagerSite *site) = 0;
00074         virtual void create_window(
00075                 CL_GUITopLevelWindow *handle,
00076                 CL_GUITopLevelWindow *owner,
00077                 CL_GUIComponent *component,
00078                 CL_GUITopLevelDescription description) = 0;
00079 
00083         virtual void destroy_window(CL_GUITopLevelWindow *handle) = 0;
00084 
00089         virtual void enable_window(CL_GUITopLevelWindow *handle, bool enable) = 0;
00090 
00096         virtual bool has_focus(CL_GUITopLevelWindow *handle) const = 0;
00097 
00103         virtual void set_visible(CL_GUITopLevelWindow *handle, bool visible, bool activate_root_win) = 0;
00104 
00110         virtual void set_geometry(CL_GUITopLevelWindow *handle, const CL_Rect &geometry, bool client_area) = 0;
00111 
00118         virtual CL_Rect get_geometry(CL_GUITopLevelWindow *handle, bool client_area) const = 0;
00119 
00127         virtual CL_Point screen_to_window(CL_GUITopLevelWindow *handle, const CL_Point &screen_point, bool client_area) const = 0;
00128 
00136         virtual CL_Point window_to_screen(CL_GUITopLevelWindow *handle, const CL_Point &window_point, bool client_area) const = 0;
00137 
00143         virtual CL_GraphicContext& get_gc(CL_GUITopLevelWindow *handle) const = 0;
00144 
00150         virtual CL_InputContext& get_ic(CL_GUITopLevelWindow *handle) const = 0;
00151 
00158         virtual CL_GraphicContext begin_paint(CL_GUITopLevelWindow *handle, const CL_Rect &update_region) = 0;
00159 
00165         virtual void set_cliprect(CL_GUITopLevelWindow *handle, CL_GraphicContext &gc, const CL_Rect &rect) = 0;
00166 
00171         virtual void reset_cliprect(CL_GUITopLevelWindow *handle, CL_GraphicContext &gc) = 0;
00172 
00178         virtual void push_cliprect(CL_GUITopLevelWindow *handle, CL_GraphicContext &gc, const CL_Rect &rect) = 0;
00179 
00184         virtual void pop_cliprect(CL_GUITopLevelWindow *handle, CL_GraphicContext &gc) = 0;
00185 
00190         virtual void end_paint(CL_GUITopLevelWindow *handle, const CL_Rect &update_region) = 0;
00191 
00196         virtual void request_repaint(CL_GUITopLevelWindow *handle, const CL_Rect &update_region) = 0;
00197 
00201         virtual void bring_to_front(CL_GUITopLevelWindow *handle) = 0;
00202 
00208         virtual bool is_minimized(CL_GUITopLevelWindow *handle) const = 0;
00209 
00215         virtual bool is_maximized(CL_GUITopLevelWindow *handle) const = 0;
00216 
00221         virtual void capture_mouse(CL_GUITopLevelWindow *handle, bool state) = 0;
00222 
00228         virtual CL_DisplayWindow get_display_window(CL_GUITopLevelWindow *handle) const = 0;
00229 
00234         virtual void set_cursor(CL_GUITopLevelWindow *handle, const CL_Cursor &cursor) = 0;
00235 
00240         virtual void set_cursor(CL_GUITopLevelWindow *handle, enum CL_StandardCursor type) = 0;
00241 
00245         virtual void update() = 0;
00246 
00248         virtual void setup_painting() = 0;
00249 
00251         virtual void complete_painting() = 0;
00253 
00256 private:
00258 
00259 };
00260