YSTest: YBrush.h 源文件

YSTest PreAlpha_b400_20130424 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

全部 类 命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 组 页
YBrush.h
浏览该文件的文档.
1 ﻿/*
2 Copyright by FrankHB 2012 - 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 YSL_INC_UI_YBrush_h_
29 #define YSL_INC_UI_YBrush_h_ 1
30
31 #include "ywgtevt.h"
32 #include "../Service/yres.h"
33
34 YSL_BEGIN
35
36 YSL_BEGIN_NAMESPACE(UI)
37
38
42 class YF_API SolidBrush
43 {
44 public:
45 Drawing::Color Color;
46
47 SolidBrush(Drawing::Color c)
48 : Color(c)
49 {}
50
51 void
52 operator()(PaintEventArgs&&);
53 };
54
55
60 class YF_API ImageBrush
61 {
62 public:
63 mutable shared_ptr<Drawing::Image> Image;
64
65 yconstfn DefDeCtor(ImageBrush)
66 ImageBrush(const shared_ptr<Drawing::Image>& h)
67 : Image(h)
68 {}
69 ImageBrush(shared_ptr<Drawing::Image>&& h)
70 : Image(std::move(h))
71 {}
72 DefDeCopyCtor(ImageBrush)
73 DefDeMoveCtor(ImageBrush)
74
75 DefDeCopyAssignment(ImageBrush)
76 DefDeMoveAssignment(ImageBrush)
77
78 void
79 operator()(PaintEventArgs&&);
80 };
81
82
88 class YF_API BorderStyle
89 {
90 public:
91 Color ActiveColor, InactiveColor;
92
93 BorderStyle();
94 };
95
96
102 class YF_API BorderBrush
103 {
104 public:
109 BorderStyle Style;
110
111 DefDeCtor(BorderBrush)
116 DefDeCopyCtor(BorderBrush)
121 BorderBrush(const BorderStyle& style)
122 : Style(style)
123 {}
124
125 inline DefDeCopyAssignment(BorderBrush)
126
127 void
128 operator()(PaintEventArgs&&);
129 };
130
131 YSL_END_NAMESPACE(UI)
132
133 YSL_END
134
135 #endif
136