29 #include YFM_YSLib_UI_YDesktop
30 #include YFM_YSLib_UI_YBrush
31 #include YFM_YSLib_UI_YGUI
68 if(
const auto p_con = FetchContainerPtr(wgt))
69 p_con->GetRenderer().CommitInvalidation(
GetBoundsOf(wgt));
77 wgt.GetView().SetLocation(pt);
87 wgt.GetRenderer().SetSize(s);
88 wgt.GetView().SetSize(s);
98 if(
const auto pCon = FetchContainerPtr(wgt))
105 SetVisibleOf(wgt,
false);
118 r = p_wgt->GetRenderer().CommitInvalidation(r);
120 }
while((p_wgt = FetchContainerPtr(*p_wgt)));
133 Rect r(wgt.GetRenderer().CommitInvalidation(bounds));
135 for(
auto pr(wgt.GetChildren()); pr.first != pr.second; ++pr.first)
137 auto& child(*pr.first);
146 if(
const auto p_con = FetchContainerPtr(wgt))
158 r = p_wgt->GetRenderer().CommitInvalidation(r);
160 if(!(p_wgt = FetchContainerPtr(*p_wgt)))
169 if(
const auto p_con = FetchContainerPtr(wgt))
176 auto& sender(e.GetSender());
180 wgt.GetRenderer().Paint(sender, std::move(e));
201 if(
const auto p_pnl = dynamic_cast<Panel*>(FetchContainerPtr(wgt)))
202 p_pnl->MoveToFront(wgt);
208 SetVisibleOf(wgt,
true);
230 Background(wgt.Background), ForeColor(wgt.ForeColor)
245 Widget::MakeBlankBrush()
251 Widget::SetRenderer(unique_ptr<Renderer> p)
266 if(!e.ClipArea.IsUnstrictlyEmpty())
267 for(
auto pr(GetChildren()); pr.first != pr.second; ++pr.first)
void InitializeEvents()
初始化事件组。
void InvalidateParent(IWidget &wgt)
bool Clip(Rect &x, const Rect &y)
剪切操作:取标准矩形交集并判断是否严格非空。
pt pt Y const IWidget &wgt const IWidget &wgt GetSizeOf
无效化:使相对于部件的子部件的指定区域在直接和间接的窗口缓冲区中无效。
pt pt Y const IWidget &wgt GetLocationOf
YF_API void SetLocationOf(IWidget &, const Point &)
设置部件左上角所在位置(相对于容器的偏移坐标)。
YF_API GUIState & FetchGUIState()
取默认图形用户界面公共状态。
void SetBoundsOf(IWidget &wgt, const Rect &r)
auto ClonePolymorphic(const _type &p) -> decltype(&*p)
使用 clone 成员函数复制指定指针指向的多态类类型对象。
YF_API void Invalidate(IWidget &, const Rect &)
无效化:使相对于部件的指定区域在直接和间接的窗口缓冲区中无效。
void InvalidateAll(IWidget &wgt, const Rect &bounds)
AController *controller_ptr Renderer *renderer_ptr View View
YF_API void PaintChild(IWidget &wgt, PaintEventArgs &&e)
调用指定子部件的 Paint 事件绘制参数指定的事件发送者。
unique_ptr< View > view_ptr
部件视图指针。
void SetInvalidationOf(IWidget &wgt)
YF_API void SetSizeOf(IWidget &, const Size &)
设置部件大小。
void InvalidateVisibleParent(IWidget &wgt)
YF_API void Hide(IWidget &)
隐藏部件。
YF_API void Show(IWidget &)
显示部件。
YF_API void PaintVisibleChild(IWidget &, PaintEventArgs &)
调用 PaintChild 指定子部件并合并参数的重绘区域。
YF_API void InvalidateVisible(IWidget &, const Rect &)
无效化:使相对于可见的部件的指定区域在直接和间接的窗口缓冲区中无效。
pt pt Y bool YF_API ContainsVisible(const IWidget &wgt, SPos x, SPos y)
判断点是否在可见部件的可视区域内。
pt pt Y const IWidget &wgt const IWidget &wgt const IWidget &wgt GetBoundsOf
std::function< void(PaintEventArgs &&)> HBrush
画刷回调函数。
wgt wgt YF_API void ClearFocusingOf(IWidget &)
清除焦点指针并以此部件作为事件源调用被清除焦点部件的 LostFocus 事件。
void CleanupReferences(IWidget &)
清除状态对指定部件的引用。
Selected const shared_ptr< ListType > const pair< Color, Color > viewer Contains
YF_API void SetInvalidationToParent(IWidget &)
在容器设置部件的无效区域。
YF_API void RequestToFront(IWidget &)
请求提升至容器前端。
void SetView(unique_ptr< View > &&)
设置渲染器为指定指针指向的对象,同时更新渲染器状态。
void InvalidateChildren(IWidget &wgt, const Rect &bounds)
virtual void Refresh(PaintEventArgs &&)
刷新:按指定参数绘制界面并更新状态。
enable_if_t<!is_array< _type >::value, std::unique_ptr< _type > > make_unique(_tParams &&...args)
使用 new 和指定参数构造指定类型的 std::unique_ptr 实例。
unique_ptr< Renderer > renderer_ptr
渲染器指针。
yconstexpr EventPriority BackgroundPriority(0xC0)
用户界面绘制优先级。