YSTest: YWidgetEvent.h 源文件

YSTest PreAlpha_b700_20160611 The YSLib Test Project

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

- 文件列表
- 文件成员

YWidgetEvent.h
浏览该文件的文档.
1 /*
2 © 2010-2016 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_YWidgetEvent_h_
29 #define YSL_INC_UI_YWidgetEvent_h_ 1
30
31 #include "YModules.h"
32 #include YFM_YSLib_UI_YComponent
33 #include YFM_YSLib_Core_YEvent
34 #include YFM_YSLib_Core_YString
35 #include YFM_YSLib_Core_YDevice // for Devices::KeyInputDevice::Tester,
36 // Devices::KeyInputDevice::DefaultTest;
37
38 namespace YSLib
39 {
40
41 namespace UI
42 {
43
49 yconstexpr const EventPriority BackgroundPriority(0xC0);
50 yconstexpr const EventPriority BoundaryPriority(0x60);
51 yconstexpr const EventPriority ForegroundPriority(0x40);
53
54
59 struct YF_API UIEventArgs
60 {
61 private:
63 lref<IWidget> sender;
64
65 public:
66 explicit
67 UIEventArgs(IWidget& wgt)
68 : sender(wgt)
69 {}
74 DefDeCopyCtor(UIEventArgs)
79 virtual
80 ~UIEventArgs();
81
86 DefDeCopyAssignment(UIEventArgs)
87
88 DefGetter(const ynothrow, IWidget&, Sender, sender)
89 PDefH(void, SetSender, IWidget& wgt)
90 ImplExpr(sender = wgt)
91 };
92
93
98 struct YF_API RoutedEventArgs : public UIEventArgs
99 {
100 public:
105 enum RoutingStrategy
106 {
107 Bubble = 0,
108 Tunnel = 1,
109 Direct = 2
110 };
111
112 RoutingStrategy Strategy;
113 bool Handled;
114
115 RoutedEventArgs(IWidget& wgt, RoutingStrategy strategy = Direct)
116 : UIEventArgs(wgt),
117 Strategy(strategy), Handled(false)
118 {}
120 DefDeCopyCtor(RoutedEventArgs)
125 ~RoutedEventArgs() override;
126 };
127
128
133 struct YF_API InputEventArgs : public RoutedEventArgs
134 {
135 public:
140 Devices::KeyInputDevice::Tester
141 Tester{Devices::KeyInputDevice::DefaultTest};
146 KeyInput Keys;
147
152 InputEventArgs(IWidget&, const KeyInput& = {}, RoutingStrategy = Direct);
154 DefDeCopyCtor(InputEventArgs)
159 ~InputEventArgs() override;
160
165 DefCvt(const ynothrow, const KeyInput&, Keys)
166
167
171 PDefHOp(bool, [], KeyIndex code) const
172 ImplRet(Tester(Keys, code))
173
178 DefGetter(const ynothrow, const KeyInput&, Keys, Keys)
179 };
180
181
186 struct YF_API KeyEventArgs : public InputEventArgs
187 {
188 public:
189 using InputType = KeyInput;
190
194 KeyEventArgs(IWidget&, const InputType& = {}, RoutingStrategy = Direct);
195
197 DefDeCopyCtor(KeyEventArgs)
202 ~KeyEventArgs() override;
203 };
204
205
210 struct YF_API CursorEventArgs : public InputEventArgs
211 {
212 public:
213 using InputType = Drawing::Point;
214
216 InputType Position;
217
222 CursorEventArgs(IWidget&, const KeyInput&, const InputType& = {},
223 RoutingStrategy = Direct);
225 DefDeCopyCtor(CursorEventArgs)
230 ~CursorEventArgs() override;
235 DefCvt(const ynothrow, const InputType&, Position)
236 };
237
238
243 using WheelDelta = ptrdiff_t;
244
245
250 class YF_API CursorWheelEventArgs : public CursorEventArgs
251 {
252 private:
253 WheelDelta delta;
254
255 public:
256 CursorWheelEventArgs(IWidget&, WheelDelta, const KeyInput&,
257 const InputType& = {}, RoutingStrategy = Direct);
259 DefDeCopyCtor(CursorWheelEventArgs)
264 ~CursorWheelEventArgs() override;
265
266 DefGetter(const ynothrow, WheelDelta, Delta, delta)
267 };
268
269
274 class YF_API TextInputEventArgs : public InputEventArgs
275 {
276 public:
277 String Text;
278
279 TextInputEventArgs(IWidget&, String, const KeyInput& = {},
280 RoutingStrategy = Direct);
281 TextInputEventArgs(InputEventArgs, String);
283 DefDeCopyCtor(TextInputEventArgs)
288 ~TextInputEventArgs() override;
289 };
290
291
298 template<typename _type>
299 struct GValueEventArgs : public UIEventArgs
300 {
302 using ValueType = _type;
303
304 ValueType Value;
305
309 template<typename... _tParams>
310 yconstfn
311 GValueEventArgs(IWidget& wgt, _tParams&&... args)
312 : UIEventArgs(wgt),
313 Value(yforward(args)...)
314 {}
315 DefCvt(const ynothrow, ValueType, Value)
316 };
317
318
323 struct YF_API PaintEventArgs : public UIEventArgs, public PaintContext
324 {
325 PaintEventArgs(IWidget&);
326 PaintEventArgs(IWidget&, const PaintContext&);
327 PaintEventArgs(IWidget&, const Drawing::Graphics&, const Drawing::Point&,
328 const Drawing::Rect&);
330 DefDeCopyCtor(PaintEventArgs)
335 ~PaintEventArgs() override;
336 };
337
338
339 //事件处理器类型。
340 using HUIEvent = GHEvent<void(UIEventArgs&&)>;
341 using HInputEvent = GHEvent<void(InputEventArgs&&)>;
342 using HKeyEvent = GHEvent<void(KeyEventArgs&&)>;
344 using HCursorEvent = GHEvent<void(CursorEventArgs&&)>;
345 using HPaintEvent = GHEvent<void(PaintEventArgs&&)>;
350 using HCursorWheelEvent = GHEvent<void(CursorWheelEventArgs&&)>;
355 using HTextInputEvent = GHEvent<void(TextInputEventArgs&&)>;
356
357
358 #define DefEventTypeMapping(_name, _tEventHandler) \
359 template<> \
360 struct EventTypeMapping<_name> \
361 { \
362 using HandlerType = _tEventHandler; \
363 };
364
365
370 enum VisualEvent : size_t
371 {
372 // AutoSizeChanged,
373 // BackColorChanged,
374 // ForeColorChanged,
375 // LocationChanged,
376 // MarginChanged,
377 // VisibleChanged,
378
379 // EnabledChanged,
380
381 //视图变更事件。
382 Move,
383 Resize,
384
385 // GUI 输入事件。
386 KeyUp,
387 KeyDown,
388 KeyHeld,
389 KeyPress,
390 TouchUp,
391 TouchDown,
392 TouchHeld,
393 Click,
394
398 ClickAcross,
403 CursorOver,
408 CursorWheel,
413 TextInput,
414
415 // GUI 输出事件。
416 Paint,
417
418 //焦点事件。
419 GotFocus,
420 LostFocus,
421
422 //边界事件。
423 Enter,
424 Leave,
425 // TextChanged,
426 // FontChanged,
427 // FontColorChanged,
428 // FontSizeChanged,
435 MaxEvent
436 };
437
438
439 template<VisualEvent>
440 struct EventTypeMapping
441 {
442 //定义 HandlerType 的默认值可能会导致运行期 dynamic_cast 失败。
443 // using HandlerType = HEvent;
444 };
445
446 DefEventTypeMapping(Move, HUIEvent)
447 DefEventTypeMapping(Resize, HUIEvent)
448
449 DefEventTypeMapping(KeyUp, HKeyEvent)
450 DefEventTypeMapping(KeyDown, HKeyEvent)
451 DefEventTypeMapping(KeyHeld, HKeyEvent)
452 DefEventTypeMapping(KeyPress, HKeyEvent)
454 DefEventTypeMapping(CursorOver, HCursorEvent)
455 DefEventTypeMapping(TouchUp, HCursorEvent)
456 DefEventTypeMapping(TouchDown, HCursorEvent)
457 DefEventTypeMapping(TouchHeld, HCursorEvent)
458 DefEventTypeMapping(Click, HCursorEvent)
460 DefEventTypeMapping(ClickAcross, HCursorEvent)
462 DefEventTypeMapping(CursorWheel, HCursorWheelEvent)
464 DefEventTypeMapping(TextInput, HTextInputEvent)
465
466 DefEventTypeMapping(Paint, HPaintEvent)
467
468 DefEventTypeMapping(GotFocus, HUIEvent)
469 DefEventTypeMapping(LostFocus, HUIEvent)
470
471 DefEventTypeMapping(Enter, HCursorEvent)
472 DefEventTypeMapping(Leave, HCursorEvent)
473
474
479 namespace EventMapping
480 {
481
482 using MappedType = GEventPointerWrapper<UIEventArgs&&>;
483 using ItemType = GIHEvent<UIEventArgs&&>;
484 using PairType = pair<VisualEvent, MappedType>;
485 using MapType = map<VisualEvent, MappedType>;
486 using SearchResult = pair<typename MapType::iterator, bool>; \
488
489 } // namespace EventMapping;
490
491 using VisualEventMap = EventMapping::MapType;
492
493
499 class YF_API BadEvent : public LoggedEvent
500 {
501 public:
503 using LoggedEvent::LoggedEvent;
504
506
507 DefDeCtor(BadEvent)
508 DefDeCopyCtor(BadEvent)
510 ~BadEvent() override;
512 };
513
514
520 class YF_API UIEventSignal : public Messaging::MessageSignal
521 {
522 public:
524
525 using MessageSignal::MessageSignal;
526
527 DefDeCopyCtor(UIEventSignal)
529 virtual
530 ~UIEventSignal();
532 };
533
534
539 class YF_API AController : public ystdex::cloneable
540 {
541 private:
542 bool enabled;
543
544 public:
548 AController(bool b = true)
549 : enabled(b)
550 {}
552 DefDeCopyCtor(AController)
557 ~AController() override;
558
559 DefPred(const ynothrow, Enabled, enabled)
565 virtual PDefH(bool, IsEventEnabled, VisualEvent id) const
566 ImplRet(id == Paint)
567
572 DeclIEntry(EventMapping::ItemType& GetItem(VisualEvent) const)
578 virtual PDefH(EventMapping::ItemType&, GetItemRef, VisualEvent id,
579 EventMapping::MappedType(&)()) const
580 ImplRet(GetItem(id))
581
582 DefSetter(, bool, Enabled, enabled)
589 virtual PDefH(void, SetEventEnabled, VisualEvent, bool)
590 ImplThrow(ystdex::unsupported("AController::SetEventEnabled"))
591
596 DeclIEntry(AController* clone() const ImplI(ystdex::cloneable))
597 };
598
599
601 template<class _tEventHandler>
602 size_t
603 DoEvent(AController& controller, VisualEvent id,
604 _t<EventArgsHead<typename _tEventHandler::TupleType>>&& e)
605 {
606 TryRet(dynamic_cast< GEvent<typename _tEventHandler::FuncType>&>(
607 controller.GetItem(id))(std::move(e)))
608 CatchIgnore(std::out_of_range&)
609 CatchIgnore(std::bad_cast&)
610 return 0;
611 }
612
613
617 template<VisualEvent _vID>
618 EventMapping::MappedType
619 NewEvent()
620 {
621 return EventMapping::MappedType(new GEventWrapper<GEvent<typename
622 EventTypeMapping<_vID>::HandlerType::FuncType>, UIEventArgs&&>());
623 }
624
629 YF_API EventMapping::ItemType&
630 GetEvent(EventMapping::MapType&, VisualEvent, EventMapping::MappedType(&)());
631
639 template<VisualEvent _vID>
640 GEvent<typename EventTypeMapping<_vID>::HandlerType::FuncType>&
641 FetchEvent(VisualEventMap& m)
642 {
643 return dynamic_cast< GEvent<typename EventTypeMapping<_vID>::HandlerType
644 ::FuncType>&>(GetEvent(m, _vID, NewEvent<_vID>));
645 }
656 template<VisualEvent _vID>
657 GEvent<typename EventTypeMapping<_vID>::HandlerType::FuncType>&
658 FetchEvent(AController& controller)
659 {
660 return dynamic_cast< GEvent<typename EventTypeMapping<_vID>::HandlerType
661 ::FuncType>&>(controller.GetItemRef(_vID, NewEvent<_vID>));
662 }
663
665
666 template<class _tWidget, VisualEvent _vID>
667 using GWidgetHandlerAdaptor = GHandlerAdaptor<_tWidget,
668 typename EventTypeMapping<_vID>::HandlerType::BaseType>;
669
670 template<VisualEvent _vID, class _tWidget, typename _func>
671 GWidgetHandlerAdaptor<_tWidget, _vID>
672 MakeWidgetHandlerAdaptor(_tWidget& wgt, _func&& f)
673 {
674 return GWidgetHandlerAdaptor<_tWidget, _vID>(wgt, yforward(f));
675 }
676
678 template<VisualEvent _vID, class _tTarget, class _tWidget, typename _func>
679 GEvent<typename EventTypeMapping<_vID>::HandlerType::FuncType>&
680 AddWidgetHandlerAdaptor(_tTarget&& target, _tWidget& wgt, _func&& f)
681 {
682 return FetchEvent<_vID>(yforward(target))
683 += GWidgetHandlerAdaptor<_tWidget, _vID>(wgt, yforward(f));
684 }
686
687
692 class YF_API WidgetController : public AController
693 {
694 public:
696 mutable GEventWrapper<GEvent<void(PaintEventArgs&&)>, UIEventArgs&&> Paint;
697
701 explicit
702 WidgetController(bool = {});
703
705 EventMapping::ItemType&
706 GetItem(VisualEvent) const ImplI(AController);
707
709 DefClone(const ImplI(AController), WidgetController)
710 };
711
712 } // namespace UI;
713
714 } // namespace YSLib;
715
716 #endif
717
YSLib::UI::AController::enabled
bool enabled
控件可用性。
Definition: YWidgetEvent.h:542
YSLib::UI::NewEvent
EventMapping::MappedType NewEvent()
构造指针指向的 VisualEvent 指定的事件对象。
Definition: YWidgetEvent.h:619
YSLib::UI::ImplExpr
IWidget bool b ImplExpr(wgt.GetController().SetEnabled(b)) YF_API bool Enable(IWidget &
设置部件可用性，且当可用性改变时无效化部件区域。
yconstexpr
#define yconstexpr
指定编译时常量表达式。
Definition: ydef.h:653
YSLib::UI::CursorWheel
指针设备滚轮输入。
Definition: YWidgetEvent.h:408
YSLib::UI::InputEventArgs::Keys
KeyInput Keys
包含的按键代码。
Definition: YWidgetEvent.h:146
YSLib::EventArgsHead
Definition: YEvent.hpp:800
YSLib::GEvent
事件模板。
Definition: YEvent.hpp:312
YSLib::UI::ForegroundPriority
yconstexpr const EventPriority ForegroundPriority(0x40)
YSLib::UI::BadEvent
错误或不存在的部件事件异常。
Definition: YWidgetEvent.h:499
YSLib::UI::KeyEventArgs::InputType
KeyInput InputType
输入类型。
Definition: YWidgetEvent.h:189
YSLib::UI::MaxEvent
事件边界。
Definition: YWidgetEvent.h:435
YSLib::LoggedEvent::LoggedEvent
LoggedEvent(const string_view, RecordLevel=Emergent)
Definition: YException.cpp:39
YSLib::UI::MakeWidgetHandlerAdaptor
GWidgetHandlerAdaptor< _tWidget, _vID > MakeWidgetHandlerAdaptor(_tWidget &wgt, _func &&f)
Definition: YWidgetEvent.h:672
YSLib::UI::CursorWheelEventArgs
滚轮事件参数。
Definition: YWidgetEvent.h:250
YSLib::UI::RoutedEventArgs::Handled
bool Handled
事件已经被处理。
Definition: YWidgetEvent.h:113
YSLib::GHandlerAdaptor
事件处理器适配器模板。
Definition: YEvent.hpp:818
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:45
ImplI
#define ImplI(...)
Definition: YBaseMacro.h:386
YSLib::UI::UIEventArgs::UIEventArgs
UIEventArgs(IWidget &wgt)
Definition: YWidgetEvent.h:67
YSLib::UI::Resize
大小调整。
Definition: YWidgetEvent.h:383
YSLib::UI::WidgetController::Paint
GEventWrapper< GEvent< void(PaintEventArgs &&)>, UIEventArgs && > Paint
Definition: YWidgetEvent.h:696
YSLib::UI::EventMapping::ItemType
GIHEvent< UIEventArgs && > ItemType
Definition: YWidgetEvent.h:483
ystdex::any_ops::clone
Definition: any.h:253
YSLib::UI::CursorWheelEventArgs::delta
WheelDelta delta
Definition: YWidgetEvent.h:253
YSLib::UI::ImplRet
const IWidget &wgt ImplRet(wgt.GetView().IsVisible()) bool YF_API Contains(const IWidget &
判断点是否在部件的可视区域内。
YSLib::UI::args
yconstfn const string _tParams && args
Definition: Loader.h:131
DefDeCopyAssignment
#define DefDeCopyAssignment(_t)
Definition: YBaseMacro.h:185
YSLib::EventPriority
std::uint8_t EventPriority
事件优先级。
Definition: YEvent.hpp:217
YSLib::LoggedEvent
记录日志的异常事件类。
Definition: YException.h:49
YSLib::UI::KeyHeld
键接触保持。
Definition: YWidgetEvent.h:388
YSLib::UI::TouchHeld
屏幕接触保持。
Definition: YWidgetEvent.h:392
YSLib::UI::KeyPress
键按下。
Definition: YWidgetEvent.h:389
YSLib::UI::VisualEventMap
EventMapping::MapType VisualEventMap
Definition: YWidgetEvent.h:491
YSLib::UI::CursorEventArgs::Position
InputType Position
Definition: YWidgetEvent.h:216
DefDeCtor
#define DefDeCtor(_t)
简单通用成员函数定义。
Definition: YBaseMacro.h:156
YSLib::Text::String
YSLib 标准字符串（使用 UCS-2 作为内部编码）。
Definition: YString.h:46
YSLib::UI::HCursorEvent
GHEvent< void(CursorEventArgs &&)> HCursorEvent
Definition: YWidgetEvent.h:344
DefGetter
#define DefGetter(_q, _t, _n,...)
Definition: YBaseMacro.h:240
YSLib::UI::UIEventArgs
用户界面事件参数基类。
Definition: YWidgetEvent.h:59
YSLib::UI::GotFocus
焦点获得。
Definition: YWidgetEvent.h:419
ystdex::lref
左值引用包装。
Definition: ref.hpp:74
YSLib::UI::DoEvent
size_t DoEvent(AController &controller, VisualEvent id, _t< EventArgsHead< typename _tEventHandler::TupleType >> &&e)
Definition: YWidgetEvent.h:603
DefCvt
#define DefCvt(_q, _t,...)
Definition: YBaseMacro.h:205
CatchIgnore
#define CatchIgnore(_ex)
指定异常处理器忽略指定异常。
Definition: YBaseMacro.h:133
YSLib::ynothrow
YB_PURE const _type size_t n ynothrow
Definition: YCoreUtilities.h:168
YSLib::UI::RoutedEventArgs::RoutedEventArgs
RoutedEventArgs(IWidget &wgt, RoutingStrategy strategy=Direct)
Definition: YWidgetEvent.h:115
DefClone
#define DefClone(_q, _t)
动态复制。
Definition: YBaseMacro.h:293
YSLib::UI::ClickAcross
屏幕点击在不同部件上。
Definition: YWidgetEvent.h:398
YSLib::UI::Click
屏幕点击。
Definition: YWidgetEvent.h:393
YSLib::UI::BackgroundPriority
yconstexpr const EventPriority BackgroundPriority(0xC0)
用户界面绘制优先级。
ystdex::_t
typename _type::type _t
嵌套类型别名。
Definition: type_traits.hpp:96
YSLib::UI::Leave
控件离开。
Definition: YWidgetEvent.h:424
YSLib::UI::EventMapping::MappedType
GEventPointerWrapper< UIEventArgs && > MappedType
映射项类型。
Definition: YWidgetEvent.h:482
YSLib::GEventWrapper
事件包装类模板。
Definition: YEvent.hpp:905
YSLib::UI::AController::AController
AController(bool b=true)
构造：使用指定可用性。
Definition: YWidgetEvent.h:548
YSLib::UI::AController
抽象控制器。
Definition: YWidgetEvent.h:539
YSLib::UI::TextInputEventArgs::Text
String Text
Definition: YWidgetEvent.h:277
DeclIEntry
#define DeclIEntry(_sig)
Definition: YBaseMacro.h:394
YSLib::UI::UIEventArgs::sender
lref< IWidget > sender
Definition: YWidgetEvent.h:63
YSLib::UI::FetchEvent
GEvent< typename EventTypeMapping< _vID >::HandlerType::FuncType > & FetchEvent(IWidget &wgt)
取部件事件。
Definition: YControl.h:136
DefDeCopyCtor
#define DefDeCopyCtor(_t)
Definition: YBaseMacro.h:161
YSLib::UI::wgt
IWidget & wgt
Definition: YControl.h:112
YSLib::UI::CursorEventArgs
指针设备输入事件参数类。
Definition: YWidgetEvent.h:210
YSLib::UI::HKeyEvent
GHEvent< void(KeyEventArgs &&)> HKeyEvent
Definition: YWidgetEvent.h:342
YSLib::Drawing::Rect
屏幕标准矩形：表示屏幕矩形区域。
Definition: YGDIBase.h:540
ystdex
特性测试宏。
Definition: ydef.h:796
YSLib::UI::GValueEventArgs::ValueType
_type ValueType
值类型。
Definition: YWidgetEvent.h:302
TryRet
#define TryRet(...)
指定表达式在 try 块中求值并返回。
Definition: YBaseMacro.h:124
YSLib::UI::Move
移动：位置调整。
Definition: YWidgetEvent.h:382
YSLib::Devices::KeyInputDevice::Tester
std::function< bool(const KeyInput &, KeyIndex)> Tester
输入测试器：判断是否在指定索引上激活输入状态。
Definition: YDevice.h:101
YSLib::UI::EventMapping::MapType
map< VisualEvent, MappedType > MapType
映射表类型。
Definition: YWidgetEvent.h:485
YSLib::UI::HCursorWheelEvent
GHEvent< void(CursorWheelEventArgs &&)> HCursorWheelEvent
指针设备滚轮事件。
Definition: YWidgetEvent.h:350
UI
YSLib::UI::GValueEventArgs::GValueEventArgs
yconstfn GValueEventArgs(IWidget &wgt, _tParams &&...args)
构造：使用部件引用和值。
Definition: YWidgetEvent.h:311
platform::KeyInput
std::bitset< KeyBitsetWidth > KeyInput
按键并行位宽。
Definition: Keys.h:67
YSLib::UI::HInputEvent
GHEvent< void(InputEventArgs &&)> HInputEvent
Definition: YWidgetEvent.h:341
YSLib::Devices::KeyInputDevice::DefaultTest
KeyIndex code DefaultTest
Definition: YDevice.h:126
YSLib::UI::TextInputEventArgs
文本输入事件参数。
Definition: YWidgetEvent.h:274
platform::KeyIndex
size_t KeyIndex
按键索引类型：标识特定的按键在按键集合中的位置。
Definition: Keys.h:42
YSLib::UI::RoutedEventArgs
路由事件参数基类。
Definition: YWidgetEvent.h:98
YSLib::UI::BoundaryPriority
yconstexpr const EventPriority BoundaryPriority(0x60)
YSLib::UI::e
void e
Definition: YWidget.h:352
YSLib::UI::TextInput
文本输入。
Definition: YWidgetEvent.h:413
YSLib::UI::EventMapping::SearchResult
pair< typename MapType::iterator, bool > SearchResult
搜索表结果类型。
Definition: YWidgetEvent.h:487
YSLib::UI::UIEventSignal
用户事件信号：表示携带用户事件的消息处理中断的异常。
Definition: YWidgetEvent.h:520
YModules.h
YSLib::UI::Enter
控件进入。
Definition: YWidgetEvent.h:423
yconstfn
#define yconstfn
指定编译时常量函数。
Definition: ydef.h:654
YSLib::Messaging::MessageSignal
消息信号：表示单一处理中断的异常。
Definition: YMessage.h:287
YSLib::Drawing::Point
GBinaryGroup< SPos > Point
屏幕二维点（直角坐标表示）。
Definition: YGDIBase.h:278
DefEventTypeMapping
#define DefEventTypeMapping(_name, _tEventHandler)
Definition: YWidgetEvent.h:358
YSLib::UI::TouchDown
屏幕接触开始。
Definition: YWidgetEvent.h:391
yforward
#define yforward(_expr)
根据参数类型使用 std::forward 传递对应参数。
Definition: ydef.h:969
YSLib::UI::HTextInputEvent
GHEvent< void(TextInputEventArgs &&)> HTextInputEvent
文本输入事件。
Definition: YWidgetEvent.h:355
YSLib::UI::PaintEventArgs
部件绘制参数。
Definition: YWidgetEvent.h:323
YF_API
#define YF_API
Definition: Platform.h:56
YSLib::UI::VisualEvent
VisualEvent
标准控件事件空间。
Definition: YWidgetEvent.h:370
YSLib::UI::LostFocus
焦点失去。
Definition: YWidgetEvent.h:420
YSLib::UI::GetEvent
YF_API EventMapping::ItemType & GetEvent(EventMapping::MapType &, VisualEvent, EventMapping::MappedType(&)())
在事件映射表中取指定 id 对应的事件。
ImplThrow
#define ImplThrow(...)
Definition: YBaseMacro.h:105
YSLib::IO::f
const string &path const String &path _func f
Definition: YSLib/Service/FileSystem.h:430
YSLib::UI::GValueEventArgs::Value
ValueType Value
Definition: YWidgetEvent.h:304
DefPred
#define DefPred(_q, _n,...)
Definition: YBaseMacro.h:231
YSLib::UI::TouchUp
屏幕接触结束。
Definition: YWidgetEvent.h:390
YSLib::Drawing::GGraphics
二维图形接口上下文模板。
Definition: YGraphics.h:62
YSLib::UI::PDefH
PDefH(void, DisplayFor, IWidget &wgt, Timers::TimeSpan delay) ImplExpr(Show(wgt)
在一定时间内显示部件。
YSLib::UI::EventMapping::PairType
pair< VisualEvent, MappedType > PairType
Definition: YWidgetEvent.h:484
YSLib::UI::AddWidgetHandlerAdaptor
GEvent< typename EventTypeMapping< _vID >::HandlerType::FuncType > & AddWidgetHandlerAdaptor(_tTarget &&target, _tWidget &wgt, _func &&f)
Definition: YWidgetEvent.h:680
YSLib::UI::CursorOver
指针设备光标悬停。
Definition: YWidgetEvent.h:403
YSLib::UI::InputEventArgs
输入事件参数类。
Definition: YWidgetEvent.h:133
YSLib::UI::RoutedEventArgs::Strategy
RoutingStrategy Strategy
事件路由策略。
Definition: YWidgetEvent.h:112
YSLib::UI::Paint
界面绘制。
Definition: YWidgetEvent.h:416
YSLib::UI::KeyDown
键接触开始。
Definition: YWidgetEvent.h:387
YSLib::UI::WidgetController
部件控制器。
Definition: YWidgetEvent.h:692
YSLib::UI::RoutedEventArgs::RoutingStrategy
RoutingStrategy
事件路由策略枚举。
Definition: YWidgetEvent.h:105
YSLib::UI::KeyEventArgs
按键输入事件参数类。
Definition: YWidgetEvent.h:186
YSLib::UI::KeyUp
键接触结束。
Definition: YWidgetEvent.h:386
YSLib::UI::HPaintEvent
GHEvent< void(PaintEventArgs &&)> HPaintEvent
Definition: YWidgetEvent.h:345
YSLib::UI::HUIEvent
GHEvent< void(UIEventArgs &&)> HUIEvent
Definition: YWidgetEvent.h:340
YSLib::UI::WheelDelta
ptrdiff_t WheelDelta
滚轮度量：以角度计量的转动滚轮的幅度。
Definition: YWidgetEvent.h:243
ystdex::cloneable
可动态复制的抽象基类。
Definition: base.h:117
DefSetter
#define DefSetter(_q, _t, _n, _m)
Definition: YBaseMacro.h:251
YSLib::UI::EventTypeMapping
Definition: YWidgetEvent.h:440
YSLib::UI::GValueEventArgs
简单 UI 事件参数类。
Definition: YWidgetEvent.h:299
YSLib::GEventPointerWrapper
事件项类型。
Definition: YEvent.hpp:934
YSLib::Drawing::GBinaryGroup< SPos >