gui_window_manager_provider.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 ** Mark Page
29 */
30 
31 
32 #pragma once
33 
34 #include "../api_gui.h"
35 #include "../gui_window_manager.h"
36 
37 namespace clan
38 {
41 
42 class GUIWindowManager;
43 class Canvas;
44 class InputEvent;
45 class Cursor;
46 class DisplayWindow;
47 class GUITopLevelWindow;
48 
50 class CL_API_GUI GUIWindowManagerProvider
51 {
54 public:
57 
60 public:
61  virtual GUIWindowManager::WindowManagerType get_window_manager_type() const = 0;
62 
66 public:
70  virtual void set_site(GUIWindowManagerSite *site) = 0;
71  virtual void create_window(
72  GUITopLevelWindow *handle,
73  GUITopLevelWindow *owner,
74  GUIComponent *component,
75  GUITopLevelDescription description) = 0;
76 
80  virtual void destroy_window(GUITopLevelWindow *handle) = 0;
81 
86  virtual void enable_window(GUITopLevelWindow *handle, bool enable) = 0;
87 
93  virtual bool has_focus(GUITopLevelWindow *handle) const = 0;
94 
100  virtual void set_visible(GUITopLevelWindow *handle, bool visible, bool activate_root_win) = 0;
101 
107  virtual void set_geometry(GUITopLevelWindow *handle, const Rect &geometry, bool client_area) = 0;
108 
115  virtual Rect get_geometry(GUITopLevelWindow *handle, bool client_area) const = 0;
116 
124  virtual Point screen_to_window(GUITopLevelWindow *handle, const Point &screen_point, bool client_area) const = 0;
125 
133  virtual Point window_to_screen(GUITopLevelWindow *handle, const Point &window_point, bool client_area) const = 0;
134 
140  virtual Canvas& get_canvas(GUITopLevelWindow *handle) = 0;
141 
147  virtual InputContext get_ic(GUITopLevelWindow *handle) const = 0;
148 
155  virtual Canvas begin_paint(GUITopLevelWindow *handle, const Rect &update_region) = 0;
156 
162  virtual void set_cliprect(GUITopLevelWindow *handle, Canvas &canvas, const Rect &rect) = 0;
163 
168  virtual void reset_cliprect(GUITopLevelWindow *handle, Canvas &canvas) = 0;
169 
175  virtual void push_cliprect(GUITopLevelWindow *handle, Canvas &canvas, const Rect &rect) = 0;
176 
181  virtual void pop_cliprect(GUITopLevelWindow *handle, Canvas &canvas) = 0;
182 
187  virtual void end_paint(Canvas &canvas, GUITopLevelWindow *handle, const Rect &update_region) = 0;
188 
193  virtual void request_repaint(GUITopLevelWindow *handle, const Rect &update_region) = 0;
194 
198  virtual void bring_to_front(GUITopLevelWindow *handle) = 0;
199 
205  virtual bool is_minimized(GUITopLevelWindow *handle) const = 0;
206 
212  virtual bool is_maximized(GUITopLevelWindow *handle) const = 0;
213 
218  virtual void capture_mouse(GUITopLevelWindow *handle, bool state) = 0;
219 
225  virtual DisplayWindow get_display_window(GUITopLevelWindow *handle) const = 0;
226 
231  virtual void set_cursor(GUITopLevelWindow *handle, const Cursor &cursor) = 0;
232 
237  virtual void set_cursor(GUITopLevelWindow *handle, enum StandardCursor type) = 0;
238 
242  virtual void update() = 0;
243 
245 
248 private:
250 
251 };
252 
253 }
254 
WindowManagerType
Definition: gui_window_manager.h:91
StandardCursor
Standard Cursor.
Definition: display_window.h:67
2D Graphics Canvas
Definition: canvas.h:70
Mouse cursor class.
Definition: cursor.h:48
GUI window manager site.
Definition: gui_window_manager.h:55
virtual ~GUIWindowManagerProvider()
Definition: gui_window_manager_provider.h:55
GUI base component class.
Definition: gui_component.h:80
2D (left,top,right,bottom) rectangle structure - Integer
Definition: rect.h:453
GUI window manager interface.
Definition: gui_window_manager_provider.h:50
2D (x,y) point structure - Integer
Definition: point.h:63
InputContext.
Definition: input_context.h:45
Display window description class.
Definition: display_window_description.h:53
Top-level window class.
Definition: display_window.h:85