YSTest  PreAlpha_b400_20130424
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
HostWindow.h
浏览该文件的文档.
1 /*
2  Copyright by FrankHB 2013.
3 
4  This file is part of the YSLib project, and may only be used,
5  modified, and distributed under the terms of the YSLib project
6  license, LICENSE.TXT. By continuing to use, modify, or distribute
7  this file you indicate that you have read the license and
8  understand and accept it fully.
9 */
10 
28 #ifndef INC_Helper_HostWindow_h_
29 #define INC_Helper_HostWindow_h_ 1
30 
31 #include "Helper/GUIApplication.h"
32 
34 
35 #if YCL_HOSTED
37 
38 
43 class YF_API Window
44 {
45 
46 private:
48  std::reference_wrapper<Environment> env;
50  NativeWindowHandle h_wnd;
51 
52 public:
57  Window(NativeWindowHandle, Environment& = FetchEnvironment());
58  DefDelCopyCtor(Window)
59  DefDelMoveCtor(Window)
60  virtual
61  ~Window();
62 
64  DefGetter(const ynothrow, NativeWindowHandle, NativeHandle, h_wnd)
65  DefGetter(const ynothrow, Environment&, Host, env)
71  virtual pair<Drawing::Point, Drawing::Point>
72  GetInputBounds() const ynothrow;
73 
75  void
76  Close();
77 
83  void
84  Resize(const Drawing::Size&);
85 
91  void
92  ResizeClient(const Drawing::Size&);
93 
94  virtual void
95  OnDestroy();
96 
97  virtual void
98  OnLostFocus();
99 
100  virtual void
101  OnPaint();
102 
104  void
105  Show() ynothrow;
106 };
107 
108 YSL_END_NAMESPACE(Host)
109 #endif
110 
111 YSL_END
112 
113 #endif
114