61
61
String userDescription;
64
enum TextCheckingType {
65
TextCheckingTypeSpelling = 1 << 1,
66
TextCheckingTypeGrammar = 1 << 2,
67
TextCheckingTypeLink = 1 << 5,
68
TextCheckingTypeQuote = 1 << 6,
69
TextCheckingTypeDash = 1 << 7,
70
TextCheckingTypeReplacement = 1 << 8,
71
TextCheckingTypeCorrection = 1 << 9
74
struct TextCheckingResult {
75
TextCheckingType type;
78
Vector<GrammarDetail> details;
64
82
class EditorClient {
66
84
virtual ~EditorClient() { }
147
#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
148
virtual void uppercaseWord() = 0;
149
virtual void lowercaseWord() = 0;
150
virtual void capitalizeWord() = 0;
151
virtual void showSubstitutionsPanel(bool show) = 0;
152
virtual bool substitutionsPanelIsShowing() = 0;
153
virtual void toggleSmartInsertDelete() = 0;
154
virtual bool isAutomaticQuoteSubstitutionEnabled() = 0;
155
virtual void toggleAutomaticQuoteSubstitution() = 0;
156
virtual bool isAutomaticLinkDetectionEnabled() = 0;
157
virtual void toggleAutomaticLinkDetection() = 0;
158
virtual bool isAutomaticDashSubstitutionEnabled() = 0;
159
virtual void toggleAutomaticDashSubstitution() = 0;
160
virtual bool isAutomaticTextReplacementEnabled() = 0;
161
virtual void toggleAutomaticTextReplacement() = 0;
162
virtual bool isAutomaticSpellingCorrectionEnabled() = 0;
163
virtual void toggleAutomaticSpellingCorrection() = 0;
129
166
virtual void ignoreWordInSpellDocument(const String&) = 0;
130
167
virtual void learnWord(const String&) = 0;
131
168
virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength) = 0;
169
virtual String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord) = 0;
132
170
virtual void checkGrammarOfString(const UChar*, int length, Vector<GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength) = 0;
171
#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
172
virtual void checkTextOfParagraph(const UChar* text, int length, uint64_t checkingTypes, Vector<TextCheckingResult>& results) = 0;
133
174
virtual void updateSpellingUIWithGrammarString(const String&, const GrammarDetail& detail) = 0;
134
175
virtual void updateSpellingUIWithMisspelledWord(const String&) = 0;
135
176
virtual void showSpellingUI(bool show) = 0;