~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/page/EditorClient.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
class KeyboardEvent;
51
51
class Node;
52
52
class Range;
53
 
class Selection;
 
53
class VisibleSelection;
54
54
class String;
55
55
class VisiblePosition;
56
56
 
61
61
    String userDescription;
62
62
};
63
63
 
 
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
 
72
};
 
73
 
 
74
struct TextCheckingResult {
 
75
    TextCheckingType type;
 
76
    int location;
 
77
    int length;
 
78
    Vector<GrammarDetail> details;
 
79
    String replacement;
 
80
};
 
81
 
64
82
class EditorClient {
65
83
public:
66
84
    virtual ~EditorClient() {  }
126
144
#endif
127
145
#endif
128
146
 
 
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;
 
164
#endif
 
165
 
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;
 
173
#endif
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;
141
182
}
142
183
 
143
184
#endif // EditorClient_h
 
185