Bug 1860823 [wpt PR 42716] - Update wpt metadata, a=testonly
[gecko.git] / widget / CommandList.h
blob243656bb013f4cee1c27680c5a4e18eefa919c20
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/. */
6 /**
7 * Define NS_DEFINE_COMMAND(aName, aCommandStr) before including this.
8 * @param aName The name useful in C++ of the command.
9 * @param aCommandStr The command string in JS.
11 * Define NS_DEFINE_COMMAND_WITH_PARAM(aName, aCommandStr, aParam) before
12 * including this.
13 * @param aName The name useful in C++ of the command.
14 * @param aCommandStr The command string in JS, but this may be shared with
15 * other aName values. I.e., cannot map aName and
16 * aCommandStr 1:1.
17 * @param aParam Additional param value. When aCommandStr is executed,
18 * this value is also specified. I.e., aName becomes
19 * unique when you look for with both aCommandStr and
20 * aParam.
22 * Define NS_DEFINE_COMMAND_NO_EXEC_COMMAND(aName) before including this.
23 * @param aName The name useful in C++ of the command.
26 // Mapped from commands of some platforms
27 NS_DEFINE_COMMAND(BeginLine, cmd_beginLine)
28 NS_DEFINE_COMMAND(CharNext, cmd_charNext)
29 NS_DEFINE_COMMAND(CharPrevious, cmd_charPrevious)
30 NS_DEFINE_COMMAND(Copy, cmd_copy)
31 NS_DEFINE_COMMAND(Cut, cmd_cut)
32 NS_DEFINE_COMMAND(Delete, cmd_delete)
33 NS_DEFINE_COMMAND(DeleteCharBackward, cmd_deleteCharBackward)
34 NS_DEFINE_COMMAND(DeleteCharForward, cmd_deleteCharForward)
35 NS_DEFINE_COMMAND(DeleteToBeginningOfLine, cmd_deleteToBeginningOfLine)
36 NS_DEFINE_COMMAND(DeleteToEndOfLine, cmd_deleteToEndOfLine)
37 NS_DEFINE_COMMAND(DeleteWordBackward, cmd_deleteWordBackward)
38 NS_DEFINE_COMMAND(DeleteWordForward, cmd_deleteWordForward)
39 NS_DEFINE_COMMAND(EndLine, cmd_endLine)
40 NS_DEFINE_COMMAND(InsertParagraph, cmd_insertParagraph)
41 NS_DEFINE_COMMAND(InsertLineBreak, cmd_insertLineBreak)
42 NS_DEFINE_COMMAND(LineNext, cmd_lineNext)
43 NS_DEFINE_COMMAND(LinePrevious, cmd_linePrevious)
44 NS_DEFINE_COMMAND(MoveBottom, cmd_moveBottom)
45 NS_DEFINE_COMMAND(MovePageDown, cmd_movePageDown)
46 NS_DEFINE_COMMAND(MovePageUp, cmd_movePageUp)
47 NS_DEFINE_COMMAND(MoveTop, cmd_moveTop)
48 NS_DEFINE_COMMAND(Paste, cmd_paste)
49 NS_DEFINE_COMMAND(ScrollBottom, cmd_scrollBottom)
50 NS_DEFINE_COMMAND(ScrollLeft, cmd_scrollLeft)
51 NS_DEFINE_COMMAND(ScrollLineDown, cmd_scrollLineDown)
52 NS_DEFINE_COMMAND(ScrollLineUp, cmd_scrollLineUp)
53 NS_DEFINE_COMMAND(ScrollPageDown, cmd_scrollPageDown)
54 NS_DEFINE_COMMAND(ScrollPageUp, cmd_scrollPageUp)
55 NS_DEFINE_COMMAND(ScrollRight, cmd_scrollRight)
56 NS_DEFINE_COMMAND(ScrollTop, cmd_scrollTop)
57 NS_DEFINE_COMMAND(SelectAll, cmd_selectAll)
58 NS_DEFINE_COMMAND(SelectBeginLine, cmd_selectBeginLine)
59 NS_DEFINE_COMMAND(SelectBottom, cmd_selectBottom)
60 NS_DEFINE_COMMAND(SelectCharNext, cmd_selectCharNext)
61 NS_DEFINE_COMMAND(SelectCharPrevious, cmd_selectCharPrevious)
62 NS_DEFINE_COMMAND(SelectEndLine, cmd_selectEndLine)
63 NS_DEFINE_COMMAND(SelectLineNext, cmd_selectLineNext)
64 NS_DEFINE_COMMAND(SelectLinePrevious, cmd_selectLinePrevious)
65 NS_DEFINE_COMMAND(SelectPageDown, cmd_selectPageDown)
66 NS_DEFINE_COMMAND(SelectPageUp, cmd_selectPageUp)
67 NS_DEFINE_COMMAND(SelectTop, cmd_selectTop)
68 NS_DEFINE_COMMAND(SelectWordNext, cmd_selectWordNext)
69 NS_DEFINE_COMMAND(SelectWordPrevious, cmd_selectWordPrevious)
70 NS_DEFINE_COMMAND(WordNext, cmd_wordNext)
71 NS_DEFINE_COMMAND(WordPrevious, cmd_wordPrevious)
73 // We don't have corresponding commands for them, but some platforms have them.
74 NS_DEFINE_COMMAND_NO_EXEC_COMMAND(CancelOperation)
75 NS_DEFINE_COMMAND_NO_EXEC_COMMAND(Complete)
76 NS_DEFINE_COMMAND_NO_EXEC_COMMAND(InsertBacktab)
77 NS_DEFINE_COMMAND_NO_EXEC_COMMAND(InsertTab)
79 // Commands mapped from HTMLDocument.execCommand()
80 NS_DEFINE_COMMAND(FormatBold, cmd_bold)
81 NS_DEFINE_COMMAND(FormatItalic, cmd_italic)
82 NS_DEFINE_COMMAND(FormatUnderline, cmd_underline)
83 NS_DEFINE_COMMAND(FormatStrikeThrough, cmd_strikethrough)
84 NS_DEFINE_COMMAND(FormatSubscript, cmd_subscript)
85 NS_DEFINE_COMMAND(FormatSuperscript, cmd_superscript)
86 NS_DEFINE_COMMAND(HistoryUndo, cmd_undo)
87 NS_DEFINE_COMMAND(HistoryRedo, cmd_redo)
88 NS_DEFINE_COMMAND(FormatBlock, cmd_formatBlock)
89 NS_DEFINE_COMMAND(FormatIndent, cmd_indent)
90 NS_DEFINE_COMMAND(FormatOutdent, cmd_outdent)
91 NS_DEFINE_COMMAND_WITH_PARAM(FormatJustifyLeft, cmd_align, left)
92 NS_DEFINE_COMMAND_WITH_PARAM(FormatJustifyRight, cmd_align, right)
93 NS_DEFINE_COMMAND_WITH_PARAM(FormatJustifyCenter, cmd_align, center)
94 NS_DEFINE_COMMAND_WITH_PARAM(FormatJustifyFull, cmd_align, justify)
95 NS_DEFINE_COMMAND(FormatBackColor, cmd_highlight)
96 NS_DEFINE_COMMAND(FormatFontColor, cmd_fontColor)
97 NS_DEFINE_COMMAND(FormatFontName, cmd_fontFace)
98 NS_DEFINE_COMMAND(FormatFontSize, cmd_fontSize)
99 NS_DEFINE_COMMAND(FormatIncreaseFontSize, cmd_increaseFont)
100 NS_DEFINE_COMMAND(FormatDecreaseFontSize, cmd_decreaseFont)
101 NS_DEFINE_COMMAND(InsertHorizontalRule, cmd_insertHR)
102 NS_DEFINE_COMMAND(InsertLink, cmd_insertLinkNoUI)
103 NS_DEFINE_COMMAND(InsertImage, cmd_insertImageNoUI)
104 NS_DEFINE_COMMAND(InsertHTML, cmd_insertHTML)
105 NS_DEFINE_COMMAND(InsertText, cmd_insertText)
106 NS_DEFINE_COMMAND(InsertOrderedList, cmd_ol)
107 NS_DEFINE_COMMAND(InsertUnorderedList, cmd_ul)
108 NS_DEFINE_COMMAND(FormatRemove, cmd_removeStyles)
109 NS_DEFINE_COMMAND(FormatRemoveLink, cmd_removeLinks)
110 NS_DEFINE_COMMAND(SetDocumentUseCSS, cmd_setDocumentUseCSS)
111 NS_DEFINE_COMMAND(SetDocumentReadOnly, cmd_setDocumentReadOnly)
112 NS_DEFINE_COMMAND(SetDocumentInsertBROnEnterKeyPress, cmd_insertBrOnReturn)
113 NS_DEFINE_COMMAND(SetDocumentDefaultParagraphSeparator,
114 cmd_defaultParagraphSeparator)
115 NS_DEFINE_COMMAND(ToggleObjectResizers, cmd_enableObjectResizing)
116 NS_DEFINE_COMMAND(ToggleInlineTableEditor, cmd_enableInlineTableEditing)
117 NS_DEFINE_COMMAND(ToggleAbsolutePositionEditor,
118 cmd_enableAbsolutePositionEditing)
119 NS_DEFINE_COMMAND(EnableCompatibleJoinSplitNodeDirection,
120 cmd_enableCompatibleJoinSplitNodeDirection)
122 // Commands not mapped from HTMLDocument.execCommand() but available with
123 // command dispatcher and handled in editor.
124 NS_DEFINE_COMMAND(CutOrDelete, cmd_cutOrDelete)
125 NS_DEFINE_COMMAND(CopyOrDelete, cmd_copyOrDelete)
126 NS_DEFINE_COMMAND(EditorObserverDocumentCreated, obs_documentCreated)
127 NS_DEFINE_COMMAND(EditorObserverDocumentLocationChanged,
128 obs_documentLocationChanged)
129 NS_DEFINE_COMMAND(EditorObserverDocumentWillBeDestroyed,
130 obs_documentWillBeDestroyed)
131 NS_DEFINE_COMMAND(FormatAbbreviation, cmd_abbr)
132 NS_DEFINE_COMMAND(FormatAbsolutePosition, cmd_absPos)
133 NS_DEFINE_COMMAND(FormatAcronym, cmd_acronym)
134 NS_DEFINE_COMMAND(FormatCitation, cmd_cite)
135 NS_DEFINE_COMMAND(FormatCode, cmd_code)
136 NS_DEFINE_COMMAND(FormatDecreaseZIndex, cmd_decreaseZIndex)
137 NS_DEFINE_COMMAND(FormatDocumentBackgroundColor, cmd_backgroundColor)
138 NS_DEFINE_COMMAND(FormatEmphasis, cmd_em)
139 NS_DEFINE_COMMAND(FormatIncreaseZIndex, cmd_increaseZIndex)
140 NS_DEFINE_COMMAND(FormatJustify, cmd_align) // Only for getting enabled/state
141 NS_DEFINE_COMMAND(FormatJustifyNone, cmd_align) // with empty string or params
142 NS_DEFINE_COMMAND(FormatNoBreak, cmd_nobreak)
143 NS_DEFINE_COMMAND(FormatRemoveList, cmd_removeList)
144 NS_DEFINE_COMMAND(FormatSample, cmd_samp)
145 NS_DEFINE_COMMAND(FormatSetBlockTextDirection, cmd_switchTextDirection)
146 NS_DEFINE_COMMAND(FormatStrong, cmd_strong)
147 NS_DEFINE_COMMAND(FormatTeletypeText, cmd_tt)
148 NS_DEFINE_COMMAND(FormatVariable, cmd_var)
149 NS_DEFINE_COMMAND(InsertDefinitionDetails, cmd_dd)
150 NS_DEFINE_COMMAND(InsertDefinitionTerm, cmd_dt)
151 NS_DEFINE_COMMAND(MoveDown, cmd_moveDown)
152 NS_DEFINE_COMMAND(MoveDown2, cmd_moveDown2)
153 NS_DEFINE_COMMAND(MoveLeft, cmd_moveLeft)
154 NS_DEFINE_COMMAND(MoveLeft2, cmd_moveLeft2)
155 NS_DEFINE_COMMAND(MoveRight, cmd_moveRight)
156 NS_DEFINE_COMMAND(MoveRight2, cmd_moveRight2)
157 NS_DEFINE_COMMAND(MoveUp, cmd_moveUp)
158 NS_DEFINE_COMMAND(MoveUp2, cmd_moveUp2)
159 NS_DEFINE_COMMAND(ParagraphState, cmd_paragraphState)
160 NS_DEFINE_COMMAND(PasteAsQuotation, cmd_pasteQuote)
161 NS_DEFINE_COMMAND(PasteTransferable, cmd_pasteTransferable)
162 NS_DEFINE_COMMAND(PasteWithoutFormat, cmd_pasteNoFormatting)
163 NS_DEFINE_COMMAND(SelectDown, cmd_selectDown)
164 NS_DEFINE_COMMAND(SelectDown2, cmd_selectDown2)
165 NS_DEFINE_COMMAND(SelectLeft, cmd_selectLeft)
166 NS_DEFINE_COMMAND(SelectLeft2, cmd_selectLeft2)
167 NS_DEFINE_COMMAND(SelectRight, cmd_selectRight)
168 NS_DEFINE_COMMAND(SelectRight2, cmd_selectRight2)
169 NS_DEFINE_COMMAND(SelectUp, cmd_selectUp)
170 NS_DEFINE_COMMAND(SelectUp2, cmd_selectUp2)
171 NS_DEFINE_COMMAND(SetDocumentModified, cmd_setDocumentModified)