YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
YComponent.h
浏览该文件的文档.
1 /*
2  © 2010-2014 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 
28 #ifndef YSL_INC_UI_YComponent_h_
29 #define YSL_INC_UI_YComponent_h_ 1
30 
31 #include "YModules.h"
32 #include YFM_YSLib_Core_YGDIBase
33 #include YFM_YSLib_Core_YFunc
34 #include YFM_YSLib_Core_YMessageDefinition
35 #include YFM_YSLib_Adaptor_YContainer
36 
37 namespace YSLib
38 {
39 
45 namespace Drawing
46 {
47 
49 class Image;
50 
57 template<typename _type>
58 string
60 {
61  using YSLib::to_string;
62 
63  return "(" + to_string(val.X) + ", " + to_string(val.Y) + ')';
64 }
65 YF_API string
66 to_string(const Size&);
67 YF_API string
68 to_string(const Rect&);
70 
71 } // namespace Drawing;
72 
73 namespace UI
74 {
75 
76 class AController;
78 struct CursorEventArgs;
80 class GUIState;
81 FwdDeclI(IWidget)
83 class ImageBrush;
85 
86 struct InputEventArgs;
87 struct KeyEventArgs;
88 struct PaintEventArgs;
89 class Renderer;
90 struct RoutedEventArgs;
92 class SolidBrush;
93 struct UIEventArgs;
94 class WidgetController;
96 class Window;
97 
98 
99 //类型别名。
104 using HBrush = std::function<void(PaintEventArgs&&)>;
105 
106 
107 //名称引用。
108 using Drawing::PixelType;
109 using Drawing::BitmapPtr;
110 using Drawing::ConstBitmapPtr;
111 using Drawing::Color;
112 
113 using Drawing::Point;
114 using Drawing::Vec;
115 using Drawing::Size;
116 using Drawing::Rect;
117 
118 using Drawing::Graphics;
120 using Drawing::PaintContext;
121 
122 } // namespace UI;
123 
125 namespace Messaging
126 {
127 
129 DefMessageTarget(SM_Paint, shared_ptr<UI::IWidget>)
130 
131 } // namespace Messaging;
132 
133 } // namespace YSLib;
134 
135 #endif
136 
string to_string(const GBinaryGroup< _type > &val)
转换为字符串。
Definition: YComponent.h:59
#define SM_Paint
Definition: ymsgdef.h:66
#define DefMessageTarget(_id, _type)
Definition: ymsgdef.h:75
#define YF_API
Definition: Platform.h:64
窗口背景。
Definition: ystyle.h:182
屏幕标准矩形:表示屏幕矩形区域。
Definition: ygdibase.h:416
屏幕二元组。
Definition: ygdibase.h:54
std::function< void(PaintEventArgs &&)> HBrush
画刷回调函数。
Definition: YComponent.h:104
二维图形接口上下文。
Definition: ygdibase.h:721
FwdDeclI(IWidget) class ImageBrush
PixelType * BitmapPtr
Definition: Video.h:295
YF_API string to_string(const Rect &)
Definition: YComponent.cpp:46
颜色。
Definition: Video.h:339
const PixelType * ConstBitmapPtr
Definition: Video.h:296
屏幕区域大小。
Definition: ygdibase.h:249