MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Samples / MoveComponent

Method MoveComponent

SampleApps/WebView2APISample/AppWindow.cpp:2808–2820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2806}
2807
2808template <class ComponentType> std::unique_ptr<ComponentType> AppWindow::MoveComponent()
2809{
2810 for (auto iter = m_components.begin(); iter != m_components.end(); iter++)
2811 {
2812 if (dynamic_cast<ComponentType*>(iter->get()))
2813 {
2814 auto wanted = reinterpret_cast<std::unique_ptr<ComponentType>&&>(std::move(*iter));
2815 m_components.erase(iter);
2816 return std::move(wanted);
2817 }
2818 }
2819 return nullptr;
2820}
2821
2822void AppWindow::SetDocumentTitle(PCWSTR titleText)
2823{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected