gecko-dev/editor/libeditor/TextEditUtils.h
Masayuki Nakano a4ac19d311 Bug 1260651 part.58 Rename nsPlaintextEditor to mozilla::TextEditor (and their file names too) r=mccr8
This patch renames nsPlaintextEditor to mozilla::TextEditor.

Additionally, renames TextEditRules::mEditor to TextEditRules::mTextEditor for making its type clearer.

Finally, renaming following files:

nsPlaintextEditor.h -> TextEditor.h (exposed as mozilla/editor/TextEditor.h)
nsPlaintextEditor.cpp -> TextEditor.cpp
nsPlaintextDataTransfer.cpp -> TextEditorDataTransfer.cpp

MozReview-Commit-ID: Lw8oJi4WglA

--HG--
rename : editor/libeditor/nsPlaintextEditor.cpp => editor/libeditor/TextEditor.cpp
rename : editor/libeditor/nsPlaintextEditor.h => editor/libeditor/TextEditor.h
rename : editor/libeditor/nsPlaintextDataTransfer.cpp => editor/libeditor/TextEditorDataTransfer.cpp
2016-07-09 11:54:50 +09:00

48 lines
1.2 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 TextEditUtils_h
#define TextEditUtils_h
#include "nscore.h"
class nsIDOMNode;
class nsINode;
namespace mozilla {
class TextEditor;
class TextEditUtils final
{
public:
// from TextEditRules:
static bool IsBody(nsIDOMNode* aNode);
static bool IsBreak(nsIDOMNode* aNode);
static bool IsBreak(nsINode* aNode);
static bool IsMozBR(nsIDOMNode* aNode);
static bool IsMozBR(nsINode* aNode);
static bool HasMozAttr(nsIDOMNode* aNode);
};
/***************************************************************************
* stack based helper class for detecting end of editor initialization, in
* order to trigger "end of init" initialization of the edit rules.
*/
class AutoEditInitRulesTrigger final
{
private:
TextEditor* mTextEditor;
nsresult& mResult;
public:
AutoEditInitRulesTrigger(TextEditor* aTextEditor, nsresult& aResult);
~AutoEditInitRulesTrigger();
};
} // naemspace mozilla
#endif // #ifndef TextEditUtils_h