/// helper method to set a window handle into a SystemParentData struct void VCLXWindow::SetSystemParent_Impl(const css::uno::Any& rHandle)
{ // does only work for WorkWindows
VclPtr<vcl::Window> pWindow = GetWindow(); if (pWindow->GetType() != WindowType::WORKWINDOW)
{ throw css::uno::RuntimeException(u"not a work window"_ustr);
}
// use sal_Int64 here to accommodate all int types // uno::Any shift operator will upcast if necessary
sal_Int64 nHandle = 0; bool bXEmbed = false; bool bThrow = false; if (!(rHandle >>= nHandle))
{
css::uno::Sequence<css::beans::NamedValue> aProps; if (rHandle >>= aProps)
{ for (const css::beans::NamedValue& rProp : aProps)
{ if (rProp.Name == "WINDOW")
rProp.Value >>= nHandle; elseif (rProp.Name == "XEMBED")
rProp.Value >>= bXEmbed;
}
} else
bThrow = true;
} if (bThrow)
{ throw css::uno::RuntimeException(u"incorrect window handle type"_ustr);
} // create system parent data
SystemParentData aSysParentData;
aSysParentData.nSize = sizeof(SystemParentData); #ifdefined(_WIN32)
aSysParentData.hWnd = reinterpret_cast<HWND>(nHandle); #elifdefined(MACOSX)
aSysParentData.pView = reinterpret_cast<NSView*>(nHandle); #elifdefined(ANDROID) // Nothing #elifdefined(IOS) // Nothing #elifdefined(UNX)
aSysParentData.aWindow = nHandle;
aSysParentData.bXEmbedSupport = bXEmbed; #endif
// set system parent static_cast<WorkWindow*>(pWindow.get())->SetPluginParent(&aSysParentData);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.