YSTest
PreAlpha_b400_20130424
The YSLib Test Project
首页
相关页面
模块
命名空间
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
button.h
浏览该文件的文档.
1
/*
2
Copyright by FrankHB 2010 - 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_button_h_
29
#define YSL_INC_UI_button_h_ 1
30
31
#include "
ycontrol.h
"
32
#include "
label.h
"
33
#include "
ystyle.h
"
34
35
YSL_BEGIN
36
37
YSL_BEGIN_NAMESPACE
(UI)
38
39
43
class
YF_API
Thumb
: public
Control
44
{
45
protected
:
50
bool
bPressed
;
51
52
public
:
57
explicit
58
Thumb
(
const
Rect
& = {},
Drawing::Hue
= 180);
59
60
protected
:
65
explicit
66
Thumb
(
const
Rect
&,
NoBackgroundTag
);
67
68
public
:
69
inline
DefDeMoveCtor
(
Thumb
)
70
71
75
DefPred
(const
ynothrow
, Pressed, bPressed)
76
};
77
78
83
YF_API
void
84
DrawThumbBackground
(
PaintEventArgs
&& e,
Thumb
&,
Hue
);
85
86
93
YF_API
void
94
DecorateAsCloseButton
(Thumb&);
95
96
101
class
YF_API
Button
: public Thumb, protected
MLabel
102
{
103
public
:
104
using
MLabel::Font;
105
using
MLabel::Margin;
106
using
MLabel::HorizontalAlignment;
107
using
MLabel::VerticalAlignment;
108
using
MLabel::Text;
109
/*
110
YImage BackgroundImage; //!< 背景图像。
111
YImage Image; //!< 前景图像。
112
*/
113
118
explicit
119
Button
(
const
Rect
& = {},
const
Drawing::Font
& = {},
120
TextAlignment
= TextAlignment::Center);
125
Button
(
const
Rect
&,
Drawing::Hue
,
const
Drawing::Font
& = {},
126
TextAlignment
= TextAlignment::Center);
127
inline
DefDeMoveCtor
(
Button
)
128
129
133
void
134
Refresh(
PaintEventArgs
&&)
override
;
135
};
136
137
YSL_END_NAMESPACE
(UI)
138
139
YSL_END
140
141
#endif
142
YFramework
include
YSLib
UI
button.h
生成于 2013年 四月 24日 星期三 18:41:26 , 为 YSTest使用
1.8.2