| Version: 3.3.1

Private Member Functions | Static Private Member Functions | List of all members
wxTextProofOptions Class Reference

`#include <wx/textctrl.h>`

## Detailed Description

This class provides a convenient means of passing multiple parameters to wxTextCtrl::EnableProofCheck().

By default, i.e. when calling EnableProofCheck() without any parameters, Default() proof options are used, which enable spelling (but not grammar) checks for the current language.

However it is also possible to customize the options:

textctrl->EnableProofCheck(wxTextProofOptions::Default().Language("fr").GrammarCheck());
wxTextProofOptions::GrammarCheck
wxTextProofOptions & GrammarCheck(bool enable=true)
Enable / disable grammar checking for this control.
wxTextProofOptions::Default
static wxTextProofOptions Default()
Create an object corresponding to the default checks.
wxTextProofOptions::Language
wxTextProofOptions & Language(const wxString &lang)
Sets the language for the spell checker (and grammar checker on macOS) from a canonical name (e....

or disable the all checks entirely:

textctrl->EnableProofCheck(wxTextProofOptions::Disable());
wxTextProofOptions::Disable
static wxTextProofOptions Disable()
Create an object disabling all checks.

Note that this class has no public constructor, except for the copy constructor, so its objects can only be created using the static factory methods Default() or Disable().

See also
  wxTextCtrl::EnableProofCheck(), wxTextCtrl::GetProofCheckOptions().

Since
  3.1.6

## Private Member Functions
wxTextProofOptions & | SpellCheck (bool enable=true)
| Enable / disable spell checking for this control. More...
wxTextProofOptions & | GrammarCheck (bool enable=true)
| Enable / disable grammar checking for this control. More...
wxTextProofOptions & | Language (const wxString &lang)
| Sets the language for the spell checker (and grammar checker on macOS) from a canonical name (e.g., "fr" or "en"). More...
bool | IsSpellCheckEnabled () const
| Return true if spell checking is enabled. More...
bool | IsGrammarCheckEnabled () const
| Return true if grammar checking is enabled. More...
bool | AnyChecksEnabled () const
| Returns true if any checks are enabled. More...

## Static Private Member Functions
static wxTextProofOptions | Default ()
| Create an object corresponding to the default checks. More...
static wxTextProofOptions | Disable ()
| Create an object disabling all checks. More...

## Member Function Documentation

## ◆ AnyChecksEnabled()

bool wxTextProofOptions::AnyChecksEnabled | ( |  | ) | const
| private

Returns true if any checks are enabled.

## ◆ Default()

static wxTextProofOptions wxTextProofOptions::Default | ( |  | ) |
| static private

Create an object corresponding to the default checks.

The returned object enables spelling checks and disables grammar checks.

## ◆ Disable()

static wxTextProofOptions wxTextProofOptions::Disable | ( |  | ) |
| static private

Create an object disabling all checks.

The returned object can be passed to wxTextCtrl::EnableProofCheck() to disable all checks in the text control.

## ◆ GrammarCheck()

wxTextProofOptions& wxTextProofOptions::GrammarCheck | ( | bool | enable = `true` | ) |
| private

Enable / disable grammar checking for this control.

This option is currently only supported under macOS and is ignored under the other platforms.

## ◆ IsGrammarCheckEnabled()

bool wxTextProofOptions::IsGrammarCheckEnabled | ( |  | ) | const
| private

Return true if grammar checking is enabled.

## ◆ IsSpellCheckEnabled()

bool wxTextProofOptions::IsSpellCheckEnabled | ( |  | ) | const
| private

Return true if spell checking is enabled.

## ◆ Language()

wxTextProofOptions& wxTextProofOptions::Language | ( | const wxString & | lang | ) |
| private

Sets the language for the spell checker (and grammar checker on macOS) from a canonical name (e.g., "fr" or "en").

## ◆ SpellCheck()

wxTextProofOptions& wxTextProofOptions::SpellCheck | ( | bool | enable = `true` | ) |
| private

Enable / disable spell checking for this control.