ClanLib  2.3.7
gui_window_manager_provider.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 ** Mark Page
29 */
30 
33 
34 #pragma once
35 
36 #include "../api_gui.h"
37 #include "../gui_window_manager.h"
38 
40 class CL_GraphicContext;
41 class CL_InputEvent;
42 class CL_InputState;
43 class CL_Cursor;
44 class CL_DisplayWindow;
45 class CL_GUITopLevelWindow;
46 
51 {
54 public:
57 
60 public:
61  virtual CL_GUIWindowManager::CL_WindowManagerType get_window_manager_type() const = 0;
62 
66 public:
68  virtual void destroy() = 0;
69 
73  virtual void set_site(CL_GUIWindowManagerSite *site) = 0;
74  virtual void create_window(
75  CL_GUITopLevelWindow *handle,
76  CL_GUITopLevelWindow *owner,
77  CL_GUIComponent *component,
78  CL_GUITopLevelDescription description) = 0;
79 
83  virtual void destroy_window(CL_GUITopLevelWindow *handle) = 0;
84 
89  virtual void enable_window(CL_GUITopLevelWindow *handle, bool enable) = 0;
90 
96  virtual bool has_focus(CL_GUITopLevelWindow *handle) const = 0;
97 
103  virtual void set_visible(CL_GUITopLevelWindow *handle, bool visible, bool activate_root_win) = 0;
104 
110  virtual void set_geometry(CL_GUITopLevelWindow *handle, const CL_Rect &geometry, bool client_area) = 0;
111 
118  virtual CL_Rect get_geometry(CL_GUITopLevelWindow *handle, bool client_area) const = 0;
119 
127  virtual CL_Point screen_to_window(CL_GUITopLevelWindow *handle, const CL_Point &screen_point, bool client_area) const = 0;
128 
136  virtual CL_Point window_to_screen(CL_GUITopLevelWindow *handle, const CL_Point &window_point, bool client_area) const = 0;
137 
143  virtual CL_GraphicContext& get_gc(CL_GUITopLevelWindow *handle) const = 0;
144 
150  virtual CL_InputContext& get_ic(CL_GUITopLevelWindow *handle) const = 0;
151 
158  virtual CL_GraphicContext begin_paint(CL_GUITopLevelWindow *handle, const CL_Rect &update_region) = 0;
159 
165  virtual void set_cliprect(CL_GUITopLevelWindow *handle, CL_GraphicContext &gc, const CL_Rect &rect) = 0;
166 
171  virtual void reset_cliprect(CL_GUITopLevelWindow *handle, CL_GraphicContext &gc) = 0;
172 
178  virtual void push_cliprect(CL_GUITopLevelWindow *handle, CL_GraphicContext &gc, const CL_Rect &rect) = 0;
179 
184  virtual void pop_cliprect(CL_GUITopLevelWindow *handle, CL_GraphicContext &gc) = 0;
185 
190  virtual void end_paint(CL_GUITopLevelWindow *handle, const CL_Rect &update_region) = 0;
191 
196  virtual void request_repaint(CL_GUITopLevelWindow *handle, const CL_Rect &update_region) = 0;
197 
201  virtual void bring_to_front(CL_GUITopLevelWindow *handle) = 0;
202 
208  virtual bool is_minimized(CL_GUITopLevelWindow *handle) const = 0;
209 
215  virtual bool is_maximized(CL_GUITopLevelWindow *handle) const = 0;
216 
221  virtual void capture_mouse(CL_GUITopLevelWindow *handle, bool state) = 0;
222 
228  virtual CL_DisplayWindow get_display_window(CL_GUITopLevelWindow *handle) const = 0;
229 
234  virtual void set_cursor(CL_GUITopLevelWindow *handle, const CL_Cursor &cursor) = 0;
235 
240  virtual void set_cursor(CL_GUITopLevelWindow *handle, enum CL_StandardCursor type) = 0;
241 
245  virtual void update() = 0;
246 
248  virtual void setup_painting() = 0;
249 
251  virtual void complete_painting() = 0;
253 
256 private:
258 
259 };
260