Molybden API
|
A profile service that provides functionality for configuring spell checking. More...
#include <spellchecker.hpp>
Public Member Functions | |
virtual std::shared_ptr< Profile > | profile ()=0 |
The profile associated with this spell checker. | |
virtual bool | isEnabled ()=0 |
Indicates whether spell checking is enabled or not. | |
virtual void | enable ()=0 |
Enables spell checking on the web pages loaded in the browser instances of the profile. | |
virtual void | disable ()=0 |
Disables spell checking on the web pages loaded in the browser instances of the profile. | |
virtual std::vector< Language > | languages ()=0 |
A list of the languages used for spell checking. | |
virtual bool | addLanguage (const Language &language)=0 |
Adds the language to the list of the languages for which spell checking is performed. | |
virtual void | removeLanguage (const Language &language)=0 |
Removes the language from the list of the languages for which spell checking is performed. | |
virtual std::shared_ptr< Dictionary > | customDictionary ()=0 |
Returns the custom dictionary. | |
A profile service that provides functionality for configuring spell checking.
|
pure virtual |
Adds the language to the list of the languages for which spell checking is performed.
On Windows and Linux, this method loads the dictionary for the given language and blocks the current thread execution until the dictionary is loaded from the user data directory. If the dictionary does not exist in the user data directory, the engine will download it from the remote server. Returns true
if the language was added successfully.
On macOS, this method does nothing and always returns false
.
|
pure virtual |
Indicates whether spell checking is enabled or not.
By default, it is enabled.
|
pure virtual |
A list of the languages used for spell checking.
On Linux and Windows, the dictionaries for spell checking are downloaded programmatically and stored in the user data directory.
On macOS, returns the languages for spell checking configured in the system settings.
|
pure virtual |
Removes the language from the list of the languages for which spell checking is performed.
If all languages are removed, Chromium performs no spell checking. To enable spell checking, add a language using the method.
On macOS, this method does nothing because spellcheck languages are configured in the OS settings.