Line data Source code
1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* This Source Code Form is subject to the terms of the Mozilla Public
3 : * License, v. 2.0. If a copy of the MPL was not distributed with this
4 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 :
6 : #ifndef nsComposeTxtSrvFilter_h__
7 : #define nsComposeTxtSrvFilter_h__
8 :
9 : #include "nsISupportsImpl.h" // for NS_DECL_ISUPPORTS
10 : #include "nsITextServicesFilter.h"
11 :
12 : /**
13 : * This class implements a filter interface, that enables
14 : * those using it to skip over certain nodes when traversing content
15 : *
16 : * This filter is used to skip over various form control nodes and
17 : * mail's cite nodes
18 : */
19 : class nsComposeTxtSrvFilter final : public nsITextServicesFilter
20 : {
21 : public:
22 : nsComposeTxtSrvFilter();
23 :
24 : // nsISupports interface...
25 : NS_DECL_ISUPPORTS
26 :
27 : // nsITextServicesFilter
28 : NS_DECL_NSITEXTSERVICESFILTER
29 :
30 : // Helper - Intializer
31 0 : void Init(bool aIsForMail) { mIsForMail = aIsForMail; }
32 :
33 : private:
34 0 : ~nsComposeTxtSrvFilter() {}
35 :
36 : bool mIsForMail;
37 : };
38 :
39 : #define NS_COMPOSERTXTSRVFILTER_CID \
40 : {/* {171E72DB-0F8A-412a-8461-E4C927A3A2AC}*/ \
41 : 0x171e72db, 0xf8a, 0x412a, \
42 : { 0x84, 0x61, 0xe4, 0xc9, 0x27, 0xa3, 0xa2, 0xac} }
43 :
44 : #define NS_COMPOSERTXTSRVFILTERMAIL_CID \
45 : {/* {7FBD2146-5FF4-4674-B069-A7BBCE66E773}*/ \
46 : 0x7fbd2146, 0x5ff4, 0x4674, \
47 : { 0xb0, 0x69, 0xa7, 0xbb, 0xce, 0x66, 0xe7, 0x73} }
48 :
49 : // Generic for the editor
50 : #define COMPOSER_TXTSRVFILTER_CONTRACTID "@mozilla.org/editor/txtsrvfilter;1"
51 :
52 : // This is the same but includes "cite" typed blocked quotes
53 : #define COMPOSER_TXTSRVFILTERMAIL_CONTRACTID "@mozilla.org/editor/txtsrvfiltermail;1"
54 :
55 : #endif
|