29 #include YFM_Helper_HostedUI
30 #include YFM_Helper_HostRenderer
31 #include YFM_YSLib_UI_YControl // for UI::FetchEvent;
32 #include YFM_YSLib_UI_YGUI // for FetchGUIState;
37 using namespace Drawing;
45 WaitForHostWindow(UI::IWidget&
wgt)
47 auto& renderer(dynamic_cast<HostRenderer&>(wgt.GetRenderer()));
51 p_wnd = renderer.GetWindowPtr();
58 DragWindow(
Window& wnd, UI::CursorEventArgs&& e)
64 if(st.CheckDraggingOffset())
66 const auto offset(st.CursorLocation + st.DraggingOffset);
68 wnd.Move(wnd.GetLocation() + offset);
78 ShowTopLevel(UI::Widget& wgt, ::DWORD wstyle, ::DWORD wstyle_ex,
82 title, wstyle, wstyle_ex);
83 WaitForHostWindow(wgt);
89 ShowTopLevelDraggable(UI::Widget& wgt)
92 ShowTopLevel(wgt, WS_POPUP);
94 # error "Unsupported platform found."
96 UI::FetchEvent<UI::TouchHeld>(
wgt) += std::bind(Host::DragWindow,
97 std::ref(WaitForHostWindow(wgt)), std::placeholders::_1);
pt pt Y const IWidget &wgt const IWidget &wgt GetSizeOf
无效化:使相对于部件的子部件的指定区域在直接和间接的窗口缓冲区中无效。
pt pt Y const IWidget &wgt GetLocationOf
yconstexpr wchar_t WindowClassName[]
YF_API GUIState & FetchGUIState()
取默认图形用户界面公共状态。
YF_API NativeWindowHandle CreateNativeWindow(const wchar_t *, const YSLib::Drawing::Size &, const wchar_t *=L"",::DWORD=WS_POPUP,::DWORD=WS_EX_LTRREADING)
按指定窗口类名、客户区大小、标题文本、样式和附加样式创建本机顶层窗口。