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

A profile service that provides functionality for configuring spell checking. More...

#include <spellchecker.hpp>

Public Member Functions

virtual std::shared_ptr< Profileprofile ()=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< Languagelanguages ()=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< DictionarycustomDictionary ()=0
 Returns the custom dictionary.
 

Detailed Description

A profile service that provides functionality for configuring spell checking.

Member Function Documentation

◆ addLanguage()

virtual bool molybden::SpellChecker::addLanguage ( const Language language)
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.

◆ isEnabled()

virtual bool molybden::SpellChecker::isEnabled ( )
pure virtual

Indicates whether spell checking is enabled or not.

By default, it is enabled.

◆ languages()

virtual std::vector< Language > molybden::SpellChecker::languages ( )
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.

◆ removeLanguage()

virtual void molybden::SpellChecker::removeLanguage ( const Language language)
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.


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