File: EditorForwards.h

package info (click to toggle)
firefox 147.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,683,320 kB
  • sloc: cpp: 7,607,359; javascript: 6,533,295; ansic: 3,775,223; python: 1,415,500; xml: 634,561; asm: 438,949; java: 186,241; sh: 62,752; makefile: 18,079; objc: 13,092; perl: 12,808; yacc: 4,583; cs: 3,846; pascal: 3,448; lex: 1,720; ruby: 1,003; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10; exp: 6
file content (186 lines) | stat: -rw-r--r-- 8,724 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef mozilla_EditorHelperForwards_h
#define mozilla_EditorHelperForwards_h

#include "mozilla/EnumSet.h"

#include <cstdint>

/******************************************************************************
 * Forward declarations of other modules'
 ******************************************************************************/
class nsIContent;
class nsINode;

template <typename T>
class nsCOMPtr;

template <typename T>
class RefPtr;

namespace mozilla {

template <typename V, typename E>
class Result;

template <typename T>
class OwningNonNull;

namespace dom {
class Element;
class Text;
}  // namespace dom

/******************************************************************************
 * enum classes
 ******************************************************************************/

enum class BlockInlineCheck : uint8_t;         // HTMLEditHelpers.h
enum class CollectChildrenOption;              // HTMLEditUtils.h
enum class EditAction;                         // mozilla/EditAction.h
enum class EditorCommandParamType : uint16_t;  // mozilla/EditorCommands.h
enum class EditSubAction : int32_t;            // mozilla/EditAction.h
enum class ParagraphSeparator;                 // mozilla/HTMLEditor.h
enum class SpecifiedStyle : uint8_t;           // mozilla/PendingStyles.h
enum class StopTracking : bool;                // mozilla/SelectionState.h
enum class SuggestCaret;                       // EditorUtils.h
enum class WithTransaction;                    // HTMLEditHelpers.h

/******************************************************************************
 * enum sets
 ******************************************************************************/

using CollectChildrenOptions = EnumSet<CollectChildrenOption>;
using SuggestCaretOptions = EnumSet<SuggestCaret>;

/******************************************************************************
 * classes or structs which are required for template classes/structs
 ******************************************************************************/

template <typename PT, typename CT>
class EditorDOMPointBase;  // mozilla/EditorDOMPoint.h

using EditorDOMPoint =
    EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent>>;
using EditorRawDOMPoint = EditorDOMPointBase<nsINode*, nsIContent*>;
using EditorDOMPointInText = EditorDOMPointBase<RefPtr<dom::Text>, nsIContent*>;
using EditorRawDOMPointInText = EditorDOMPointBase<dom::Text*, nsIContent*>;

template <typename CT>
class EditorLineBreakBase;  // EditorLineBreak.h

using EditorLineBreak = EditorLineBreakBase<nsCOMPtr<nsIContent>>;
using EditorRawLineBreak = EditorLineBreakBase<nsIContent*>;

/******************************************************************************
 * classes
 ******************************************************************************/

class AutoPendingStyleCacheArray;  // mozilla/PendingStyles.h
class EditTransactionBase;         // mozilla/EditTransactionBase.h
class EditorBase;                  // mozilla/EditorBase.h
class HTMLEditor;                  // mozilla/HTMLEditor.h
class ManualNACPtr;                // mozilla/ManualNAC.h
class PendingStyle;                // mozilla/PendingStyles.h
class PendingStyleCache;           // mozilla/PendingStyles.h
class PendingStyles;               // mozilla/PendingStyles.h
class RangeUpdater;                // mozilla/SelectionState.h
class SelectionState;              // mozilla/SelectionState.h
class TextEditor;                  // mozilla/TextEditor.h

class AutoClonedRangeArray;               // AutoClonedRangeArray.h
class AutoClonedSelectionRangeArray;      // AutoClonedRangeArray.h
class AutoDOMAPIWrapperBase;              // EditorDOMAPIWrapper.h
class AutoSelectionRestorer;              // AutoSelectionRestorer.h
class AutoSelectionRangeArray;            // EditorUtils.h
class CaretPoint;                         // EditorUtils.h
class ChangeAttributeTransaction;         // ChangeAttributeTransaction.h
class ChangeStyleTransaction;             // ChangeStyleTransaction.h
class CompositionInTextNodeTransaction;   // CompositionTransaction.h
class CompositionTransaction;             // CompositionTransaction.h
class CreateLineBreakResult;              // EditorLineBreak.h
class CSSEditUtils;                       // CSSEditUtils.h
class DeleteContentTransactionBase;       // DeleteContentTransactionBase.h
class DeleteMultipleRangesTransaction;    // DeleteMultipleRangesTransaction.h
class DeleteNodeTransaction;              // DeleteNodeTransaction.h
class DeleteRangeResult;                  // HTMLEditHelpers.h
class DeleteRangeTransaction;             // DeleteRangeTransaction.h
class DeleteTextFromTextNodeTransaction;  // DeleteTextTransaction.h
class DeleteTextTransaction;              // DeleteTextTransaction.h
class EditActionResult;                   // EditorUtils.h
class EditAggregateTransaction;           // EditAggregateTransaction.h
class EditorEventListener;                // EditorEventListener.h
class EditResult;                         // HTMLEditHelpers.h
class HTMLEditorEventListener;            // HTMLEditorEventListener.h
class InsertNodeTransaction;              // InsertNodeTransaction.h
class InsertTextIntoTextNodeTransaction;  // InsertTextTransaction.h
class InsertTextResult;                   // EditorUtils.h
class InsertTextTransaction;              // InsertTextTransaction.h
class InterCiter;                         // InterCiter.h
class JoinNodesResult;                    // HTMLEditHelpers.h
class JoinNodesTransaction;               // JoinNodesTransaction.h
class MoveNodeResult;                     // HTMLEditHelpers.h
class MoveNodeTransaction;                // MoveNodeTransaction.h
class MoveNodeTransactionBase;            // MoveNodeTransaction.h
class MoveSiblingsTransaction;            // MoveNodeTransaction.h
class PlaceholderTransaction;             // PlaceholderTransaction.h
class ReplaceTextInTextNodeTransaction;   // ReplaceTextTransaction.h
class ReplaceTextTransaction;             // ReplaceTextTransaction.h
class SplitNodeResult;                    // HTMLEditHelpers.h
class SplitNodeTransaction;               // SplitNodeTransaction.h
class SplitRangeOffFromNodeResult;        // HTMLEditHelpers.h
class SplitRangeOffResult;                // HTMLEditHelpers.h
class WhiteSpaceVisibilityKeeper;         // WhiteSpaceVisibilityKeeper.h
class WSRunScanner;                       // WSRunScanner.h
class WSScanResult;                       // WSRunScanner.h

/******************************************************************************
 * structs
 ******************************************************************************/

class EditorElementStyle;          // HTMLEditHelpers.h
struct EditorInlineStyle;          // HTMLEditHelpers.h
struct EditorInlineStyleAndValue;  // HTMLEditHelpers.h
struct RangeItem;                  // mozilla/SelectionState.h

/******************************************************************************
 * template classes
 ******************************************************************************/

template <typename EditorDOMPointType>
class EditorDOMRangeBase;  // mozilla/EditorDOMPoint.h

template <typename NodeType>
class CreateNodeResultBase;  // EditorUtils.h

template <typename EditorDOMPointType>
class ReplaceRangeDataBase;  // EditorUtils.h

/******************************************************************************
 * aliases
 ******************************************************************************/

using CreateContentResult = CreateNodeResultBase<nsIContent>;
using CreateElementResult = CreateNodeResultBase<dom::Element>;
using CreateTextResult = CreateNodeResultBase<dom::Text>;

// InsertParagraphResult is an alias of CreateElementResult because it returns
// new paragraph from point of view of users (i.e., right paragraph if split)
// instead of newly created paragraph element.
using InsertParagraphResult = CreateElementResult;

using EditorDOMRange = EditorDOMRangeBase<EditorDOMPoint>;
using EditorRawDOMRange = EditorDOMRangeBase<EditorRawDOMPoint>;
using EditorDOMRangeInTexts = EditorDOMRangeBase<EditorDOMPointInText>;
using EditorRawDOMRangeInTexts = EditorDOMRangeBase<EditorRawDOMPointInText>;

using ReplaceRangeData = ReplaceRangeDataBase<EditorDOMPoint>;
using ReplaceRangeInTextsData = ReplaceRangeDataBase<EditorDOMPointInText>;

}  // namespace mozilla

#endif  // #ifndef mozilla_EditorHelperForwards_h