michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsTextEditUtils_h__ michael@0: #define nsTextEditUtils_h__ michael@0: michael@0: #include "nscore.h" michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: class Element; michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: class nsIDOMNode; michael@0: class nsPlaintextEditor; michael@0: michael@0: class nsTextEditUtils michael@0: { michael@0: public: michael@0: // from nsTextEditRules: michael@0: static bool IsBody(nsIDOMNode* aNode); michael@0: static bool IsBreak(nsIDOMNode* aNode); michael@0: static bool IsMozBR(nsIDOMNode* aNode); michael@0: static bool IsMozBR(nsINode* aNode); michael@0: static bool HasMozAttr(nsIDOMNode* aNode); michael@0: }; michael@0: michael@0: /*************************************************************************** michael@0: * stack based helper class for detecting end of editor initialization, in michael@0: * order to trigger "end of init" initialization of the edit rules. michael@0: */ michael@0: class nsAutoEditInitRulesTrigger michael@0: { michael@0: private: michael@0: nsPlaintextEditor* mEd; michael@0: nsresult& mRes; michael@0: public: michael@0: nsAutoEditInitRulesTrigger(nsPlaintextEditor* aEd, nsresult& aRes); michael@0: ~nsAutoEditInitRulesTrigger(); michael@0: }; michael@0: michael@0: #endif /* nsTextEditUtils_h__ */