gecko-dev/editor/libeditor/EditAction.h
Masayuki Nakano b2a3e52b16 Bug 1430021 - part 1: Move |RefPtr<TextEditRules> mRules| from TextEditor to EditorBase r=m_kato
For calling some methods of mRules from EditorBase, let's move mRules member
from TextEditor to EditorBase.

Unfortunately, TextEditRules.h depends on EditAction which is declared in
EditorBase.h and that caused unnecessary include hell of EditorBase.h.  So,
let's move it to an independent header file.

MozReview-Commit-ID: 5HiSZLP9WHH

--HG--
extra : rebase_source : 3e2c40385a6f3d6d1e03ef4e213434383bb37d5f
2018-01-12 19:01:04 +09:00

68 lines
1.4 KiB
C++

/* -*- 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_EditAction_h
#define mozilla_EditAction_h
namespace mozilla {
// This is int32_t instead of int16_t because nsIInlineSpellChecker.idl's
// spellCheckAfterEditorChange is defined to take it as a long.
// TODO: Make each name eFoo and investigate whether the numeric values
// still have some meaning.
enum class EditAction : int32_t
{
ignore = -1,
none = 0,
undo,
redo,
insertNode,
createNode,
deleteNode,
splitNode,
joinNode,
deleteText = 1003,
// Text edit commands
insertText = 2000,
insertIMEText,
deleteSelection,
setTextProperty,
removeTextProperty,
outputText,
setText,
// HTML editor only actions
insertBreak = 3000,
makeList,
indent,
outdent,
align,
makeBasicBlock,
removeList,
makeDefListItem,
insertElement,
insertQuotation,
htmlPaste = 3012,
loadHTML,
resetTextProperties,
setAbsolutePosition,
removeAbsolutePosition,
decreaseZIndex,
increaseZIndex,
};
} // namespace mozilla
inline bool operator!(const mozilla::EditAction& aOp)
{
return aOp == mozilla::EditAction::none;
}
#endif // #ifdef mozilla_EditAction_h