YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
shlds.h
浏览该文件的文档.
1 /*
2  © 2010-2013 FrankHB.
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 
29 #ifndef INC_Helper_shlds_h_
30 #define INC_Helper_shlds_h_ 1
31 
32 #include "Helper/YModules.h"
33 #include YFM_Helper_GUIShell
34 
35 namespace YSLib
36 {
37 
38 namespace Shells
39 {
40 
45 class YF_API ShlCLI : public Shell
46 {
47 public:
52 
53 
56  int
57  ExecuteCommand(const ucs2_t*);
61  int
63  {
64  return ExecuteCommand(s.c_str());
65  }
66 };
67 
68 } // namespace Shells;
69 
70 
71 namespace DS
72 {
73 
78 YF_API void
80 
81 
87 {
88 private:
93  shared_ptr<Desktop> main_desktop_ptr, sub_desktop_ptr;
98  shared_ptr<Desktop> cursor_desktop_ptr;
99 
100 protected:
107  bool bUpdateUp, bUpdateDown;
109 
110 public:
116  ShlDS(const shared_ptr<Desktop>& = {}, const shared_ptr<Desktop>& = {});
117 
119 
120  DefGetter(const ynothrow, const shared_ptr<Desktop>&, CursorDesktopHandle,
121  main_desktop_ptr)
122  DefGetter(const ynothrow, Desktop&, CursorDesktop, *cursor_desktop_ptr)
123  DefGetter(const ynothrow, const shared_ptr<Desktop>&, MainDesktopHandle,
124  main_desktop_ptr)
125  DefGetter(const ynothrow, Desktop&, MainDesktop, *main_desktop_ptr)
126  DefGetter(const ynothrow, const shared_ptr<Desktop>&, SubDesktopHandle,
127  sub_desktop_ptr)
128  DefGetter(const ynothrow, Desktop&, SubDesktop, *sub_desktop_ptr)
130 
140  void
141  OnGotMessage(const Message&) override;
142 
151  void
152  OnInput() override;
153 
155 
156  void
158  SwapDesktops();
159 
161  void
162  SwapScreens();
163 
169  void
170  WrapForSwapScreens(UI::IWidget&, KeyInput&);
172 };
173 
174 
181 
183 
184 namespace UI
185 {
186 
187 } // namespace UI;
188 
189 } // namespace DS;
190 
191 } // namespace YSLib;
192 
193 #endif
194 
外壳程序:实现运行期控制流映像语义。
Definition: yshell.h:42
#define DefDeCtor(_t)
Definition: YBaseMacro.h:131
#define YF_API
Definition: Platform.h:64
int ExecuteCommand(const String &s)
执行命令行。
Definition: shlds.h:62
#define DefGetter(_q, _t, _n,...)
Definition: YBaseMacro.h:180
YSLib 标准字符串(使用 UCS-2 作为内部编码)。
Definition: ystring.h:47
#define ynothrow
YSLib 无异常抛出保证:若支持 noexcept 关键字, 指定特定的 noexcept 异常规范。
Definition: ydef.h:514
桌面。
Definition: ydesktop.h:46
双屏全屏窗口 Shell 。
Definition: shlds.h:86
GUI Shell 基类。
Definition: GUIShell.h:46
bool bUpdateUp
指定当前桌面是否需要更新。
Definition: shlds.h:107
char16_t ucs2_t
UCS-2 字符类型。
Definition: chrdef.h:44
YF_API void ResetDSDesktops(Desktop &, Desktop &)
以默认屏幕复位两个桌面。
Definition: shlds.cpp:60
shared_ptr< Desktop > cursor_desktop_ptr
指针设备响应的桌面指针:总是指向下屏对应的桌面。
Definition: shlds.h:98
标准命令行界面 Shell 。
Definition: shlds.h:45
shared_ptr< Desktop > sub_desktop_ptr
Definition: shlds.h:93
std::bitset< KeyBitsetWidth > KeyInput
按键并行位宽。
Definition: Keys.h:68