/* -*- 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/. */
#include"EditTransactionBase.h"// for EditTransactionBase, etc.
#include"EditorDOMPoint.h"// for EditorDOMPoint, etc. #include"EditorForwards.h"
#include"nsCOMPtr.h"// for nsCOMPtr #include"nsCycleCollectionParticipant.h" #include"nsID.h"// for REFNSIID #include"nscore.h"// for NS_IMETHOD
class nsIContent; class nsINode;
namespace mozilla {
/** * A transaction that joins two nodes E1 (left node) and E2 (right node) into a * single node E. The children of E are the children of E1 followed by the * children of E2. After DoTransaction() and RedoTransaction(), E1 is removed * from the content tree and E2 remains.
*/ class JoinNodesTransaction final : public EditTransactionBase { protected:
JoinNodesTransaction(HTMLEditor& aHTMLEditor, nsIContent& aLeftContent,
nsIContent& aRightContent);
public: /** * Creates a join node transaction. This returns nullptr if cannot join the * nodes. * * @param aHTMLEditor The provider of core editing operations. * @param aLeftContent The first of two nodes to join. * @param aRightContent The second of two nodes to join.
*/ static already_AddRefed<JoinNodesTransaction> MaybeCreate(
HTMLEditor& aHTMLEditor, nsIContent& aLeftContent,
nsIContent& aRightContent);
/** * CanDoIt() returns true if there are enough members and can join or * restore the nodes. Otherwise, false.
*/ bool CanDoIt() const;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.