OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 bool insertText(const String&, Event* triggeringEvent); | 195 bool insertText(const String&, Event* triggeringEvent); |
196 bool insertTextForConfirmedComposition(const String& text); | 196 bool insertTextForConfirmedComposition(const String& text); |
197 bool insertTextWithoutSendingTextEvent(const String&, bool selectInsertedTex
t, TextEvent* triggeringEvent); | 197 bool insertTextWithoutSendingTextEvent(const String&, bool selectInsertedTex
t, TextEvent* triggeringEvent); |
198 bool insertLineBreak(); | 198 bool insertLineBreak(); |
199 bool insertParagraphSeparator(); | 199 bool insertParagraphSeparator(); |
200 | 200 |
201 bool isContinuousSpellCheckingEnabled() const; | 201 bool isContinuousSpellCheckingEnabled() const; |
202 void toggleContinuousSpellChecking(); | 202 void toggleContinuousSpellChecking(); |
203 bool isGrammarCheckingEnabled(); | 203 bool isGrammarCheckingEnabled(); |
204 void ignoreSpelling(); | 204 void ignoreSpelling(); |
205 void learnSpelling(); | |
206 bool isSelectionUngrammatical(); | |
207 String misspelledSelectionString() const; | |
208 String misspelledWordAtCaretOrRange(Node* clickedNode) const; | 205 String misspelledWordAtCaretOrRange(Node* clickedNode) const; |
209 Vector<String> guessesForUngrammaticalSelection(); | |
210 Vector<String> guessesForMisspelledOrUngrammatical(bool& misspelled, bool& u
ngrammatical); | |
211 bool isSpellCheckingEnabledInFocusedNode() const; | 206 bool isSpellCheckingEnabledInFocusedNode() const; |
212 bool isSpellCheckingEnabledFor(Node*) const; | 207 bool isSpellCheckingEnabledFor(Node*) const; |
213 void markMisspellingsAfterTypingToWord(const VisiblePosition &wordStart, con
st VisibleSelection& selectionAfterTyping); | 208 void markMisspellingsAfterTypingToWord(const VisiblePosition &wordStart, con
st VisibleSelection& selectionAfterTyping); |
214 void markMisspellings(const VisibleSelection&, RefPtr<Range>& firstMisspelli
ngRange); | 209 void markMisspellings(const VisibleSelection&, RefPtr<Range>& firstMisspelli
ngRange); |
215 void markBadGrammar(const VisibleSelection&); | 210 void markBadGrammar(const VisibleSelection&); |
216 void markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelection
, bool markGrammar, const VisibleSelection& grammarSelection); | 211 void markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelection
, bool markGrammar, const VisibleSelection& grammarSelection); |
217 void markAndReplaceFor(PassRefPtr<SpellCheckRequest>, const Vector<TextCheck
ingResult>&); | 212 void markAndReplaceFor(PassRefPtr<SpellCheckRequest>, const Vector<TextCheck
ingResult>&); |
218 | 213 |
219 bool isOverwriteModeEnabled() const { return m_overwriteModeEnabled; } | 214 bool isOverwriteModeEnabled() const { return m_overwriteModeEnabled; } |
220 void toggleOverwriteModeEnabled() { m_overwriteModeEnabled = !m_overwriteMod
eEnabled; } | 215 void toggleOverwriteModeEnabled() { m_overwriteModeEnabled = !m_overwriteMod
eEnabled; } |
221 | 216 |
222 void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask, Range* s
pellingRange, Range* grammarRange); | 217 void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask, Range* s
pellingRange, Range* grammarRange); |
223 | 218 |
224 void advanceToNextMisspelling(bool startBeforeSelection = false); | 219 void advanceToNextMisspelling(bool startBeforeSelection = false); |
225 void showSpellingGuessPanel(); | 220 void showSpellingGuessPanel(); |
226 bool spellingPanelIsShowing(); | |
227 | 221 |
228 bool shouldBeginEditing(Range*); | 222 bool shouldBeginEditing(Range*); |
229 bool shouldEndEditing(Range*); | 223 bool shouldEndEditing(Range*); |
230 | 224 |
231 void clearUndoRedoOperations(); | 225 void clearUndoRedoOperations(); |
232 bool canUndo(); | 226 bool canUndo(); |
233 void undo(); | 227 void undo(); |
234 bool canRedo(); | 228 bool canRedo(); |
235 void redo(); | 229 void redo(); |
236 | 230 |
237 void didBeginEditing(); | 231 void didBeginEditing(); |
238 void didEndEditing(); | 232 void didEndEditing(); |
239 | 233 |
240 void showFontPanel(); | |
241 void showStylesPanel(); | |
242 void showColorPanel(); | |
243 void toggleBold(); | |
244 void toggleUnderline(); | |
245 void setBaseWritingDirection(WritingDirection); | 234 void setBaseWritingDirection(WritingDirection); |
246 | 235 |
247 // smartInsertDeleteEnabled and selectTrailingWhitespaceEnabled are | 236 // smartInsertDeleteEnabled and selectTrailingWhitespaceEnabled are |
248 // mutually exclusive, meaning that enabling one will disable the other. | 237 // mutually exclusive, meaning that enabling one will disable the other. |
249 bool smartInsertDeleteEnabled(); | 238 bool smartInsertDeleteEnabled(); |
250 bool isSelectTrailingWhitespaceEnabled(); | 239 bool isSelectTrailingWhitespaceEnabled(); |
251 | |
252 bool hasBidiSelection() const; | |
253 | 240 |
254 // international text input composition | 241 // international text input composition |
255 bool hasComposition() const { return m_compositionNode; } | 242 bool hasComposition() const { return m_compositionNode; } |
256 void setComposition(const String&, const Vector<CompositionUnderline>&, unsi
gned selectionStart, unsigned selectionEnd); | 243 void setComposition(const String&, const Vector<CompositionUnderline>&, unsi
gned selectionStart, unsigned selectionEnd); |
257 void confirmComposition(); | 244 void confirmComposition(); |
258 void confirmComposition(const String&); // if no existing composition, repla
ces selection | 245 void confirmComposition(const String&); // if no existing composition, repla
ces selection |
259 void cancelComposition(); | 246 void cancelComposition(); |
260 bool cancelCompositionIfSelectionIsInvalid(); | 247 bool cancelCompositionIfSelectionIsInvalid(); |
261 PassRefPtr<Range> compositionRange() const; | 248 PassRefPtr<Range> compositionRange() const; |
262 bool getCompositionSelection(unsigned& selectionStart, unsigned& selectionEn
d) const; | 249 bool getCompositionSelection(unsigned& selectionStart, unsigned& selectionEn
d) const; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 | 386 |
400 inline bool Editor::markedTextMatchesAreHighlighted() const | 387 inline bool Editor::markedTextMatchesAreHighlighted() const |
401 { | 388 { |
402 return m_areMarkedTextMatchesHighlighted; | 389 return m_areMarkedTextMatchesHighlighted; |
403 } | 390 } |
404 | 391 |
405 | 392 |
406 } // namespace WebCore | 393 } // namespace WebCore |
407 | 394 |
408 #endif // Editor_h | 395 #endif // Editor_h |
OLD | NEW |