Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::ContentSharer Class Reference

Content opener for files and text. More...

#include <file_browser.hpp>

Static Public Member Functions

static void share_file (const std::filesystem::path &file, void *parent_window=nullptr)
 Open a file with the platform's default opener when supported.
static void share_text (const std::string &text, void *parent_window=nullptr)
 Open text through a temporary file on supported platforms.

Detailed Description

Content opener for files and text.

Current backends launch the platform's default opener where available: macOS uses /usr/bin/open, Windows uses ShellExecuteW, and Linux uses xdg-open. Text opening is implemented on macOS by writing a temporary file and opening it. Android paths and unsupported text paths are currently no-ops.

Member Function Documentation

◆ share_file()

void pulp::view::ContentSharer::share_file ( const std::filesystem::path & file,
void * parent_window = nullptr )
static

Open a file with the platform's default opener when supported.

◆ share_text()

void pulp::view::ContentSharer::share_text ( const std::string & text,
void * parent_window = nullptr )
static

Open text through a temporary file on supported platforms.


The documentation for this class was generated from the following file: