29 #include YFM_YSLib_UI_YDesktop
30 #include YFM_YSLib_UI_YBrush
36 using namespace Drawing;
48 return ystdex::polymorphic_downcast<BufferedRenderer&>(
wgt.GetRenderer());
55 unique_ptr<BufferedRenderer> p)
56 :
Window(
Rect(s.GetSize()), p ? std::move(p) : std::move(
61 GetBufferedRendererOf(*this).IgnoreBackground =
true;
68 screen.
Update(GetBufferedRendererOf(*this).GetContext().GetBufferPtr());
74 auto& rd(GetBufferedRendererOf(*
this));
76 return rd.Validate(*
this, *
this,
Rect Validate()
验证:绘制缓冲区使之有效。
Devices::Screen & screen
屏幕对象。
GBinaryGroup< SPos > Point
屏幕二维点(直角坐标表示)。
pt pt Y const IWidget &wgt const IWidget &wgt const IWidget &wgt GetBoundsOf
#define ynothrow
YSLib 无异常抛出保证:若支持 noexcept 关键字, 指定特定的 noexcept 异常规范。
std::function< void(PaintEventArgs &&)> HBrush
画刷回调函数。
Desktop(Devices::Screen &, Color=Drawing::ColorSpace::Black, const shared_ptr< Drawing::Image > &={}, unique_ptr< BufferedRenderer >={})
构造:使用指定屏幕对象引用、渲染器指针和背景。
virtual void Update(Drawing::BitmapPtr) ynothrow
更新。
enable_if_t<!is_array< _type >::value, std::unique_ptr< _type > > make_unique(_tParams &&...args)
使用 new 和指定参数构造指定类型的 std::unique_ptr 实例。