Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
ExternalUrlLauncher.h File Reference

Typed external destinations opened by the editor through platform APIs. More...

#include <string_view>
Include dependency graph for ExternalUrlLauncher.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Enumerations

enum class  donner::editor::ExternalUrlTarget { DonnerRepository }
 External destinations the editor is allowed to open.

Functions

std::string_view donner::editor::ExternalUrlValue (ExternalUrlTarget target)
 Resolve an allowlisted external destination to its HTTPS URL.
bool donner::editor::LaunchExternalUrl (ExternalUrlTarget target)
 Open an allowlisted destination with the platform URL handler.

Detailed Description

Typed external destinations opened by the editor through platform APIs.

Function Documentation

◆ ExternalUrlValue()

std::string_view donner::editor::ExternalUrlValue ( ExternalUrlTarget target)
nodiscard

Resolve an allowlisted external destination to its HTTPS URL.

Parameters
targetDestination to resolve.
Returns
Stable process-lifetime URL string.

◆ LaunchExternalUrl()

bool donner::editor::LaunchExternalUrl ( ExternalUrlTarget target)
nodiscard

Open an allowlisted destination with the platform URL handler.

Parameters
targetDestination to open.
Returns
True when the platform accepted the launch request.