Molybden API
Loading...
Searching...
No Matches
molybden::Desktop Class Referenceabstract

Provides access to the desktop environment. More...

#include <desktop.hpp>

Public Member Functions

virtual std::shared_ptr< Appapp ()=0
 Returns the application instance.
 
virtual void openUrl (const std::string &url)=0
 Opens the given URL in the associated application.
 
virtual void openPath (const std::string &path)=0
 Opens the given path in the associated application.
 
virtual void showPath (const std::string &path)=0
 Shows the given path in the file manager of the current platform.
 

Detailed Description

Provides access to the desktop environment.

Member Function Documentation

◆ openPath()

virtual void molybden::Desktop::openPath ( const std::string &  path)
pure virtual

Opens the given path in the associated application.

If the associated application is not launched yet, it will be launched. If the given path is a directory, the file manager of the current platform is launched to open it.

Parameters
paththe absolute or relative path to a file or directory to open.

◆ openUrl()

virtual void molybden::Desktop::openUrl ( const std::string &  url)
pure virtual

Opens the given URL in the associated application.

If the given URL is a website, the default web browser will be launched to open it.

If the given URL is a mailto URL, the default mail client will be launched to compose a new message.

Parameters
urlthe URL (website or mailto) to open.

◆ showPath()

virtual void molybden::Desktop::showPath ( const std::string &  path)
pure virtual

Shows the given path in the file manager of the current platform.

If the given path is a file/directory the file manager will open its containing directory and try selecting the file/directory.

If you need to show content of a directory, use openPath(path) with the directory path.

Parameters
paththe absolute or relative path to a file or directory to show.

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