29 #include YFM_YSLib_UI_YDesktop
31 using namespace ystdex;
44 while(
const auto p = FetchContainerPtr(*p_wgt))
53 while(
const auto p = FetchContainerPtr(*p_wgt))
65 while(p_wgt && p_wgt != p_end)
68 p_wgt = FetchContainerPtr(*p_wgt);
76 list<pair<const IWidget*, Point>> lst;
79 const IWidget* pCon(&a);
83 lst.push_back(make_pair(pCon, pt));
85 pCon = FetchContainerPtr(*pCon);
92 auto i(std::find(lst.begin() |
get_key, lst.end() |
get_key, pCon));
95 return pt - i.get()->second;
98 pCon = FetchContainerPtr(*pCon);
100 return Point::Invalid;
106 return FetchContainerPtr(wgt)
146 if(FetchContainerPtr(wgt) == &con)
148 SetContainerPtrOf(wgt);
150 con.GetView().FocusingPtr = {};
158 MLinearUIContainer::operator+=(IWidget&
wgt)
161 vWidgets.push_back(&wgt);
165 MLinearUIContainer::operator-=(IWidget& wgt)
167 auto t(vWidgets.size());
170 t -= vWidgets.size();
171 YAssert(t <= 1,
"Duplicate widget pointer found.");
179 std::find(vWidgets.cbegin(), vWidgets.cend(), &
wgt) != vWidgets.end();
183 MLinearUIContainer::Find(IWidget& wgt)
const
186 std::find(vWidgets.cbegin(), vWidgets.cend(), &
wgt)- vWidgets.cbegin();
190 MLinearUIContainer::begin()
195 MLinearUIContainer::iterator
196 MLinearUIContainer::end()
203 MUIContainer::operator-=(IWidget& wgt)
205 auto t(mWidgets.size());
209 t -= mWidgets.size();
210 YAssert(t <= 1,
"Duplicate widget pointer found.");
218 mWidgets.insert(make_pair(z,
ItemType(&wgt)));
225 &
wgt) != mWidgets.end();
232 [&](IWidget*
const& p_wgt){
242 MUIContainer::QueryZ(IWidget& wgt)
const
244 for(
auto& pr : mWidgets)
247 throw std::out_of_range(
"Widget not found.");
251 MUIContainer::begin()
Point LocateContainerOffset(const IWidget &wgt, const Point &pt)
取相对部件 wgt 的点 pt 相对于 wgt 的容器的偏移坐标。
pt pt Y const IWidget &wgt const IWidget &wgt GetSizeOf
无效化:使相对于部件的子部件的指定区域在直接和间接的窗口缓冲区中无效。
pt pt Y const IWidget &wgt GetLocationOf
YF_API Point LocateOffset(const IWidget *, Point, const IWidget *)
取相对于第三参数指向的部件的点相对于第一参数指向的容器的偏移坐标。
YF_API void SetLocationOf(IWidget &, const Point &)
设置部件左上角所在位置(相对于容器的偏移坐标)。
GIHEvent< UIEventArgs && > ItemType
const struct ystdex::indirect_tag get_indirect
YF_API void MoveToBottom(IWidget &wgt)
移动部件 wgt 至容器下端。
YF_API bool RemoveFrom(IWidget &, IWidget &)
从容器中移除部件。
YF_API void MoveToRight(IWidget &wgt)
移动部件 wgt 至容器右端。
YF_API void PaintVisibleChild(IWidget &, PaintEventArgs &)
调用 PaintChild 指定子部件并合并参数的重绘区域。
const second_tag get_value
GBinaryGroup< SPos > Point
屏幕二维点(直角坐标表示)。
YF_API void MoveToTop(IWidget &wgt)
移动部件 wgt 至容器上端。
YF_API IWidget & FetchTopLevel(IWidget &)
取指定部件的顶层部件。
#define YAssertNonnull(_expr)
YF_API Point LocateForParentContainer(const IWidget &)
取指定部件相对于容器的父容器的偏移坐标。
YF_API Point LocateForWidget(const IWidget &, const IWidget &)
取第二参数指定的部件相对于第一参数指定的部件的偏移坐标。
Selected const shared_ptr< ListType > const pair< Color, Color > viewer Contains
if(YB_UNLIKELY(r >=sGraphics.Height)) throw std return pBuffer r *sGraphics Width
YF_API void MoveToLeft(IWidget &wgt)
移动部件 wgt 至容器左端。
#define YAssert(_expr, _msg)
void erase_all(_tRange &c, const typename _tRange::value_type &val)
删除指定序列范围中和指定值的相等的元素。