Centralize retained panel popup attachment
This commit is contained in:
@@ -32,6 +32,23 @@ pp::foundation::Status attach_legacy_overlay_node(
|
||||
return pp::foundation::Status::success();
|
||||
}
|
||||
|
||||
pp::foundation::Status attach_legacy_overlay_node_to_root(
|
||||
Node& anchor,
|
||||
const std::shared_ptr<Node>& node) noexcept
|
||||
{
|
||||
if (!node) {
|
||||
return pp::foundation::Status::invalid_argument("legacy overlay node is null");
|
||||
}
|
||||
|
||||
auto* root = anchor.root();
|
||||
if (!root) {
|
||||
return pp::foundation::Status::invalid_argument("legacy overlay root is missing");
|
||||
}
|
||||
|
||||
root->add_child(node);
|
||||
return pp::foundation::Status::success();
|
||||
}
|
||||
|
||||
pp::foundation::Result<std::shared_ptr<NodePopupMenu>> add_legacy_popup_menu(
|
||||
App& app,
|
||||
const char* template_id,
|
||||
|
||||
Reference in New Issue
Block a user