Provides access to Molybden app.
More...
#include <app.hpp>
|
virtual const AppOptions & | options ()=0 |
| Returns the app options.
|
|
virtual bool | isProduction ()=0 |
| Indicates whether the app is running in the production or development mode.
|
|
virtual std::string | baseUrl ()=0 |
| Returns the base URL of the resource that represents app user interface.
|
|
virtual void | quit ()=0 |
| Terminates this app instance.
|
|
virtual std::shared_ptr< Profile > | profile ()=0 |
| Returns the default app profile.
|
|
virtual std::shared_ptr< Profile > | profile (const std::string &name)=0 |
| Returns the profile with the given name if it exists.
|
|
virtual std::vector< std::shared_ptr< Profile > > | profiles ()=0 |
| Returns the list of the profiles in this app including the default profile.
|
|
virtual void | deleteProfile (std::shared_ptr< Profile > profile)=0 |
| Deletes the given profile from the list of available profiles, closes all browsers associated with it, releases all allocated resources and files in the user data directory.
|
|
virtual void | setMainMenu (std::shared_ptr< Menu > menu)=0 |
| Sets the given menu as the application menu on macOS.
|
|
virtual void | setTheme (AppTheme theme)=0 |
| Sets the given theme to the app.
|
|
virtual AppTheme | theme ()=0 |
| Returns the application theme.
|
|
|
static void | init (const std::function< void(std::shared_ptr< App > app)> &callback) |
| Initializes this application and creates an application instance.
|
|
static void | init (const AppOptions &options, const std::function< void(std::shared_ptr< App > app)> &callback) |
| Initializes this application and creates an application instance with the given options.
|
|
Provides access to Molybden app.
◆ deleteProfile()
virtual void molybden::App::deleteProfile |
( |
std::shared_ptr< Profile > |
profile | ) |
|
|
pure virtual |
Deletes the given profile from the list of available profiles, closes all browsers associated with it, releases all allocated resources and files in the user data directory.
When the profile is deleted, the cache files and preferences of the associated browsers are lost.
Does nothing if the given profile is already deleted or it is the default profile. The default profile cannot be deleted.
- Parameters
-
profile | profile to delete. |
◆ profile() [1/2]
virtual std::shared_ptr< Profile > molybden::App::profile |
( |
| ) |
|
|
pure virtual |
Returns the default app profile.
The type of the default profile is configured via the AppOptions::enable_incognito
property. If it is true, then the default profile will be an incognito profile, otherwise a regular profile.
◆ profile() [2/2]
virtual std::shared_ptr< Profile > molybden::App::profile |
( |
const std::string & |
name | ) |
|
|
pure virtual |
Returns the profile with the given name if it exists.
- Parameters
-
◆ quit()
virtual void molybden::App::quit |
( |
| ) |
|
|
pure virtual |
Terminates this app instance.
Closes all browser instances and releases the allocated resources.
◆ setTheme()
virtual void molybden::App::setTheme |
( |
AppTheme |
theme | ) |
|
|
pure virtual |
Sets the given theme to the app.
On macOS, the dark mode theme was introduced in 10.14 Mojave, so setting dark mode in 10.13 and lower changes only the web theme, the UI theme stays always light.
◆ theme()
virtual AppTheme molybden::App::theme |
( |
| ) |
|
|
pure virtual |
Returns the application theme.
By default, the app theme is set to AppTheme::kSystem
.
The documentation for this class was generated from the following file: