YSTest
PreAlpha_b500_20140530
The YSLib Test Project
|
命名空间 | |
EventMapping | |
事件映射命名空间。 | |
Styles | |
类型定义 | |
using | Form = Window |
template<typename... _tParams> | |
using | GWidgetCreator = unique_ptr< IWidget >(*)(_tParams...) |
template<typename... _tParams> | |
using | GWidgetInserter = void(*)(IWidget &, _tParams...) |
using | IndexEventArgs = GValueEventArgs< MTextList::IndexType > |
索引事件。 更多... | |
using | ViewerType = GSequenceViewer< ListType > |
视图类型。 更多... | |
using | ViewArgs = GValueEventArgs< bool > |
视图参数类型。 更多... | |
template<typename _type > | |
using | GBrushUpdater = std::function< void(const PaintContext &, _type, const Point &, const Point &)> |
画刷更新器类型。 更多... | |
using | HBrush = std::function< void(PaintEventArgs &&)> |
画刷回调函数。 更多... | |
using | ZOrderType = u8 |
using | WheelDelta = ptrdiff_t |
滚轮度量:以角度计量的转动滚轮的幅度。 更多... | |
using | VisualEventMap = EventMapping::MapType |
using | WidgetIterator = ystdex::any_input_iterator< IWidget > |
通用部件迭代器。 更多... | |
using | WidgetRange = pair< WidgetIterator, WidgetIterator > |
两个部件迭代器组成的左闭右开区间确定的迭代器范围。 更多... | |
枚举 | |
enum | BorderArea : u8 { BorderArea::Left = 0, BorderArea::Up = 0, BorderArea::Center = 1, BorderArea::Right = 2, BorderArea::Down = 2 } |
边框区域。 更多... | |
enum | TextAlignment { TextAlignment::Left = 0, TextAlignment::Up = 0, TextAlignment::Center = 1, TextAlignment::Right = 2, TextAlignment::Down = 2 } |
enum | ScrollCategory { ScrollCategory::SmallDecrement = 0, ScrollCategory::SmallIncrement = 1, ScrollCategory::LargeDecrement = 2, ScrollCategory::LargeIncrement = 3, ScrollCategory::ThumbPosition = 4, ScrollCategory::ThumbTrack = 5, ScrollCategory::First = 6, ScrollCategory::Last = 7, ScrollCategory::EndScroll = 8 } |
滚动类别。 更多... | |
enum | CursorState { CursorState::Outside, CursorState::Over, CursorState::Pressed } |
指针设备光标相对于控件的状态。 更多... | |
函数 | |
YF_API void | SwitchVisible (IWidget &) |
切换部件显示状态并无效化。 更多... | |
YF_API void | SwitchVisibleToFront (IWidget &) |
切换部件显示状态并请求提升至前端。 更多... | |
template<class _tWidget > | |
void | SetBufferRendererAndText (_tWidget &wgt, const String &s) |
设置部件渲染器为 BufferedRenderer 及部件的 Text 成员。 更多... | |
YF_API shared_ptr < TextList::ListType > | FetchVisualStyleNames (String=u"<Default>") |
取视觉样式名称。 更多... | |
yconstexpr Messaging::Priority | AnimationPriority (0x20) |
默认背景动画任务消息优先级。 更多... | |
_fCallable void | Restart (_tAnimation &ani, IWidget &wgt, _fCallable f) |
template<class _tAnimation , typename _fCallable , typename _tTimer > | |
void | SetupByTimer (_tAnimation &ani, IWidget &wgt, _tTimer &&timer, _fCallable f) |
安装以计时器控制的动画效果。 更多... | |
PDefH (void, Activate, Console &console, Drawing::Color fc=Drawing::ColorSpace::White) ImplExpr(Activate(console | |
激活:使用指定屏幕、有效性、前景色和默认背景色。 更多... | |
YF_API Rect | ParseRect (const string &) |
template<typename _tWidget , typename... _tParams> | |
static unique_ptr< IWidget > | CreateUniqueWidget (_tParams &&...args) |
注册部件加载器:创建部件。 更多... | |
template<typename _tWidget , typename... _tParams> | |
static void | InsertWidget (IWidget &wgt, _tParams &&...args) |
注册部件加载器:添加部件引用。 更多... | |
bool | CheckChildName (const string &str) |
template<typename... _tParams> | |
IWidget & | AccessWidget (const ValueNode &node, const string &name, _tParams &&...args) |
template<class _tWidget , typename... _tParams> | |
_tWidget & | AccessWidget (const ValueNode &node, _tParams &&...args) |
const ZOrderType | DefaultMenuZOrder (224) |
默认菜单 Z 顺序值。 更多... | |
YF_API void | LocateMenu (Menu &, const Menu &, Menu::IndexType) |
定位菜单:以第二个参数作为参考父菜单,按指定参考偏移索引定位菜单。 更多... | |
DeclDelegate (HScrollEvent, ScrollEventArgs) class YF_API ATrack | |
轨道。 更多... | |
YF_API void | DrawTrackBackground (PaintEventArgs &&e, ATrack &) |
绘制指定色调的基本按钮背景。 更多... | |
DeclEvent (HViewEvent, ViewChanged) DeclEvent(HIndexEvent | |
视图变更事件。 更多... | |
Selected | DeclEvent (HIndexEvent, Confirmed) explicit TextList(const Rect & |
项目选中确认事件。 更多... | |
Selected const shared_ptr < ListType > const pair< Color, Color > & | DefDeMoveCtor (TextList) DefPredMem(const ynothrow |
Selected const shared_ptr < ListType > const pair< Color, Color > viewer | PDefH (bool, Contains, ListType::size_type i) ImplBodyMem(viewer |
DefGetterMem (const ynothrow, ListType::size_type, SelectedIndex, viewer) SDst GetFullViewHeight() const | |
取完整视图高。 更多... | |
SDst | GetViewPosition () const |
取视图顶端竖直位置。 更多... | |
void | SetList (const shared_ptr< ListType > &) |
设置文本列表。 更多... | |
void | SetSelected (ListType::size_type) |
按指定项目索引设置选中项目。 更多... | |
void | SetSelected (SPos, SPos) |
按接触点设置选中项目。 更多... | |
void | SetSelected (const Point &pt) |
按接触点设置选中项目。 更多... | |
SDst | AdjustOffset (bool) |
调整列表视图底项目的竖直偏移量为零。 更多... | |
void | AdjustViewForContent () |
按内容大小依次调整视图中选中和首个项目的索引,然后按需调整竖直偏移量。 更多... | |
void | AdjustViewLength () |
调整视图长度。 更多... | |
virtual bool | CheckConfirmed (ListType::size_type) const |
检查列表中的指定项是否有效。 更多... | |
ListType::size_type | CheckPoint (SPos, SPos) |
检查点(相对于所在缓冲区的控件坐标)是否在选择范围内, 更多... | |
ListType::size_type | CheckPoint (const Point &pt) |
检查点(相对于所在缓冲区的控件坐标)是否在选择范围内, 更多... | |
PDefH (void, ClearSelected,) ImplBodyMem(viewer | |
void | InvalidateSelected (ListType::difference_type offset, ListType::size_type diff=1) |
无效化偏移量对应的列表项区域。 更多... | |
void | InvalidateSelected2 (ListType::difference_type, ListType::difference_type) |
无效化偏移量对应的列表项区域。 更多... | |
void | LocateViewPosition (SDst) |
定位视图顶端至指定竖直位置。 更多... | |
virtual void | DrawItem (const Graphics &, const Rect &mask, const Rect &, ListType::size_type) |
绘制列表项。 更多... | |
virtual void | DrawItemBackground (const PaintContext &, const Rect &r) |
描画列表项背景。 更多... | |
virtual void | DrawItems (const PaintContext &) |
绘制列表。 更多... | |
void | Refresh (PaintEventArgs &&) override |
刷新:按指定参数绘制界面并更新状态。 更多... | |
void | ResetView () |
复位视图。 更多... | |
void | SelectFirst () |
选择第一个项目。 更多... | |
void | SelectLast () |
选择最后一个项目。 更多... | |
void | CallSelected () |
调用选中事件处理器。 更多... | |
void | InvokeConfirmed (ListType::size_type) |
检查和调用确认事件处理器。 更多... | |
template<typename _fPixelShader , bool _bSwapLR = false, bool _bSwapUD = false> | |
void | UpdatePixels (_fPixelShader shader, const PaintContext &pc, const Drawing::Image &img, const Point &dst_offset, const Point &src_offset) |
更新:逐像素操作。 更多... | |
FwdDeclI (IWidget) class ImageBrush | |
bool | IsEnabled (const IWidget &wgt) |
判断部件是否为可用的控件。 更多... | |
void | SetEnabledOf (IWidget &wgt, bool b) |
设置部件可用性。 更多... | |
YF_API bool | Enable (IWidget &, bool=true) |
设置部件可用性,且当可用性改变时无效化部件区域。 更多... | |
template<VisualEvent _vID> | |
EventT (typename EventTypeMapping< _vID >::HandlerType)&FetchEvent(IWidget &wgt) | |
取部件事件。 更多... | |
template<VisualEvent _vID, typename _tEventArgs > | |
size_t | CallEvent (IWidget &wgt, _tEventArgs &&e) |
调用部件事件,并忽略 BadEvent 异常。 更多... | |
template<VisualEvent _vID, class _tEventArgs > | |
void | OnEvent_Call (_tEventArgs &&e) |
处理事件:直接转发至发送者。 更多... | |
template<class _tEventArgs > | |
void | OnEvent_StopRouting (_tEventArgs &&e) |
YF_API void | OnUIEvent_Invalidate (UIEventArgs &&) |
处理用户界面事件:无效化发送者。 更多... | |
YF_API void | OnKeyHeld (KeyEventArgs &&) |
处理键接触保持事件。 更多... | |
YF_API void | OnTouchDown_RequestToFrontFocused (CursorEventArgs &&) |
处理屏幕接触开始事件:使用一般接触策略。 更多... | |
YF_API void | OnTouchHeld (CursorEventArgs &&) |
处理屏幕接触保持事件。 更多... | |
YF_API void | OnTouchHeld_Dragging (CursorEventArgs &&) |
处理屏幕接触移动事件:拖放按下部件。 更多... | |
YF_API void | OnTouchHeld_DraggingRaw (CursorEventArgs &&, IWidget &) |
处理屏幕接触移动事件:拖放指定部件。 更多... | |
YF_API void | OnKey_Bound_TouchUp (KeyEventArgs &&) |
处理按键事件:按键-指针设备接触结束。 更多... | |
YF_API void | OnKey_Bound_TouchDown (KeyEventArgs &&) |
处理按键事件:按键-指针设备接触开始。 更多... | |
YF_API void | OnKey_Bound_Click (KeyEventArgs &&) |
处理按键事件:按键-指针设备按下。 更多... | |
YF_API bool | IsFocused (const IWidget &) |
判断部件是否取得焦点。 更多... | |
YF_API bool | DoRequestFocus (IWidget &, bool release_event={}) |
向部件容器请求获得焦点,并指定 GotFocus 事件发送控件。 更多... | |
YF_API bool | DoReleaseFocus (IWidget &) |
释放焦点,并指定 LostFocus 事件发送控件。 更多... | |
YF_API void | RequestFocusFrom (IWidget &dst, IWidget &src) |
向部件容器请求获得焦点,并指定 GotFocus 事件发送控件。 更多... | |
YF_API void | ReleaseFocusFrom (IWidget &dst, IWidget &src) |
释放焦点,并指定 LostFocus 事件发送控件。 更多... | |
PDefH (void, RequestFocus, IWidget &wgt) ImplExpr(RequestFocusFrom(wgt | |
向部件容器释放获得焦点,成功后向自身发送 GotFocus 事件。 更多... | |
wgt | PDefH (void, ReleaseFocus, IWidget &wgt) ImplExpr(ReleaseFocusFrom(wgt |
释放焦点,成功后向自身发送 LostFocus 事件。 更多... | |
wgt wgt YF_API void | ClearFocusingOf (IWidget &) |
清除焦点指针并以此部件作为事件源调用被清除焦点部件的 LostFocus 事件。 更多... | |
YF_API bool | IsFocusedCascade (const IWidget &, const IWidget *={}) |
判断部件相对于指针指定的部件是否具有级联焦点。 更多... | |
YF_API void | RequestFocusCascade (IWidget &) |
级联请求部件及上层容器焦点。 更多... | |
YF_API void | ReleaseFocusCascade (IWidget &) |
级联释放部件及上层容器焦点。 更多... | |
YF_API bool | RepeatHeld (InputTimer &, InputTimer::HeldStateType &, const Timers::Duration &, const Timers::Duration &) |
向指定计时器传递参数,根据状态重复按键。 更多... | |
YF_API GUIState & | FetchGUIState () |
取默认图形用户界面公共状态。 更多... | |
bool | IsFocusedByShell (const IWidget &wgt, const GUIState &st=FetchGUIState()) |
判断指定部件是否被句柄指定的图形用户界面状态锁定为独立焦点。 更多... | |
YF_API IWidget & | FetchTopLevel (IWidget &) |
取指定部件的顶层部件。 更多... | |
YF_API IWidget & | FetchTopLevel (IWidget &, Point &) |
取指定部件的顶层部件,当返回非第一参数时变换坐标。 更多... | |
YF_API Point | LocateOffset (const IWidget *, Point, const IWidget *) |
取相对于第三参数指向的部件的点相对于第一参数指向的容器的偏移坐标。 更多... | |
Point | LocateContainerOffset (const IWidget &wgt, const Point &pt) |
取相对部件 wgt 的点 pt 相对于 wgt 的容器的偏移坐标。 更多... | |
YF_API Point | LocateForWidget (const IWidget &, const IWidget &) |
取第二参数指定的部件相对于第一参数指定的部件的偏移坐标。 更多... | |
template<class _tWidget , typename _fFetcher > | |
Point | LocateForWidgetNode (IWidget &wgt, _fFetcher fetch_ptr) |
取指定部件相对于视图树中的直接节点指针的偏移坐标。 更多... | |
YF_API Point | LocateForParentContainer (const IWidget &) |
取指定部件相对于容器的父容器的偏移坐标。 更多... | |
YF_API void | MoveToLeft (IWidget &wgt) |
移动部件 wgt 至容器左端。 更多... | |
YF_API void | MoveToRight (IWidget &wgt) |
移动部件 wgt 至容器右端。 更多... | |
YF_API void | MoveToTop (IWidget &wgt) |
移动部件 wgt 至容器上端。 更多... | |
YF_API void | MoveToBottom (IWidget &wgt) |
移动部件 wgt 至容器下端。 更多... | |
const ZOrderType | DefaultZOrder (64) |
默认 Z 顺序值。 更多... | |
const ZOrderType | DefaultWindowZOrder (128) |
默认窗口 Z 顺序值。 更多... | |
YF_API bool | RemoveFrom (IWidget &, IWidget &) |
从容器中移除部件。 更多... | |
template<class _tCon > | |
void | AddWidget (_tCon &con, IWidget &wgt) |
向部件添加单一子部件。 更多... | |
template<class _tCon > | |
void | AddWidget (_tCon &con, IWidget &wgt, ZOrderType z) |
向部件添加指定 Z 顺序的单一子部件。 更多... | |
template<class _tCon , class... _tWidgets> | |
void | AddWidgets (_tCon &con, _tWidgets &...wgts) |
向部件容器添加子部件。 更多... | |
template<class _tCon , class... _tWidgets> | |
void | AddWidgetsZ (_tCon &con, ZOrderType z, _tWidgets &...wgts) |
向部件容器添加指定 Z 顺序的子部件。 更多... | |
template<class _tCon , class... _tWidgets> | |
void | RemoveWidgets (_tCon &con, _tWidgets &...wgts) |
从部件容器移除子部件。 更多... | |
DeclDelegate (HUIEvent, UIEventArgs &&) DeclDelegate(HInputEvent | |
InputEventArgs && | DeclDelegate (HKeyEvent, KeyEventArgs &&) DeclDelegate(HCursorEvent |
InputEventArgs CursorEventArgs && | DeclDelegate (HPaintEvent, PaintEventArgs &&) DeclDelegate(HCursorWheelEvent |
指针设备滚轮事件。 更多... | |
InputEventArgs CursorEventArgs CursorWheelEventArgs && | DeclDelegate (HTextInputEvent, TextInputEventArgs &&) enum VisualEvent |
文本输入事件。 更多... | |
template<class _tEventHandler > | |
size_t | DoEvent (AController &controller, const VisualEvent &id, typename EventArgsHead< typename _tEventHandler::TupleType >::type &&e) |
template<VisualEvent _vID> | |
EventMapping::MappedType | NewEvent () |
构造指针指向的 VisualEvent 指定的事件对象。 更多... | |
YF_API EventMapping::ItemType & | GetEvent (EventMapping::MapType &, const VisualEvent &, EventMapping::MappedType(&)()) |
在事件映射表中取指定 id 对应的事件。 更多... | |
const IWidget &wgt | ImplRet (wgt.GetView().IsVisible()) bool YF_API Contains(const IWidget & |
判断点是否在部件的可视区域内。 更多... | |
PDefH (bool, Contains, const IWidget &wgt, const Point &pt) ImplRet(Contains(wgt | |
判断点是否在部件的可视区域内。 更多... | |
pt pt Y bool YF_API | ContainsVisible (const IWidget &wgt, SPos x, SPos y) |
判断点是否在可见部件的可视区域内。 更多... | |
PDefH (bool, ContainsVisible, const IWidget &wgt, const Point &pt) ImplRet(ContainsVisible(wgt | |
判断点是否在可见部件的可视区域内。 更多... | |
pt pt Y | PDefH (IWidget *, FetchContainerPtr, const IWidget &wgt) ImplRet(wgt.GetView().ContainerPtr) inline PDefH(IWidget * |
取部件的容器指针。 更多... | |
pt pt Y const IWidget &wgt | ImplRet (wgt.GetView().FocusingPtr) inline PDefH(const Point & |
取部件位置。 更多... | |
pt pt Y const IWidget &wgt const IWidget &wgt | ImplRet (wgt.GetView().GetLocation()) inline PDefH(const Size & |
取部件大小。 更多... | |
pt pt Y const IWidget &wgt const IWidget &wgt const IWidget &wgt | ImplRet (wgt.GetView().GetSize()) inline PDefH(Rect |
取部件边界。 更多... | |
pt pt Y const IWidget &wgt const IWidget &wgt const IWidget &wgt const IWidget &wgt | ImplRet ({GetLocationOf(wgt), GetSizeOf(wgt)}) YF_API void SetBoundsOf(IWidget & |
设置部件边界。 更多... | |
pt pt Y const IWidget &wgt const IWidget &wgt const IWidget &wgt const IWidget &wgt const Rect & | PDefH (void, SetContainerPtrOf, IWidget &wgt, IWidget *pCon={}) ImplExpr(wgt.GetView().ContainerPtr |
设置部件的容器指针。 更多... | |
YF_API void | SetInvalidationToParent (IWidget &) |
在容器设置部件的无效区域。 更多... | |
YF_API void | SetLocationOf (IWidget &, const Point &) |
设置部件左上角所在位置(相对于容器的偏移坐标)。 更多... | |
YF_API void | SetSizeOf (IWidget &, const Size &) |
设置部件大小。 更多... | |
PDefH (void, SetVisibleOf, IWidget &wgt, bool b) ImplExpr(wgt.GetView().SetVisible(b)) YF_API void Close(IWidget &) | |
设置部件可见性。 更多... | |
YF_API void | Hide (IWidget &) |
隐藏部件。 更多... | |
YF_API void | Invalidate (IWidget &, const Rect &) |
无效化:使相对于部件的指定区域在直接和间接的窗口缓冲区中无效。 更多... | |
PDefH (void, Invalidate, IWidget &wgt) ImplExpr(Invalidate(wgt | |
无效化:使部件区域在直接和间接的窗口缓冲区中无效。 更多... | |
GetSizeOf (wgt))) YF_API void InvalidateAll(IWidget & | |
无效化:使相对于部件及子部件的指定区域在直接和间接的窗口缓冲区中无效。 更多... | |
const Rect & | PDefH (void, InvalidateAll, IWidget &wgt) ImplExpr(InvalidateAll(wgt |
无效化:使部件及子部件区域在直接和间接的窗口缓冲区中无效。 更多... | |
const Rect const Rect & | PDefH (void, InvalidateChildren, IWidget &wgt) ImplExpr(InvalidateChildren(wgt |
无效化:使部件的子部件区域在直接和间接的窗口缓冲区中无效。 更多... | |
YF_API void | PaintChild (IWidget &wgt, PaintEventArgs &&e) |
调用指定子部件的 Paint 事件绘制参数指定的事件发送者。 更多... | |
YF_API Rect | PaintChild (IWidget &wgt, const PaintContext &pc) |
调用指定子部件的 Paint 事件绘制指定子部件。 更多... | |
YF_API void | PaintVisibleChild (IWidget &, PaintEventArgs &) |
调用 PaintChild 指定子部件并合并参数的重绘区域。 更多... | |
YF_API void | RequestToFront (IWidget &) |
请求提升至容器前端。 更多... | |
YF_API void | Show (IWidget &) |
显示部件。 更多... | |
void | DecorateAsCloseButton (Thumb &tmb) |
void | Activate (Console &, Drawing::Color, Drawing::Color) |
void | Deactivate (Console &) |
IWidget & | AccessWidget (const ValueNode &node) |
void | ResizeForContent (TextList &tl) |
void | UpdateView (TextList &tl, bool is_active) |
EventMapping::ItemType & | GetEvent (EventMapping::MapType &m, const VisualEvent &id, EventMapping::MappedType(&f)()) |
bool | Contains (const IWidget &wgt, SPos x, SPos y) |
void | SetBoundsOf (IWidget &wgt, const Rect &r) |
void | SetInvalidationOf (IWidget &wgt) |
void | Close (IWidget &wgt) |
void | InvalidateAll (IWidget &wgt, const Rect &bounds) |
void | InvalidateChildren (IWidget &wgt, const Rect &bounds) |
void | InvalidateParent (IWidget &wgt) |
void | InvalidateVisibleParent (IWidget &wgt) |
template<typename _fCallable > | |
void | AnimateTask (_fCallable update, Messaging::Priority prior=UI::AnimationPriority) |
按更新条件和优先级通过消息队列部署动画任务。 更多... | |
template<typename _fCallable > | |
void | AnimateConnection (const shared_ptr< _fCallable > &conn, Messaging::Priority prior=UI::AnimationPriority) |
按指定的连接对象更新动画任务。 更多... | |
template<typename _fCallable > | |
void | Animate (_fCallable f, Messaging::Priority prior=UI::AnimationPriority) |
按指定的可调用对象初始化为连接对象更新动画任务。 更多... | |
template<class _tAnimation , typename _fCallable > | |
void | Setup (_tAnimation &ani, IWidget &wgt, _fCallable f) |
安装动画效果。 更多... | |
template<class _tAnimation , typename _fCallable , typename _fCond > | |
void | Setup (_tAnimation &ani, IWidget &wgt, _fCond cond, _fCallable f) |
yconstexpr EventPriority | BackgroundPriority (0xC0) |
用户界面绘制优先级。 更多... | |
yconstexpr EventPriority | BoundaryPriority (0x60) |
yconstexpr EventPriority | ForegroundPriority (0x40) |
变量 | |
fc | |
yconstfn const string _tParams && | args |
bool | CyclicTraverse |
循环选择遍历。 更多... | |
ViewerType | viewer |
列表视图。 更多... | |
SDst | top_offset |
列表视图首项目超出上边界的竖直偏移量。 更多... | |
Selected const shared_ptr < ListType > const pair< Color, Color > | Selected |
Selected const shared_ptr < ListType > const pair< Color, Color > viewer | Contains |
ClearSelected | |
IsVisible | |
const IWidget &wgt | SPos |
pt | X |
pt pt Y | FetchFocusingPtr |
pt pt Y const IWidget &wgt | GetLocationOf |
pt pt Y const IWidget &wgt const IWidget &wgt const IWidget &wgt | GetBoundsOf |
yconstfn const string & | name |
yconstfn | PDefH (const ValueNode &, AccessWidgetNode, const ValueNode &nd) ImplRet(nd) template< typename..._tParams > const ValueNode &AccessWidgetNode(const ValueNode &node |
按指定名称访问子部件节点。 更多... | |
template<class _tWidget , VisualEvent _vID> | |
using | GWidgetHandlerAdaptor = GHandlerAdaptor< _tWidget, typename EventTypeMapping< _vID >::HandlerType::BaseType > |
_tWidget & | wgt |
_tWidget _fCallable && | f |
template<VisualEvent _vID, class _tWidget , typename _fCallable > | |
GWidgetHandlerAdaptor < _tWidget, _vID > | MakeWidgetHandlerAdaptor (_tWidget &wgt, _fCallable &&f) |
template<VisualEvent _vID, class _tTarget , class _tWidget , typename _fCallable > | |
EventT (typename EventTypeMapping< _vID >::HandlerType)&AddWidgetHandlerAdaptor(_tTarget &&target | |
pt pt Y const IWidget &wgt const IWidget &wgt | GetSizeOf |
无效化:使相对于部件的子部件的指定区域在直接和间接的窗口缓冲区中无效。 更多... | |
YF_API void | InvalidateVisible (IWidget &, const Rect &) |
无效化:使相对于可见的部件的指定区域在直接和间接的窗口缓冲区中无效。 更多... | |
PDefH (void, InvalidateVisible, IWidget &wgt) ImplExpr(InvalidateVisible(wgt | |
无效化:使可见的部件区域在直接和间接的窗口缓冲区中无效。 更多... | |
using YSLib::UI::Form = typedef Window |
using YSLib::UI::GBrushUpdater = typedef std::function<void(const PaintContext&, _type, const Point&, const Point&)> |
using YSLib::UI::GWidgetCreator = typedef unique_ptr<IWidget>(*)(_tParams...) |
using YSLib::UI::GWidgetHandlerAdaptor = typedef GHandlerAdaptor<_tWidget, typename EventTypeMapping<_vID>::HandlerType::BaseType> |
using YSLib::UI::GWidgetInserter = typedef void(*)(IWidget&, _tParams...) |
using YSLib::UI::HBrush = typedef std::function<void(PaintEventArgs&&)> |
using YSLib::UI::IndexEventArgs = typedef GValueEventArgs<MTextList::IndexType> |
using YSLib::UI::ViewArgs = typedef GValueEventArgs<bool> |
using YSLib::UI::ViewerType = typedef GSequenceViewer<ListType> |
视图类型。
在文件 textlist.h 第 61 行定义.
using YSLib::UI::VisualEventMap = typedef EventMapping::MapType |
using YSLib::UI::WheelDelta = typedef ptrdiff_t |
using YSLib::UI::WidgetIterator = typedef ystdex::any_input_iterator<IWidget> |
using YSLib::UI::WidgetRange = typedef pair<WidgetIterator, WidgetIterator> |
using YSLib::UI::ZOrderType = typedef u8 |
|
strong |
|
strong |
|
strong |
|
strong |
IWidget& YSLib::UI::AccessWidget | ( | const ValueNode & | node | ) |
在文件 Loader.cpp 第 66 行定义.
参考 YAssertNonnull.
IWidget& YSLib::UI::AccessWidget | ( | const ValueNode & | node, |
const string & | name, | ||
_tParams &&... | args | ||
) |
_tWidget& YSLib::UI::AccessWidget | ( | const ValueNode & | node, |
_tParams &&... | args | ||
) |
void YSLib::UI::Activate | ( | Console & | , |
Drawing::Color | , | ||
Drawing::Color | |||
) |
|
inline |
|
inline |
|
inline |
向部件容器添加子部件。
参考自 YSLib::UI::DialogPanel::DialogPanel(), main() , 以及 YReader::ShlTextReader::SettingSession::SettingSession().
|
inline |
|
private |
调整列表视图底项目的竖直偏移量为零。
top_offset == 0
。 GetItemHeight()
) )。 参数为 true
时,调整列表视图底项目(可能不完全)超出下边界以上的竖直 偏移量为零;否则,调整列表视图首项目(可能不完全)超出上边界以上的竖直偏移量为零。
在文件 textlist.cpp 第 186 行定义.
参考 AdjustViewLength(), top_offset , 以及 viewer.
参考自 SelectFirst() , 以及 SelectLast().
void YSLib::UI::AdjustViewForContent | ( | ) |
按内容大小依次调整视图中选中和首个项目的索引,然后按需调整竖直偏移量。
void YSLib::UI::AdjustViewLength | ( | ) |
调整视图长度。
参考自 AdjustOffset() , 以及 DrawItems().
void YSLib::UI::Animate | ( | _fCallable | f, |
Messaging::Priority | prior = UI::AnimationPriority |
||
) |
void YSLib::UI::AnimateConnection | ( | const shared_ptr< _fCallable > & | conn, |
Messaging::Priority | prior = UI::AnimationPriority |
||
) |
按指定的连接对象更新动画任务。
在文件 Animation.h 第 62 行定义.
参考 AnimateTask() , 以及 YAssertNonnull.
参考自 Animate().
void YSLib::UI::AnimateTask | ( | _fCallable | update, |
Messaging::Priority | prior = UI::AnimationPriority |
||
) |
按更新条件和优先级通过消息队列部署动画任务。
在文件 Animation.h 第 53 行定义.
参考自 AnimateConnection().
yconstexpr Messaging::Priority YSLib::UI::AnimationPriority | ( | 0x20 | ) |
默认背景动画任务消息优先级。
yconstexpr EventPriority YSLib::UI::BackgroundPriority | ( | 0xC0 | ) |
用户界面绘制优先级。
参考自 YSLib::UI::DialogBox::DialogBox(), YSLib::UI::DialogPanel::DialogPanel() , 以及 YSLib::UI::Widget::InitializeEvents().
yconstexpr EventPriority YSLib::UI::BoundaryPriority | ( | 0x60 | ) |
|
inline |
调用部件事件,并忽略 BadEvent 异常。
在文件 ycontrol.h 第 144 行定义.
|
private |
|
inline |
|
virtual |
检查列表中的指定项是否有效。
参考自 YSLib::UI::Menu::CheckConfirmed() , 以及 InvokeConfirmed().
TextList::ListType::size_type TextList::CheckPoint | ( | SPos | x, |
SPos | y | ||
) |
检查点(相对于所在缓冲区的控件坐标)是否在选择范围内,
在文件 textlist.cpp 第 254 行定义.
参考 YSLib::Drawing::Rect::Contains(), GetSizeOf, top_offset , 以及 viewer.
参考自 CheckPoint().
ListType::size_type YSLib::UI::CheckPoint | ( | const Point & | pt | ) |
检查点(相对于所在缓冲区的控件坐标)是否在选择范围内,
在文件 textlist.h 第 223 行定义.
参考 CheckPoint(), YSLib::Drawing::GBinaryGroup< _type >::X , 以及 YSLib::Drawing::GBinaryGroup< _type >::Y.
void YSLib::UI::ClearFocusingOf | ( | IWidget & | wgt | ) |
清除焦点指针并以此部件作为事件源调用被清除焦点部件的 LostFocus 事件。
在文件 yfocus.cpp 第 112 行定义.
参考 FetchFocusingPtr.
参考自 YSLib::UI::Panel::ClearContents(), Close() , 以及 OnTouchDown_RequestToFrontFocused().
void YSLib::UI::Close | ( | IWidget & | wgt | ) |
在文件 ywidget.cpp 第 95 行定义.
参考 ClearFocusingOf() , 以及 Hide().
参考自 DecorateAsCloseButton(), YSLib::UI::DialogPanel::DialogPanel() , 以及 YReader::ShlTextReader::OnClick().
bool YSLib::UI::Contains | ( | const IWidget & | wgt, |
SPos | x, | ||
SPos | y | ||
) |
在文件 ywidget.cpp 第 40 行定义.
参考 GetBoundsOf.
bool YSLib::UI::ContainsVisible | ( | const IWidget & | wgt, |
SPos | x, | ||
SPos | y | ||
) |
|
static |
void YSLib::UI::Deactivate | ( | Console & | ) |
YSLib::UI::DeclDelegate | ( | HScrollEvent | , |
ScrollEventArgs | |||
) |
轨道。
轨道区域。
< 值类型。
滑块:轨道区域上的滚动框。
< 最小滑块长度。
< 大距离滚动偏移量:滚动事件关联的滑块位置变化绝对值。
< 滑块拖动事件。
< 滚动事件。
构造:使用指定边界和大小。
< 滑块拖动事件。
< 滚动事件。
< 取轨道方向。
< 取可滚动区域长度。
< 取轨道方向上的滑块长度。
< 取滑块位置。
< 取轨道方向上的轨道长度。
设置轨道方向上的滑块长度。
设置滑块位置。
设置滚动事件关联值最大取值。
设置滚动事件关联值。
设置大距离滚动偏移量。
检查轨道方向指定位置所在的区域。
定位滑块。
ScrollCategory::ThumbPosition
值参数为设置指定值; 当滚动类别为 ScrollCategory::SmallDecrement
或 ScrollCategory::SmallIncrement
时参数为值变化的绝对值; 其它情况无效。参考 DeclEvent(), DeclIEntry, DefDeMoveCtor(), DefEventGetter, DefGetter, DefPred, DefWidgetMemberIteration, GetLocationOf, GetSizeOf, YSLib::Drawing::Horizontal, platform::KeyCategory::None, SPos, ThumbPosition , 以及 YSLib::Drawing::Vertical.
YSLib::UI::DeclDelegate | ( | HUIEvent | , |
UIEventArgs && | |||
) |
InputEventArgs&& YSLib::UI::DeclDelegate | ( | HKeyEvent | , |
KeyEventArgs && | |||
) |
InputEventArgs CursorEventArgs&& YSLib::UI::DeclDelegate | ( | HPaintEvent | , |
PaintEventArgs && | |||
) |
指针设备滚轮事件。
InputEventArgs CursorEventArgs CursorWheelEventArgs&& YSLib::UI::DeclDelegate | ( | HTextInputEvent | , |
TextInputEventArgs && | |||
) |
YSLib::UI::DeclEvent | ( | HViewEvent | , |
ViewChanged | |||
) |
视图变更事件。
当视图长度或位置发生改变时触发的事件。
项目选择状态变更事件。
当项目被选中或取消选中时触发的事件。
参考自 DeclDelegate().
Selected YSLib::UI::DeclEvent | ( | HIndexEvent | , |
Confirmed | |||
) | const |
项目选中确认事件。
当前选中项目被确定时触发的事件。
构造:使用指定边界、文本列表和高亮背景色/文本色对。
|
related |
在文件 button.cpp 第 127 行定义.
参考 Close(), YSLib::Drawing::DrawCross(), FetchGUIState(), YSLib::UI::Widget::ForeColor, IsEnabled(), YSLib::UI::Styles::Workspace , 以及 yunseq.
参考自 YSLib::UI::DialogBox::DialogBox() , 以及 YSLib::UI::DialogPanel::DialogPanel().
const ZOrderType YSLib::UI::DefaultMenuZOrder | ( | 224 | ) |
默认菜单 Z 顺序值。
const ZOrderType YSLib::UI::DefaultWindowZOrder | ( | 128 | ) |
const ZOrderType YSLib::UI::DefaultZOrder | ( | 64 | ) |
YSLib::UI::DefGetterMem | ( | const ynothrow | , |
ListType::size_type | , | ||
SelectedIndex | , | ||
viewer | |||
) | const |
取完整视图高。
size_t YSLib::UI::DoEvent | ( | AController & | controller, |
const VisualEvent & | id, | ||
typename EventArgsHead< typename _tEventHandler::TupleType >::type && | e | ||
) |
bool YSLib::UI::DoReleaseFocus | ( | IWidget & | wgt | ) |
释放焦点,并指定 LostFocus 事件发送控件。
在文件 yfocus.cpp 第 82 行定义.
参考自 DoRequestFocus() , 以及 ReleaseFocusFrom().
bool YSLib::UI::DoRequestFocus | ( | IWidget & | wgt, |
bool | release_event = {} |
||
) |
向部件容器请求获得焦点,并指定 GotFocus 事件发送控件。
release_event | 是否在需要释放已有焦点时触发事件。 |
在文件 yfocus.cpp 第 46 行定义.
参考 DoReleaseFocus(), FetchFocusingPtr, IsFocused(), ReleaseFocusFrom(), wgt , 以及 YAssert.
参考自 RequestFocusFrom().
|
protectedvirtual |
|
protectedvirtual |
描画列表项背景。
r | 列表项有效区域边界。 |
在文件 textlist.cpp 第 314 行定义.
参考 YSLib::Drawing::Size::Height, YSLib::Drawing::Size::Width, YSLib::Drawing::GBinaryGroup< _type >::X , 以及 YSLib::Drawing::GBinaryGroup< _type >::Y.
参考自 DrawItems().
|
protectedvirtual |
绘制列表。
在文件 textlist.cpp 第 322 行定义.
参考 AdjustViewLength(), DrawItem(), DrawItemBackground(), YSLib::Drawing::g, YSLib::Drawing::Size::Height, YSLib::Drawing::r, top_offset, viewer, YSLib::Drawing::GBinaryGroup< _type >::Y , 以及 yunseq.
void YSLib::UI::DrawTrackBackground | ( | PaintEventArgs && | e, |
ATrack & | trk | ||
) |
绘制指定色调的基本按钮背景。
在文件 scroll.cpp 第 243 行定义.
参考 CHRLib::c, YSLib::Drawing::DrawHLineSeg(), YSLib::Drawing::DrawVLineSeg(), FetchGUIState(), YSLib::Drawing::FillRect(), YSLib::Drawing::g, GetSizeOf, YSLib::Drawing::Size::Height, YSLib::UI::Styles::Light, YSLib::Drawing::r, YSLib::RestrictInInterval(), YSLib::UI::Styles::Track, YSLib::Drawing::Size::Width, YSLib::Drawing::GBinaryGroup< _type >::X , 以及 YSLib::Drawing::GBinaryGroup< _type >::Y.
bool YSLib::UI::Enable | ( | IWidget & | wgt, |
bool | b = true |
||
) |
设置部件可用性,且当可用性改变时无效化部件区域。
在文件 ycontrol.cpp 第 90 行定义.
参考 Invalidate(), IsEnabled() , 以及 SetEnabledOf().
参考自 YReader::ShlTextReader::UpdateButtons().
YSLib::UI::EventT | ( | typename EventTypeMapping< _vID >::HandlerType | ) |
GUIState & YSLib::UI::FetchGUIState | ( | ) |
取默认图形用户界面公共状态。
参考自 DecorateAsCloseButton(), YSLib::UI::TabBar::DefaultPaintTabBorder(), YSLib::UI::DialogPanel::DialogPanel(), YSLib::UI::Menu::DrawItem(), DrawTrackBackground(), YSLib::UI::Styles::FetchDefault(), FetchVisualStyleNames(), YSLib::Shells::GUIShell::GUIShell(), YSLib::UI::HorizontalTrack::HorizontalTrack(), YSLib::UI::Styles::InitExStyles(), main(), YSLib::UI::Menu::Menu(), YReader::ShlTextReader::OnKeyDown(), OnKeyHeld(), OnTouchHeld(), YSLib::UI::Styles::Painter::operator()(), YSLib::UI::ProgressBar::ProgressBar(), YSLib::UI::CheckBox::Refresh(), YSLib::UI::RadioBox::Refresh(), YSLib::UI::VerticalTrack::VerticalTrack() , 以及 YSLib::UI::BorderResizer::Wrap().
IWidget & YSLib::UI::FetchTopLevel | ( | IWidget & | wgt | ) |
IWidget & YSLib::UI::FetchTopLevel | ( | IWidget & | wgt, |
Point & | pt | ||
) |
取指定部件的顶层部件,当返回非第一参数时变换坐标。
在文件 yuicont.cpp 第 49 行定义.
参考 GetLocationOf.
shared_ptr< TextList::ListType > YSLib::UI::FetchVisualStyleNames | ( | String | default_name = u"<Default>" | ) |
取视觉样式名称。
在文件 ShellHelper.cpp 第 159 行定义.
参考 FetchGUIState(), ystdex::get_key , 以及 YAssert.
yconstexpr EventPriority YSLib::UI::ForegroundPriority | ( | 0x40 | ) |
YSLib::UI::FwdDeclI | ( | IWidget | ) |
EventMapping::ItemType& YSLib::UI::GetEvent | ( | EventMapping::MapType & | m, |
const VisualEvent & | id, | ||
EventMapping::MappedType(&)() | f | ||
) |
YF_API EventMapping::ItemType& YSLib::UI::GetEvent | ( | EventMapping::MapType & | , |
const VisualEvent & | , | ||
EventMapping:: | MappedType&)( | ||
) |
在事件映射表中取指定 id 对应的事件。
YSLib::UI::GetSizeOf | ( | wgt | ) |
无效化:使相对于部件及子部件的指定区域在直接和间接的窗口缓冲区中无效。
无效化可见的部件区域对应位置的父容器区域。
无效化部件区域对应位置的父容器区域。
无效化:使相对于部件的子部件的指定区域在直接和间接的窗口缓冲区中无效。
SDst TextList::GetViewPosition | ( | ) | const |
void YSLib::UI::Hide | ( | IWidget & | wgt | ) |
隐藏部件。
在文件 ywidget.cpp 第 103 行定义.
参考 Invalidate().
参考自 YReader::ShlTextReader::BaseSession::BaseSession() , 以及 Close().
const IWidget& wgt YSLib::UI::ImplRet | ( | wgt. | GetView).IsVisible( | ) | const |
判断点是否在部件的可视区域内。
pt pt Y const IWidget& wgt const IWidget& wgt const IWidget& wgt YSLib::UI::ImplRet | ( | wgt. | GetView).GetSize( | ) |
取部件边界。
pt pt Y const IWidget& wgt const IWidget& wgt const IWidget& wgt const IWidget& wgt YSLib::UI::ImplRet | ( | {GetLocationOf(wgt), GetSizeOf(wgt)} | ) |
设置部件边界。
|
static |
注册部件加载器:添加部件引用。
参考 AddWidget(), args , 以及 yforward.
参考自 YSLib::UI::GWidgetInserterRegister< IWidget & >::GetRegister().
void YSLib::UI::Invalidate | ( | IWidget & | wgt, |
const Rect & | bounds | ||
) |
无效化:使相对于部件的指定区域在直接和间接的窗口缓冲区中无效。
在文件 ywidget.cpp 第 111 行定义.
参考 GetLocationOf , 以及 YSLib::Drawing::r.
参考自 YSLib::UI::TabControl::Attach(), YSLib::UI::DialogBox::DialogBox(), YSLib::UI::DialogPanel::DialogPanel(), Enable(), Hide(), YSLib::UI::MenuHost::HideRaw(), YSLib::UI::HorizontalTrack::HorizontalTrack(), YSLib::UI::HoverUpdater::HoverUpdater(), YSLib::DS::UI::DualScreenReader::Invalidate(), InvalidateAll(), InvalidateParent(), InvalidateSelected(), YSLib::UI::Panel::MoveToFront(), OnUIEvent_Invalidate(), YSLib::UI::ProgressBar::ProgressBar(), YSLib::UI::ColorBox::SetColor(), YSLib::UI::RadioBox::SetSelected(), YSLib::DS::UI::DualScreenReader::SetVisible(), Show(), SwitchVisible(), YSLib::UI::TextBox::TextBox(), YSLib::UI::Thumb::Thumb(), YReader::ReaderBox::UpdateData(), YReader::TextInfoBox::UpdateData(), YSLib::UI::TabControl::UpdateTabPages(), YSLib::UI::HexViewArea::UpdateView(), UpdateView(), YSLib::UI::BufferedRenderer::Validate() , 以及 YSLib::UI::VerticalTrack::VerticalTrack().
void YSLib::UI::InvalidateAll | ( | IWidget & | wgt, |
const Rect & | bounds | ||
) |
void YSLib::UI::InvalidateChildren | ( | IWidget & | wgt, |
const Rect & | bounds | ||
) |
在文件 ywidget.cpp 第 131 行定义.
参考 GetLocationOf , 以及 YSLib::Drawing::r.
参考自 InvalidateAll().
void YSLib::UI::InvalidateParent | ( | IWidget & | wgt | ) |
在文件 ywidget.cpp 第 144 行定义.
参考 GetBoundsOf , 以及 Invalidate().
参考自 YSLib::UI::BorderResizer::Wrap().
|
protected |
无效化偏移量对应的列表项区域。
offset | 起始偏移量。 |
diff | 终止偏移量相对于起始偏移量的距离偏移量。 |
在文件 textlist.cpp 第 261 行定义.
参考 YSLib::Drawing::Size::Height, Invalidate(), YSLib::Drawing::r, YSLib::RestrictUnsignedStrict(), top_offset , 以及 YSLib::Drawing::GBinaryGroup< _type >::Y.
|
protected |
无效化偏移量对应的列表项区域。
在文件 textlist.cpp 第 279 行定义.
参考 InvalidateSelected() , 以及 ystdex::swap().
void YSLib::UI::InvalidateVisible | ( | IWidget & | wgt, |
const Rect & | bounds | ||
) |
无效化:使相对于可见的部件的指定区域在直接和间接的窗口缓冲区中无效。
在文件 ywidget.cpp 第 151 行定义.
参考 GetLocationOf, IsVisible , 以及 YSLib::Drawing::r.
参考自 YSLib::UI::InvalidationUpdater::DefaultInvalidate(), YSLib::UI::InvalidationUpdater::DefaultInvalidateControl(), YSLib::UI::TextBox::InvalidateDefaultCaret() , 以及 InvalidateVisibleParent().
void YSLib::UI::InvalidateVisibleParent | ( | IWidget & | wgt | ) |
|
private |
|
inline |
判断部件是否为可用的控件。
在文件 ycontrol.h 第 86 行定义.
参考自 YSLib::UI::Caret::Check(), YSLib::UI::CheckBox::CheckBox(), DecorateAsCloseButton(), YSLib::UI::InvalidationUpdater::DefaultInvalidateControl(), YSLib::UI::DialogPanel::DialogPanel(), Enable(), YSLib::UI::Styles::InitExStyles(), YSLib::UI::RadioBox::RadioBox(), YSLib::UI::GUIState::ResponseCursor(), YSLib::UI::GUIState::ResponseKey() , 以及 YSLib::UI::TabBar::SwitchPage().
bool YSLib::UI::IsFocused | ( | const IWidget & | wgt | ) |
判断部件是否取得焦点。
在文件 yfocus.cpp 第 38 行定义.
参考 FetchFocusingPtr.
参考自 YSLib::UI::TabBar::DefaultPaintTabBorder(), DoRequestFocus(), YSLib::UI::GUIState::HandleCascade() , 以及 YSLib::UI::Styles::InitExStyles().
|
inline |
bool YSLib::UI::IsFocusedCascade | ( | const IWidget & | wgt, |
const IWidget * | p_top = {} |
||
) |
判断部件相对于指针指定的部件是否具有级联焦点。
在文件 yfocus.cpp 第 122 行定义.
参考 FetchFocusingPtr.
参考自 YSLib::UI::Caret::Check().
|
inline |
取相对部件 wgt 的点 pt 相对于 wgt 的容器的偏移坐标。
参考 GetLocationOf.
参考自 LocateForParentContainer().
Point YSLib::UI::LocateForParentContainer | ( | const IWidget & | wgt | ) |
取指定部件相对于容器的父容器的偏移坐标。
在文件 yuicont.cpp 第 104 行定义.
参考 GetLocationOf , 以及 LocateContainerOffset().
Point YSLib::UI::LocateForWidget | ( | const IWidget & | a, |
const IWidget & | b | ||
) |
取第二参数指定的部件相对于第一参数指定的部件的偏移坐标。
在文件 yuicont.cpp 第 74 行定义.
参考 ystdex::get_key , 以及 GetLocationOf.
Point YSLib::UI::LocateForWidgetNode | ( | IWidget & | wgt, |
_fFetcher | fetch_ptr | ||
) |
取指定部件相对于视图树中的直接节点指针的偏移坐标。
_Node | 节点类型。 |
_fFetcher | 节点访问器类型。 |
参考 YSLib::Drawing::GBinaryGroup< SPos >::Invalid, LocateOffset() , 以及 YB_LIKELY.
void YSLib::UI::LocateMenu | ( | Menu & | dst, |
const Menu & | src, | ||
Menu::IndexType | idx | ||
) |
定位菜单:以第二个参数作为参考父菜单,按指定参考偏移索引定位菜单。
参考 SetLocationOf().
参考自 YSLib::UI::Menu::ShowSub().
Point YSLib::UI::LocateOffset | ( | const IWidget * | p_end, |
Point | pt, | ||
const IWidget * | p_wgt | ||
) |
取相对于第三参数指向的部件的点相对于第一参数指向的容器的偏移坐标。
在文件 yuicont.cpp 第 63 行定义.
参考 GetLocationOf.
void YSLib::UI::LocateViewPosition | ( | SDst | ) |
定位视图顶端至指定竖直位置。
GWidgetHandlerAdaptor<_tWidget, _vID> YSLib::UI::MakeWidgetHandlerAdaptor | ( | _tWidget & | wgt, |
_fCallable && | f | ||
) |
void YSLib::UI::MoveToBottom | ( | IWidget & | wgt | ) |
移动部件 wgt 至容器下端。
在文件 yuicont.cpp 第 135 行定义.
参考 GetLocationOf, GetSizeOf, SetLocationOf(), YSLib::Drawing::X , 以及 YAssertNonnull.
参考自 YSLib::UI::AScrollBar::AScrollBar(), YSLib::UI::ScrollableContainer::FixLayout() , 以及 YSLib::UI::ScrollableContainer::ScrollableContainer().
void YSLib::UI::MoveToLeft | ( | IWidget & | wgt | ) |
移动部件 wgt 至容器左端。
在文件 yuicont.cpp 第 113 行定义.
参考 GetLocationOf, SetLocationOf(), YSLib::Drawing::Y , 以及 YAssertNonnull.
void YSLib::UI::MoveToRight | ( | IWidget & | wgt | ) |
移动部件 wgt 至容器右端。
在文件 yuicont.cpp 第 120 行定义.
参考 GetLocationOf, GetSizeOf, SetLocationOf(), YSLib::Drawing::Width, YSLib::Drawing::Y , 以及 YAssertNonnull.
参考自 YSLib::UI::AScrollBar::AScrollBar(), YSLib::UI::ScrollableContainer::FixLayout() , 以及 YSLib::UI::ScrollableContainer::ScrollableContainer().
void YSLib::UI::MoveToTop | ( | IWidget & | wgt | ) |
移动部件 wgt 至容器上端。
在文件 yuicont.cpp 第 128 行定义.
参考 GetLocationOf, SetLocationOf(), YSLib::Drawing::X , 以及 YAssertNonnull.
EventMapping::MappedType YSLib::UI::NewEvent | ( | ) |
|
inline |
处理事件:直接转发至发送者。
_vID | 指定转发的目标事件。 |
_tEventArgs | 事件参数类型。 |
在文件 ycontrol.h 第 173 行定义.
|
inline |
在文件 ycontrol.h 第 184 行定义.
void YSLib::UI::OnKey_Bound_Click | ( | KeyEventArgs && | e | ) |
void YSLib::UI::OnKey_Bound_TouchDown | ( | KeyEventArgs && | e | ) |
处理按键事件:按键-指针设备接触开始。
绑定触发 TouchDown 事件。
在文件 ycontrol.cpp 第 171 行定义.
参考 YSLib::Drawing::GBinaryGroup< SPos >::Invalid.
参考自 YSLib::UI::AScrollBar::AScrollBar().
void YSLib::UI::OnKey_Bound_TouchUp | ( | KeyEventArgs && | e | ) |
处理按键事件:按键-指针设备接触结束。
绑定触发 TouchUp 事件。
在文件 ycontrol.cpp 第 159 行定义.
参考 YSLib::Drawing::GBinaryGroup< SPos >::Invalid.
参考自 YSLib::UI::AScrollBar::AScrollBar().
void YSLib::UI::OnKeyHeld | ( | KeyEventArgs && | e | ) |
处理键接触保持事件。
在文件 ycontrol.cpp 第 108 行定义.
参考 FetchGUIState().
参考自 YSLib::UI::AScrollBar::AScrollBar().
void YSLib::UI::OnTouchDown_RequestToFrontFocused | ( | CursorEventArgs && | e | ) |
处理屏幕接触开始事件:使用一般接触策略。
屏幕接触时依次进行以下判断: 当事件路由策略非 RoutedEventArgs::Bubble 时请求置于顶端; 当事件路由策略为 RoutedEventArgs::Direct 时清除自身包含的焦点; 当事件路由策略非 RoutedEventArgs::Tunnel 时请求置于顶端。
在文件 ycontrol.cpp 第 118 行定义.
参考 YSLib::UI::RoutedEventArgs::Bubble, ClearFocusingOf(), YSLib::UI::RoutedEventArgs::Direct, RequestToFront(), YSLib::UI::RoutedEventArgs::Tunnel , 以及 wgt.
void YSLib::UI::OnTouchHeld | ( | CursorEventArgs && | e | ) |
处理屏幕接触保持事件。
在文件 ycontrol.cpp 第 131 行定义.
参考 YSLib::UI::RoutedEventArgs::Direct , 以及 FetchGUIState().
参考自 YSLib::UI::AScrollBar::AScrollBar().
void YSLib::UI::OnTouchHeld_Dragging | ( | CursorEventArgs && | e | ) |
void YSLib::UI::OnTouchHeld_DraggingRaw | ( | CursorEventArgs && | e, |
IWidget & | wgt | ||
) |
void YSLib::UI::OnUIEvent_Invalidate | ( | UIEventArgs && | e | ) |
void YSLib::UI::PaintChild | ( | IWidget & | wgt, |
PaintEventArgs && | e | ||
) |
调用指定子部件的 Paint 事件绘制参数指定的事件发送者。
以 e.Sender() 作为绘制目标,判断其边界是否和区域 e.ClipArea 相交, 若相交区域非空则调用 wgt 的渲染器的 Paint 方法绘制 。 调用中, e.Location 被修改为相对子部件的坐标, e.ClipArea 被覆盖为相交区域。 之后, e 可继续被 e.GetSender() 的渲染器的 Paint 方法修改。
在文件 ywidget.cpp 第 174 行定义.
参考 YSLib::Drawing::Clip(), GetLocationOf , 以及 GetSizeOf.
参考自 YSLib::UI::ChildPainter::operator()(), PaintChild() , 以及 PaintVisibleChild().
Rect YSLib::UI::PaintChild | ( | IWidget & | wgt, |
const PaintContext & | pc | ||
) |
调用指定子部件的 Paint 事件绘制指定子部件。
以 wgt 作为绘制目标,判断其边界是否和区域 pc.ClipArea 相交, 若相交区域非空则调用 wgt 的渲染器的 Paint 方法绘制 。
在文件 ywidget.cpp 第 183 行定义.
参考 PaintChild().
void YSLib::UI::PaintVisibleChild | ( | IWidget & | wgt, |
PaintEventArgs & | e | ||
) |
调用 PaintChild 指定子部件并合并参数的重绘区域。
在文件 ywidget.cpp 第 192 行定义.
参考 IsVisible , 以及 PaintChild().
参考自 YSLib::UI::MUIContainer::PaintVisibleChildren() , 以及 YSLib::UI::Widget::Refresh().
Rect YSLib::UI::ParseRect | ( | const string & | str | ) |
在文件 Loader.cpp 第 43 行定义.
参考 platform::Descriptions::Informative, ystdex::to_string() , 以及 YTraceDe.
参考自 YSLib::UI::WidgetLoader::DetectWidgetNode().
|
inline |
激活:使用指定屏幕、有效性、前景色和默认背景色。
yconstfn YSLib::UI::PDefH | ( | const ValueNode & | , |
AccessWidgetNode | , | ||
const ValueNode & | nd | ||
) | const |
按指定名称访问子部件节点。
WidgetNotFound | 没有找到指定名称的部件。 |
|
inline |
判断点是否在部件的可视区域内。
|
inline |
判断点是否在可见部件的可视区域内。
Selected const shared_ptr<ListType> const pair<Color, Color> viewer YSLib::UI::PDefH | ( | bool | , |
Contains | , | ||
ListType::size_type | i | ||
) |
|
inline |
设置部件的容器指针。
|
inline |
设置部件可见性。
关闭部件。
隐藏部件后取消容器(若存在)焦点状态。
YSLib::UI::PDefH | ( | void | , |
ClearSelected | |||
) |
|
inline |
无效化:使部件区域在直接和间接的窗口缓冲区中无效。
|
inline |
无效化:使部件及子部件区域在直接和间接的窗口缓冲区中无效。
无效化:使部件的子部件区域在直接和间接的窗口缓冲区中无效。
|
inline |
无效化:使可见的部件区域在直接和间接的窗口缓冲区中无效。
|
override |
刷新:按指定参数绘制界面并更新状态。
void YSLib::UI::ReleaseFocusCascade | ( | IWidget & | wgt | ) |
级联释放部件及上层容器焦点。
在文件 yfocus.cpp 第 149 行定义.
void YSLib::UI::ReleaseFocusFrom | ( | IWidget & | dst, |
IWidget & | src | ||
) |
释放焦点,并指定 LostFocus 事件发送控件。
dst | 事件目标。 |
src | 事件源。 |
在文件 yfocus.cpp 第 105 行定义.
参考 DoReleaseFocus().
参考自 DoRequestFocus().
bool YSLib::UI::RemoveFrom | ( | IWidget & | wgt, |
IWidget & | con | ||
) |
从容器中移除部件。
在文件 yuicont.cpp 第 144 行定义.
参考 FetchFocusingPtr.
参考自 YSLib::UI::Panel::operator-=() , 以及 YSLib::UI::TabBar::operator-=().
|
inline |
从部件容器移除子部件。
参考自 YReader::ShlTextReader::SettingSession::~SettingSession().
bool YSLib::UI::RepeatHeld | ( | InputTimer & | tmr, |
InputTimer::HeldStateType & | st, | ||
const Timers::Duration & | initial_delay, | ||
const Timers::Duration & | repeated_delay | ||
) |
向指定计时器传递参数,根据状态重复按键。
参考 YSLib::UI::InputTimer::Free , 以及 YSLib::UI::InputTimer::RefreshHeld().
参考自 YReader::ShlTextReader::OnKeyDown().
void YSLib::UI::RequestFocusCascade | ( | IWidget & | wgt | ) |
级联请求部件及上层容器焦点。
在文件 yfocus.cpp 第 138 行定义.
void YSLib::UI::RequestFocusFrom | ( | IWidget & | dst, |
IWidget & | src | ||
) |
向部件容器请求获得焦点,并指定 GotFocus 事件发送控件。
dst | 事件目标。 |
src | 事件源。 |
在文件 yfocus.cpp 第 98 行定义.
参考 DoRequestFocus().
void YSLib::UI::RequestToFront | ( | IWidget & | wgt | ) |
请求提升至容器前端。
在文件 ywidget.cpp 第 199 行定义.
参考自 OnTouchDown_RequestToFrontFocused() , 以及 SwitchVisibleToFront().
void YSLib::UI::ResetView | ( | ) |
复位视图。
|
related |
|
inline |
void TextList::SelectFirst | ( | ) |
选择第一个项目。
在文件 textlist.cpp 第 395 行定义.
参考 AdjustOffset(), YSLib::UI::GSequenceViewer< _tCon >::SetSelectedIndex() , 以及 viewer.
void TextList::SelectLast | ( | ) |
选择最后一个项目。
在文件 textlist.cpp 第 402 行定义.
参考 AdjustOffset(), YSLib::UI::GSequenceViewer< _tCon >::SetSelectedIndex() , 以及 viewer.
void YSLib::UI::SetBoundsOf | ( | IWidget & | wgt, |
const Rect & | r | ||
) |
在文件 ywidget.cpp 第 53 行定义.
参考 SetLocationOf() , 以及 SetSizeOf().
参考自 YSLib::UI::TabBar::PerformLayout(), YSLib::UI::TabControl::SwitchPage(), YSLib::UI::TabControl::UpdateTabPages() , 以及 YSLib::UI::BorderResizer::Wrap().
|
inline |
|
inline |
void YSLib::UI::SetInvalidationOf | ( | IWidget & | wgt | ) |
在文件 ywidget.cpp 第 60 行定义.
参考 GetSizeOf.
参考自 YSLib::UI::Panel::ClearContents() , 以及 main().
void YSLib::UI::SetInvalidationToParent | ( | IWidget & | wgt | ) |
void YSLib::UI::SetList | ( | const shared_ptr< ListType > & | ) |
设置文本列表。
void YSLib::UI::SetLocationOf | ( | IWidget & | wgt, |
const Point & | pt | ||
) |
设置部件左上角所在位置(相对于容器的偏移坐标)。
在文件 ywidget.cpp 第 73 行定义.
参考 GetLocationOf , 以及 wgt.
参考自 YSLib::UI::HorizontalTrack::HorizontalTrack(), LocateMenu(), MoveToBottom(), MoveToLeft(), MoveToRight(), MoveToTop(), SetBoundsOf(), YReader::ShlTextReader::ShowMenu() , 以及 YSLib::UI::VerticalTrack::VerticalTrack().
void YSLib::UI::SetSelected | ( | ListType::size_type | ) |
void YSLib::UI::SetSelected | ( | SPos | , |
SPos | |||
) |
按接触点设置选中项目。
void YSLib::UI::SetSelected | ( | const Point & | pt | ) |
void YSLib::UI::SetSizeOf | ( | IWidget & | wgt, |
const Size & | s | ||
) |
设置部件大小。
在文件 ywidget.cpp 第 83 行定义.
参考自 YSLib::UI::AScrollBar::AScrollBar(), YSLib::UI::ScrollableContainer::FixLayout(), YSLib::UI::ListBox::ListBox(), ResizeForContent(), SetBoundsOf() , 以及 YSLib::DS::UI::DualScreenReader::Stretch().
void YSLib::UI::Setup | ( | _tAnimation & | ani, |
IWidget & | wgt, | ||
_fCallable | f | ||
) |
void YSLib::UI::Setup | ( | _tAnimation & | ani, |
IWidget & | wgt, | ||
_fCond | cond, | ||
_fCallable | f | ||
) |
void YSLib::UI::SetupByTimer | ( | _tAnimation & | ani, |
IWidget & | wgt, | ||
_tTimer && | timer, | ||
_fCallable | f | ||
) |
void YSLib::UI::Show | ( | IWidget & | wgt | ) |
显示部件。
依次设置部件可见性、请求部件焦点和无效化。
在文件 ywidget.cpp 第 206 行定义.
参考 Invalidate().
参考自 YReader::ShlTextReader::BookmarkSession::BookmarkSession(), YReader::ShlTextReader::Execute(), YReader::ShlTextReader::OnClick(), YReader::ShlTextReader::SettingSession::SettingSession() , 以及 YReader::ShlTextReader::BaseSession::~BaseSession().
void YSLib::UI::SwitchVisible | ( | IWidget & | wgt | ) |
void YSLib::UI::SwitchVisibleToFront | ( | IWidget & | wgt | ) |
切换部件显示状态并请求提升至前端。
在文件 ShellHelper.cpp 第 151 行定义.
参考 IsVisible , 以及 RequestToFront().
void YSLib::UI::UpdatePixels | ( | _fPixelShader | shader, |
const PaintContext & | pc, | ||
const Drawing::Image & | img, | ||
const Point & | dst_offset, | ||
const Point & | src_offset | ||
) |
更新:逐像素操作。
参考 YSLib::Drawing::g , 以及 YSLib::Drawing::r.
参考自 YSLib::UI::ImageBrush::UpdateComposite().
|
related |
在文件 textlist.cpp 第 431 行定义.
参考 Invalidate().
参考自 YSLib::UI::FileBox::FileBox(), YSLib::UI::HexViewArea::LocateViewPosition() , 以及 YSLib::UI::HexViewArea::Reset().
参考自 AccessWidget(), ystdex::assign(), ytest::timing::average(), YSLib::CacheLookup(), ystdex::call_once(), ystdex::call_once_init< _type, _tOnceFlag >::call_once_init(), YSLib::CollectNodes(), CreateUniqueWidget(), YSLib::GMRUCache< YSLib::Drawing::Typeface::BitmapKey, YSLib::Drawing::Typeface::SmallBitmapData, YSLib::Drawing::Typeface::BitmapKeyHash >::emplace(), ystdex::forward_as_array(), ystdex::variadic_param< _vN >::get(), ystdex::get_init(), YSLib::GHEvent< _tRet(_tParams...)>::GHEvent(), ystdex::call_once_init< _type, _tOnceFlag >::init(), InsertWidget(), platform::LogWithSource(), ystdex::make_array(), YSLib::ValueNode::MakeNode(), ystdex::nifty_counter< _type >::nifty_counter(), ytest::timing::once(), ytest::timing::once_c(), ystdex::container_inserter< _tCon >::operator()(), ystdex::expanded_caller< _fHandler, _fCallable >::operator()(), YSLib::GDependencyEvent< _tEvent, _tOwnerPointer >::operator()(), YSLib::GHandlerAdaptor< _type, _fCallable >::operator()(), YSLib::PackNodes(), YSLib::Drawing::PutText(), YSLib::UI::GAnimationSession< YSLib::UI::InvalidationUpdater >::Reset(), ystdex::seq_apply(), ystdex::seq_insert(), ystdex::sfmt(), YSLib::TextFile::SkipChar(), YSLib::StringifyToNode(), YSLib::UI::Styles::StyleMap::StyleMap(), ytest::timing::total(), ytest::timing::total_c(), ystdex::unseq_apply(), ystdex::varg() , 以及 ystdex::vsfmt().
YSLib::UI::ClearSelected |
在文件 textlist.h 第 229 行定义.
bool YSLib::UI::CyclicTraverse |
_tWidget _fCallable&& YSLib::UI::f |
参考自 ystdex::call_once(), CHRLib::ConvertCharacter(), YSLib::Application::DefGetter(), ystdex::get_init(), GetEvent(), YSLib::Drawing::FontCache::GetTypefacePtr(), ystdex::make_expanded(), ystdex::transformed_iterator< _tIterator, _fTransformer >::make_transform(), MakeWidgetHandlerAdaptor(), ystdex::next_if(), ytest::timing::once(), ytest::timing::once_c(), YSLib::File::operator<<(), YSLib::File::operator>>(), YSLib::Drawing::PlotLineSeg(), YSLib::PostTask(), ystdex::prev_if(), Restart(), YSLib::Drawing::ScrDraw(), ystdex::seq_apply(), Setup(), SetupByTimer(), ytest::timing::total(), ytest::timing::total_c() , 以及 ystdex::unseq_apply().
YSLib::UI::fc |
pt pt Y YSLib::UI::FetchFocusingPtr |
pt pt Y const IWidget& wgt YSLib::UI::GetLocationOf |
参考自 YSLib::UI::GUIState::CheckDraggingOffset(), DeclDelegate(), FetchTopLevel(), YSLib::UI::HorizontalTrack::HorizontalTrack(), Invalidate(), InvalidateChildren(), InvalidateVisible(), LocateContainerOffset(), LocateForParentContainer(), LocateForWidget(), LocateOffset(), MoveToBottom(), MoveToLeft(), MoveToRight(), MoveToTop(), PaintChild(), YSLib::UI::TabBar::Refresh(), YSLib::UI::GUIState::ResponseCursor(), SetLocationOf(), YSLib::UI::BufferedRenderer::Validate() , 以及 YSLib::UI::VerticalTrack::VerticalTrack().
YSLib::UI::GetSizeOf |
无效化:使相对于部件的子部件的指定区域在直接和间接的窗口缓冲区中无效。
无效化可见的部件区域对应位置的父容器区域。
无效化部件区域对应位置的父容器区域。
参考自 YSLib::UI::AScrollBar::AScrollBar(), YSLib::UI::CheckBox::CheckBox(), CheckPoint(), DeclDelegate(), YSLib::UI::TabBar::DefaultPaintTabBorder(), DrawTrackBackground(), YSLib::UI::ScrollableContainer::FixLayout(), YSLib::UI::Styles::InitExStyles(), YSLib::UI::TextBox::InvalidateDefaultCaret(), MoveToBottom(), MoveToRight(), PaintChild(), YSLib::UI::TextBox::PaintDefaultCaret(), YSLib::UI::TabBar::PerformLayout(), YSLib::UI::RadioBox::RadioBox(), YSLib::UI::ProgressBar::Refresh(), YSLib::UI::TabBar::Refresh(), YReader::TextInfoBox::Refresh(), YSLib::UI::TextBox::Refresh(), YSLib::UI::CheckButton::Refresh(), YSLib::UI::RadioButton::Refresh(), SetInvalidationOf() , 以及 SetSizeOf().
bool YSLib::UI::View::IsVisible |
参考自 ContainsVisible(), YSLib::UI::MenuHost::HideRaw(), InvalidateVisible(), InvalidateVisibleParent(), YReader::ShlTextReader::OnClick(), PaintVisibleChild(), YSLib::UI::TabBar::Refresh(), YSLib::UI::GUIState::ResponseCursor(), YSLib::UI::GUIState::ResponseKey(), YSLib::UI::ScrollableContainer::ScrollableContainer(), SwitchVisible() , 以及 SwitchVisibleToFront().
在文件 textlist.h 第 122 行定义.
参考自 CallSelected().
const IWidget &wgt YSLib::UI::SPos |
SDst YSLib::UI::top_offset |
列表视图首项目超出上边界的竖直偏移量。
在文件 textlist.h 第 87 行定义.
参考自 AdjustOffset(), CheckPoint(), DrawItems(), GetViewPosition() , 以及 InvalidateSelected().
ViewerType YSLib::UI::viewer |
列表视图。
在文件 textlist.h 第 86 行定义.
参考自 AdjustOffset(), CallSelected(), CheckPoint(), DrawItems(), GetViewPosition(), SelectFirst() , 以及 SelectLast().
_tWidget& YSLib::UI::wgt |
参考自 AddWidget(), YSLib::UI::Caret::Caret(), YSLib::UI::MLinearUIContainer::Contains(), YSLib::UI::MUIContainer::Contains(), DoRequestFocus(), YSLib::UI::TabControl::Find(), YSLib::UI::GUIState::HandleCascade(), YSLib::UI::HoverUpdater::HoverUpdater(), IsFocusedByShell(), MakeWidgetHandlerAdaptor(), YSLib::UI::Panel::MoveToFront(), OnTouchDown_RequestToFrontFocused(), YSLib::UI::Renderer::Paint(), YSLib::UI::MUIContainer::PaintVisibleChildren(), YSLib::UI::TabBar::PerformLayout(), YSLib::UI::TabBar::Refresh(), SetLocationOf(), SetSizeOf(), YSLib::UI::WidgetLoader::TransformUILayout(), YReader::ReaderBox::UpdateData(), YReader::TextInfoBox::UpdateData(), YSLib::UI::BufferedRenderer::Validate(), YSLib::UI::GUIState::Wrap() , 以及 YSLib::DS::ShlDS::WrapForSwapScreens().
pt YSLib::UI::X |