YSTest: YStyle.h 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

YStyle.h
浏览该文件的文档.
1 /*
2 © 2010-2015, 2018-2020 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_ystyle_h_
29 #define YSL_INC_UI_ystyle_h_ 1
30
31 #include "YModules.h"
32 #include YFM_YSLib_UI_YComponent // for function;
33 #include YFM_YSLib_Service_YDraw
34 #include <ystdex/rational.hpp>
35 #include <typeindex> // for mandated header;
36 #include <ystdex/hash.hpp> // for ystdex::combined_hash;
37
38 namespace YSLib
39 {
40
41 namespace Drawing
42 {
43
45
46
52 YF_API void
53 DrawRectRoundCorner(const PaintContext& pc, const Size& s, Color);
54
55
62 YF_API void
63 RectDrawArrow(const PaintContext&, SDst, Rotation = RDeg0,
64 Color = ColorSpace::Black);
65
75 YF_API void
76 RectDrawArrowOutline(const PaintContext&, SDst, Rotation = RDeg0,
77 Color = ColorSpace::Black);
78
83 YF_API void
84 RectDrawCornerArrow(const PaintContext&, SDst, Rotation = RDeg0,
85 Color = ColorSpace::Black);
86
91 YF_API void
92 RectDrawCornerArrowOutline(const PaintContext&, SDst, Rotation = RDeg0,
93 Color = ColorSpace::Black);
94
102 YF_API void
103 DrawArrow(const Graphics&, const Rect&, const Rect&, SDst = 4, Rotation = RDeg0,
104 Color = ColorSpace::Black, bool = {});
105
113 YF_API void
114 DrawCornerArrow(const Graphics&, const Rect&, const Point&, SDst = 4,
115 Rotation = RDeg0, Color = ColorSpace::Black, bool = {});
117
124 YF_API void
125 DrawCross(const Graphics&, const Rect&, const Rect&, Color);
126
134 YF_API void
136 DrawTick(const Graphics&, const Rect&, const Rect&, Color, Color);
138 inline PDefH(void, DrawTick, const Graphics& g, const Rect& bounds,
139 const Rect& r, Color c)
140 ImplExpr(DrawTick(g, bounds, r, c, c))
142
143
144
145 //平台无关色彩系统类型和转换。
146
147
149 yconstfn PDefH(Color, MakeGray, MonoType g)
151 ImplRet(Color(g, g, g))
152
153 yconstfn PDefH(Color, MakeGrayOrColor, Color c, MonoType g, bool colored)
155 ImplRet(colored ? c : Color(g, g, g))
157
158
159
164 using Hue = ystdex::fixed_point<std::uint16_t, 9>;
165
166
176 class YF_API HS : private pair<Hue, float>
177 {
178 public:
179 HS(Hue h = 0, float s = 0) ynothrow
180 : pair(h, s)
181 {}
183 HS(float h, float s = 0) ynothrow
184 : HS(Hue(h), s)
185 {}
186
187 DefGetter(const ynothrow, Hue, H, first)
188 DefGetter(const ynothrow, float, S, second)
189
190 DefGetter(ynothrow, Hue&, HRef, first)
191 DefGetter(ynothrow, float&, SRef, second)
192
197 void
198 Roll(Hue) ynothrow;
199 };
200
201
203 class YF_API HSL : private HS
204 {
205 private:
210 float lightness;
211
212 public:
213 HSL(Hue h = 0, float s = 0, float l = 0) ynothrow
214 : HS{h, s}, lightness(l)
215 {}
217 HSL(float h, float s = 0, float l = 0) ynothrow
218 : HS{h, s}, lightness(l)
219 {}
221 HSL(Color) ynothrow;
222 DefDeCopyCtor(HSL)
223
224
229 YB_ATTR_nodiscard YB_PURE explicit
230 operator Color() const ynothrow;
231
232 using HS::GetH;
233 using HS::GetHRef;
234 using HS::GetS;
235 using HS::GetSRef;
236 DefGetter(const ynothrow, float, L, lightness)
237 DefGetter(ynothrow, float&, LRef, lightness)
238
244 PDefH(HSL&, Roll, Hue h) ynothrow
245 ImplRet(HS::Roll(h), *this)
246 };
247
248
250 class YF_API HSV : private HS
251 {
252 private:
257 float value;
258
259 public:
260 HSV(Hue h = 0, float s = 0, float v = 0) ynothrow
261 : HS{h, s}, value(v)
262 {}
264 HSV(float h, float s = 0, float v = 0) ynothrow
265 : HS{h, s}, value(v)
266 {}
268 HSV(Color) ynothrow;
269 DefDeCopyCtor(HSV)
270
271
275 YB_ATTR_nodiscard YB_PURE explicit
276 operator Color() const ynothrow;
277
278 using HS::GetH;
279 using HS::GetHRef;
280 using HS::GetS;
281 using HS::GetSRef;
282 DefGetter(const ynothrow, float, V, value)
283 DefGetter(ynothrow, float&, VRef, value)
284
290 PDefH(HSV&, Roll, Hue h) ynothrow
291 ImplRet(HS::Roll(h), *this)
292 };
293
294 } // namespace Drawing;
295
296 namespace UI
297 {
298
299 namespace Styles
300 {
301
306 enum Area
307 {
308 //背景和填充区域。
309 Null = 0,
310 Desktop = 1,
311 Window = 2,
312 Panel = 3,
313 Track = 4,
314 Workspace = 5,
315 Shadow = 6,
316 DockShadow = 7,
317 Light = 8,
318 Frame = 9,
319 Highlight = 10,
320 BorderFill = 11,
321 ActiveBorder = 12,
322 InactiveBorder = 13,
323 ActiveTitle = 14,
324 InactiveTitle = 15,
325
326 //前景和文本。
327 HighlightText = 16,
328 WindowText = 17,
329 PanelText = 18,
330 GrayText = 19,
331 TitleText = 20,
332 InactiveTitleText = 21,
333 HotTracking = 22,
334
335 EndArea = 24
336 };
337
338
344 class YF_API Palette
345 {
346 public:
348 using ItemType = Drawing::Color;
350 using ColorListType = vector<ItemType>;
351
352 private:
354 ColorListType colors;
355
356 public:
358 Palette();
359
361 PDefHOp(Drawing::Color&, [], size_t s) ynothrowv
362 ImplRet(colors[s])
363
364 DefGetter(const ynothrow, const ColorListType&, List, colors)
365 DefGetter(ynothrow, ColorListType&, List, colors)
369 YB_ATTR_nodiscard YB_PURE pair<Drawing::Color, Drawing::Color>
370 GetPair(ColorListType::size_type, ColorListType::size_type) const;
371 };
372
373
375
376 using StyleItem = size_t;
378
380 using Key = pair<std::type_index, StyleItem>;
381
383 using Handler = function<void(PaintEventArgs&&)>;
384
386 using HandlerTable = unordered_map<Key, Handler, ystdex::combined_hash<Key>>;
387
389 using VisualStyle = pair<string, HandlerTable>;
390
391
400 template<typename _tIn>
401 void
402 AddHandlers(HandlerTable& table, std::type_index idx, _tIn first, _tIn last)
403 {
404 for(; first != last; ++first)
405 {
406 auto&& ref(*first);
407
408 table.emplace(Key(idx, get<0U>(ref)), get<1U>(ref));
409 }
410 }
411 template<typename _type, typename _tIn>
412 inline void
413 AddHandlers(HandlerTable& table, _tIn first, _tIn last)
414 {
415 Styles::AddHandlers(table, typeid(_type), first, last);
416 }
417 inline PDefH(void, AddHandlers, HandlerTable& table, std::type_index idx,
418 std::initializer_list<pair<StyleItem, Handler>> il)
419 ImplExpr(Styles::AddHandlers(table, idx, il.begin(), il.end()))
420 template<typename _type>
421 inline void
422 AddHandlers(HandlerTable& table,
423 std::initializer_list<pair<StyleItem, Handler>> il)
424 {
425 Styles::AddHandlers(table, typeid(_type), il);
426 }
428
429 template<typename _tRange>
430 inline void
431 AddHandlers(HandlerTable& table, std::type_index idx, _tRange&& c)
432 {
433 // XXX: Consider std::make_move_iterator.
434 Styles::AddHandlers(table, idx, begin(yforward(c)), end(yforward(c)));
435 }
436 template<typename _type, typename _tRange>
437 inline void
438 AddHandlers(HandlerTable& table, _tRange&& c)
439 {
440 Styles::AddHandlers(table, typeid(_type), yforward(c));
441 }
443
444
445
450 class YF_API Painter
451 {
452 private:
453 Key key;
454
455 public:
456 Painter(const Key& k)
457 : key(k)
458 {}
459 template<typename _type1, typename _type2>
460 Painter(_type1&& arg1, _type2&& arg2)
461 : key(yforward(arg1), yforward(arg2))
462 {}
463 DefDeCopyCtor(Painter)
464 DefDeMoveCtor(Painter)
465
466 DefDeCopyAssignment(Painter)
467 DefDeMoveAssignment(Painter)
468
469 DefGetter(const ynothrow, StyleItem, Item, key.second)
470 DefGetter(const ynothrow, const Key&, Key, key)
471 DefGetter(const ynothrow, std::type_index, TypeIndex, key.first)
472
473 void
474 operator()(PaintEventArgs&&) const;
475 };
476
477
482 class YF_API StyleMap : private noncopyable, private map<string, HandlerTable>
483 {
484 public:
485 using MapType = YSLib::map<string, HandlerTable>;
486 using MapType::const_iterator;
487 using MapType::iterator;
488
489 private:
490 const_iterator current;
491
492 public:
493 StyleMap()
494 : MapType({{}}), current(cbegin())
495 {}
496 template<typename... _tParams>
497 StyleMap(_tParams&&... args)
498 : MapType({{}, yforward(args)...}), current(cbegin())
499 {}
500
502 DefGetter(const ynothrow, const_iterator, Current, current)
503
504 template<typename... _tParams>
505 void
506 Add(_tParams&&... args)
507 {
508 emplace(yforward(args)...);
509 }
510
512 void
513 Remove(const string&);
514
515 PDefH(void, Paint, const Styles::Painter& painter,
516 PaintEventArgs&& e)
517 ImplExpr(PaintAsStyle(painter.GetKey(), std::move(e)))
518
519 void
520 PaintAsStyle(const Key&, PaintEventArgs&&);
521
522 void
523 Switch(const string&);
524
525 using MapType::at;
526
527 using MapType::cbegin;
528
529 using MapType::cend;
530
531 using MapType::crbegin;
532
533 using MapType::crend;
534
535 using MapType::empty;
536
537 using MapType::find;
538
539 using MapType::lower_bound;
540
541 using MapType::size;
542
543 using MapType::upper_bound;
544 };
545
546
551 YB_ATTR_nodiscard YB_PURE YF_API HandlerTable&
552 FetchDefault();
554
555 } // namespace Styles;
556
557 } // namespace UI;
558
559 } // namespace YSLib;
560
561 #endif
562
YSLib::UI::Styles::StyleMap::DefGetter
DefGetter(const ynothrow, const_iterator, Current, current) template< typename... _tParams > void Add(_tParams &&... args)
Definition: YStyle.h:502
YSLib::Drawing::HS::DefGetter
DefGetter(const ynothrow, Hue, H, first) DefGetter(const ynothrow
rational.hpp
有理数运算。
YB_ATTR_nodiscard
#define YB_ATTR_nodiscard
标记返回值不被忽略的属性。
Definition: ydef.h:715
YSLib::Drawing::Color
The boundary is out of the const Rect SDst SPos SPos SPos Color
Definition: YDraw.h:128
YSLib::UI::Styles::ActiveBorder
@ ActiveBorder
活动边框背景。
Definition: YStyle.h:321
CHRLib::e
const char const char * e
Definition: CharacterProcessing.h:112
YSLib::Drawing::DrawTick
YF_API void DrawTick(const Graphics &, const Rect &, const Rect &, Color, Color)
在指定图形接口上下文中使用指定颜色描画对勾（“√”）。
Definition: YStyle.cpp:257
size
size_t size
Definition: memory_resource.cpp:295
YSLib::UI::Styles::StyleMap::PDefH
PDefH(void, Paint, const Styles::Painter &painter, PaintEventArgs &&e) ImplExpr(PaintAsStyle(painter.GetKey()
YSLib::UI::Styles::GrayText
@ GrayText
Definition: YStyle.h:330
YSLib::UI::Styles::PanelText
@ PanelText
Definition: YStyle.h:329
YSLib::Drawing::ImplRet
YB_ATTR_nodiscard YB_STATELESS yconstfn Rotation rot ImplRet(Rotation((size_t(rot)+1) % 4)) YB_ATTR_nodiscard YB_STATELESS yconstfn PDefH(Rotation
YSLib::Drawing::HSL
HSL 颜色。
Definition: YStyle.h:204
YB_PURE
#define YB_PURE
指示函数或函数模板实例为纯函数。
Definition: ydef.h:919
YSLib::UI::Panel
面板。
Definition: YPanel.h:46
YSLib::Drawing::Graphics
GGraphics< BitmapPtr > Graphics
Definition: YGraphics.h:163
YSLib::Drawing::c
The boundary is out of the const Graphics const Rect const Point const Point Color c const Rect const Rect Color c
Definition: YDraw.h:174
ystdex::map::iterator
typename rep_type::iterator iterator
Definition: map.hpp:127
YSLib::UI::Styles::EndArea
@ EndArea
Definition: YStyle.h:335
YSLib::Drawing::r
The boundary is out of the const Graphics const Rect const Point const Point Color c const Rect const Rect & r
Definition: YDraw.h:174
YSLib::Drawing::RectDrawArrowOutline
YF_API void RectDrawArrowOutline(const PaintContext &, SDst, Rotation=RDeg0, Color=ColorSpace::Black)
在指定上下文的矩形中描画底边和坐标轴共线的等腰直角三角形箭头轮廓。
Definition: YStyle.cpp:102
DefDeMoveCtor
#define DefDeMoveCtor(_t)
Definition: YBaseMacro.h:167
YSLib::UI::Styles::AddHandlers
void AddHandlers(HandlerTable &table, _tRange &&c)
Definition: YStyle.h:438
YSLib::Drawing::DrawArrow
YF_API void DrawArrow(const Graphics &, const Rect &, const Rect &, SDst=4, Rotation=RDeg0, Color=ColorSpace::Black, bool={})
在指定图形接口上下文上描画底边和坐标轴共线的等腰直角三角形箭头。
Definition: YStyle.cpp:202
YSLib::Drawing::HSV::value
float value
颜色值。
Definition: YStyle.h:257
YSLib::UI::Styles::Palette::PDefHOp
PDefHOp(Drawing::Color &, [], size_t s) ynothrowv ImplRet(colors[s]) DefGetter(const ynothrow
取颜色引用。
YSLib::UI::Styles::Palette
默认调色板。
Definition: YStyle.h:345
YSLib::UI::Styles::InactiveTitleText
@ InactiveTitleText
Definition: YStyle.h:332
YSLib::UI::Styles::Highlight
@ Highlight
高亮背景。
Definition: YStyle.h:319
CHRLib::CharSet::Null
@ Null
空字符集。
Definition: Encoding.h:63
hash.hpp
散列接口。
YSLib::Drawing::HSV::HSV
HSV(float h, float s=0, float v=0) ynothrow
Definition: YStyle.h:264
YF_API
#define YF_API
Definition: Platform.h:56
YSLib::UI::Styles::Painter::DefDeCopyCtor
DefDeCopyCtor(Painter) DefDeMoveCtor(Painter) DefDeCopyAssignment(Painter) DefDeMoveAssignment(Painter) DefGetter(const ynothrow
YSLib::UI::Styles::StyleMap::current
const_iterator current
Definition: YStyle.h:490
YSLib::Drawing::HS
按指定颜色或分量选取彩色或灰度色。
Definition: YStyle.h:177
YSLib::UI::Styles::StyleMap::StyleMap
StyleMap(_tParams &&... args)
Definition: YStyle.h:497
YSLib::UI::Styles::StyleMap
样式映射。
Definition: YStyle.h:483
YSLib::Drawing::RectDrawArrow
YF_API void RectDrawArrow(const PaintContext &, SDst, Rotation=RDeg0, Color=ColorSpace::Black)
在指定上下文的矩形中描画底边和坐标轴共线的等腰直角三角形箭头。
Definition: YStyle.cpp:69
YSLib::Drawing::DrawCross
YF_API void DrawCross(const Graphics &, const Rect &, const Rect &, Color)
在指定图形接口上下文中使用指定颜色描画交叉直线段（“×”）。
Definition: YStyle.cpp:244
YSLib::Drawing::g
The boundary is out of the const Graphics & g
Definition: YDraw.h:161
YSLib::UI::Window
窗口。
Definition: YWindow.h:45
ystdex::map
映射容器。
Definition: map.hpp:79
ystdex::cpp2014::cbegin
auto cbegin(const _tRange &c) -> decltype(ystdex::begin(c))
Definition: range.hpp:418
YSLib::UI::Styles::Track
@ Track
滚动条背景。
Definition: YStyle.h:313
YSLib::Drawing::PDefH
YB_ATTR_nodiscard YB_PURE yconstfn PDefH(Size, Transpose, const Size &s) ynothrow ImplRet(
转置。
Definition: YGDIBase.h:763
YSLib::Drawing::MonoType
octet MonoType
单色分量类型。
Definition: YGDIBase.h:47
ystdex::cpp2014::cend
auto cend(const _tRange &c) -> decltype(ystdex::end(c))
Definition: range.hpp:427
ystdex::details::_type2
_type2
Definition: operators.hpp:241
YSLib::UI::Styles::Key
pair< std::type_index, StyleItem > Key
标识查找样式的键。
Definition: YStyle.h:380
YSLib::Drawing::HS::HS
HS(Hue h=0, float s=0) ynothrow
Definition: YStyle.h:179
YSLib::Drawing::GGraphics
二维图形接口上下文模板。
Definition: YGraphics.h:63
YSLib::Drawing::Point
GBinaryGroup< SPos > Point
屏幕二维点（直角坐标表示）。
Definition: YGDIBase.h:520
yforward
#define yforward(_expr)
根据参数类型使用 std::forward 转发对应参数。
Definition: ydef.h:1508
YSLib::UI::Styles::InactiveTitle
@ InactiveTitle
不活动标题背景。
Definition: YStyle.h:324
YSLib::UI::Styles::StyleMap::StyleMap
StyleMap()
Definition: YStyle.h:493
YSLib::UI::Styles::Workspace
@ Workspace
应用程序工作区背景。
Definition: YStyle.h:314
ystdex::fixed_point
通用定点数。
Definition: rational.hpp:164
YSLib::UI::Styles::Palette::ColorListType
vector< ItemType > ColorListType
颜色组类型。
Definition: YStyle.h:350
ystdex::cpp2017::end
auto end(_tRange &c) -> decltype(c.end())
Definition: range.hpp:345
YSLib::Drawing::Rotation
Rotation
逆时针旋转角度指示输出指向。
Definition: YGDIBase.h:1145
std
Definition: optional.h:982
platform::containers::unordered_map
std::unordered_map< _tKey, _tMapped, _fHash, _fEqual, _tAlloc > unordered_map
Definition: Container.h:133
YSLib::Drawing::ColorSpace::Black
@ Black
Definition: YGDIBase.h:262
YSLib::UI::Styles::VisualStyle
pair< string, HandlerTable > VisualStyle
视觉样式。
Definition: YStyle.h:389
platform::SDst
std::uint16_t SDst
屏幕坐标距离。
Definition: Video.h:44
YSLib::UI::Styles::Palette::colors
ColorListType colors
颜色组。
Definition: YStyle.h:354
YSLib::UI::Styles::Area
Area
样式区域类型。
Definition: YStyle.h:307
YSLib::Drawing::RectDrawCornerArrowOutline
YF_API void RectDrawCornerArrowOutline(const PaintContext &, SDst, Rotation=RDeg0, Color=ColorSpace::Black)
在指定上下文的矩形中描画腰和坐标轴共线的等腰直角三角形箭头轮廓。
Definition: YStyle.cpp:186
YSLib::UI::Styles::Light
@ Light
明亮背景。
Definition: YStyle.h:317
platform::containers::vector
std::vector< _type, _tAlloc > vector
Definition: Container.h:102
YSLib::Drawing::HSV
HSV 颜色。
Definition: YStyle.h:251
platform::KeyCodes::DS::L
@ L
Definition: Keys.h:228
YSLib::UI::Styles::WindowText
@ WindowText
Definition: YStyle.h:328
YSLib::Drawing::Rect
屏幕标准矩形：表示屏幕矩形区域。
Definition: YGDIBase.h:788
YSLib::Drawing::RectDrawCornerArrow
YF_API void RectDrawCornerArrow(const PaintContext &, SDst, Rotation=RDeg0, Color=ColorSpace::Black)
在指定上下文的矩形中描画腰和坐标轴共线的等腰直角三角形箭头。
Definition: YStyle.cpp:149
DefDeCopyAssignment
#define DefDeCopyAssignment(_t)
Definition: YBaseMacro.h:186
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:46
CHRLib::s
_tDst const _tSrc * s
Definition: CharacterProcessing.h:143
YSLib::UI::Styles::ActiveTitle
@ ActiveTitle
活动标题背景。
Definition: YStyle.h:323
YModules.h
YSLib 用户界面模块配置文件。
YSLib::UI::Styles::Painter::Painter
Painter(const Key &k)
Definition: YStyle.h:456
YSLib::Drawing::HSV::HSV
HSV(Hue h=0, float s=0, float v=0) ynothrow
Definition: YStyle.h:260
ystdex::cpp2017::crbegin
auto crbegin(const _tRange &c) -> decltype(ystdex::rbegin(c))
Definition: range.hpp:506
YSLib::Drawing::ynothrow
YB_ATTR_nodiscard yconstfn YB_PURE x x x Bottom YB_ATTR_nodiscard yconstfn YB_PURE x Right y x Top y x Bottom y Bottom YB_ATTR_nodiscard yconstfn YB_PURE x Right y x Top y x Bottom y Bottom YB_ATTR_nodiscard yconstfn YB_PURE const Padding & ynothrow
Definition: YGDI.h:132
YSLib::UI::Desktop
桌面。
Definition: YDesktop.h:47
YSLib::Drawing::ImplExpr
const TextState &ts const TextState &ts const TextState &ts TextState SPos SPos y ImplExpr(ts.Pen=Point(x, y)) YF_API void SetCurrentTextLineNOf(TextState &
设置笔的行位置。
YSLib::UI::Styles::Painter
带样式的绘制处理函数。
Definition: YStyle.h:451
YSLib::Drawing::DrawCornerArrow
YF_API void DrawCornerArrow(const Graphics &, const Rect &, const Point &, SDst=4, Rotation=RDeg0, Color=ColorSpace::Black, bool={})
在指定图形接口上下文上描画腰和坐标轴共线的等腰直角三角形箭头。
Definition: YStyle.cpp:230
YSLib::Drawing::RDeg0
@ RDeg0
Definition: YGDIBase.h:1146
YSLib::Drawing::bounds
The boundary is out of the const Rect & bounds
Definition: YDraw.h:127
YSLib::Drawing::HS::HS
HS(float h, float s=0) ynothrow
Definition: YStyle.h:183
v
byte v
Definition: CharRenderer.cpp:76
YSLib::UI::Styles::DockShadow
@ DockShadow
容器阴影背景。
Definition: YStyle.h:316
ynothrowv
#define ynothrowv
YSLib 无异常抛出保证验证：有条件地使用无异常抛出规范。
Definition: ydef.h:1219
ystdex
<memory> 特性测试宏。
Definition: ydef.h:1262
ystdex::cpp2017::crend
auto crend(const _tRange &c) -> decltype(ystdex::rend(c))
Definition: range.hpp:513
YSLib::UI::PaintEventArgs
部件绘制参数。
Definition: YWidgetEvent.h:330
YSLib::UI::Styles::Palette::ItemType
Drawing::Color ItemType
项目类型。
Definition: YStyle.h:348
YSLib::UI::Styles::FetchDefault
YB_ATTR_nodiscard YB_PURE YF_API HandlerTable & FetchDefault()
取默认样式处理器表。
Definition: YStyle.cpp:538
YSLib::_tParams
YB_ATTR_nodiscard YB_PURE typename _tParams
Definition: ValueNode.h:1294
ystdex::map::const_iterator
typename rep_type::const_iterator const_iterator
Definition: map.hpp:128
YSLib::Drawing::HSL::lightness
float lightness
亮度。
Definition: YStyle.h:210
YSLib::Drawing::HSL::DefDeCopyCtor
DefDeCopyCtor(HSL) YB_ATTR_nodiscard YB_PURE explicit operator Color() const ynothrow
转换为 RGB 颜色。
YSLib::UI::Styles::Painter::Painter
Painter(_type1 &&arg1, _type2 &&arg2)
Definition: YStyle.h:460
YSLib::UI::Styles::BorderFill
@ BorderFill
边框填充。
Definition: YStyle.h:320
YSLib::UI::Styles::Shadow
@ Shadow
阴影背景。
Definition: YStyle.h:315
YSLib::UI::Styles::InactiveBorder
@ InactiveBorder
不活动边框背景。
Definition: YStyle.h:322
YSLib::UI::Styles::HandlerTable
unordered_map< Key, Handler, ystdex::combined_hash< Key > > HandlerTable
样式处理器表。
Definition: YStyle.h:386
YSLib::UI::Styles::TitleText
@ TitleText
Definition: YStyle.h:331
DefGetter
#define DefGetter(_q, _t, _n,...)
Definition: YBaseMacro.h:241
YSLib::Drawing::HSL::HSL
HSL(float h, float s=0, float l=0) ynothrow
Definition: YStyle.h:217
YSLib::Drawing::DrawRectRoundCorner
YF_API void DrawRectRoundCorner(const PaintContext &pc, const Size &s, Color)
绘制部件边框用空心标准矩形。
Definition: YStyle.cpp:42
ystdex::function
function_base< function_traits< _fSig, empty_function_policy::throwing >, _fSig > function
函数包装类模板。
Definition: function.hpp:900
const
const Decapsulate const Decapsulate &y ynothrow ContextNode &ctx const
Definition: NPLA1Forms.cpp:1629
DefDeMoveAssignment
#define DefDeMoveAssignment(_t)
Definition: YBaseMacro.h:191
YSLib::Drawing::HSV::DefDeCopyCtor
DefDeCopyCtor(HSV) YB_ATTR_nodiscard YB_PURE explicit operator Color() const ynothrow
转换为 RGB 颜色。
ystdex::bases::noncopyable
不可复制对象：禁止派生类调用默认原型的复制构造函数和复制赋值操作符。
Definition: base.h:50
YSLib::UI::Styles::HotTracking
@ HotTracking
Definition: YStyle.h:333
YSLib::UI::Paint
@ Paint
界面绘制。
Definition: YWidgetEvent.h:427
YSLib::args
YB_ATTR_nodiscard YB_PURE typename _tParams && args
Definition: ValueNode.h:1299
YSLib::UI::Styles::HighlightText
@ HighlightText
Definition: YStyle.h:327
ystdex::ref
void ref(const _type &&)=delete
YSLib::UI::Styles::Frame
@ Frame
框架背景。
Definition: YStyle.h:318
YSLib::UI::Styles::Painter::key
Key key
Definition: YStyle.h:453
YSLib::UI::Styles::StyleItem
size_t StyleItem
标识样式渲染项的类型。
Definition: YStyle.h:377
yconstfn
#define yconstfn
指定编译时常量函数。
Definition: ydef.h:1073
ystdex::cpp2017::begin
auto begin(_tRange &c) -> decltype(c.begin())
Definition: range.hpp:323
YSLib::UI::Styles::Handler
function< void(PaintEventArgs &&)> Handler
样式处理器。
Definition: YStyle.h:383
YSLib::Drawing::HSL::HSL
HSL(Hue h=0, float s=0, float l=0) ynothrow
Definition: YStyle.h:213
platform::l
return l
Definition: YCLib/FileSystem.h:402