mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
apply spelling corrections from the context menu.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1274 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -14,6 +14,12 @@
|
||||
|
||||
DECLARE_POINTER_TYPE(SpellChecker);
|
||||
|
||||
#ifdef UNICODE
|
||||
typedef wxCharBuffer CharBuffer;
|
||||
#else
|
||||
typedef char* CharBuffer;
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------- : Spell checker
|
||||
|
||||
/// A spelling checker for a particular language
|
||||
@@ -33,9 +39,13 @@ class SpellChecker : public Hunspell, public IntrusivePtrBase<SpellChecker> {
|
||||
/// Check the spelling of a single word, ignore punctuation
|
||||
bool spell_with_punctuation(const String& word);
|
||||
|
||||
/// Give spelling suggestions
|
||||
void suggest(const String& word, vector<String>& suggestions_out);
|
||||
|
||||
private:
|
||||
/// Convert between String and dictionary encoding
|
||||
wxCSConv encoding;
|
||||
bool convert_encoding(const String& word, CharBuffer& out);
|
||||
|
||||
SpellChecker(const char* aff_path, const char* dic_path);
|
||||
static map<String,SpellCheckerP> spellers; //< Cached checkers for each language
|
||||
|
||||
Reference in New Issue
Block a user