Bug 1247796. Use keyboardFocusIndicatorColor for ActiveBorder system color keyword...
[gecko.git] / editor / libeditor / InsertNodeTxn.h
blob9dcdee213ab4aa16b38953c5d044fe5c21df1da1
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 #ifndef InsertNodeTxn_h__
7 #define InsertNodeTxn_h__
9 #include "EditTxn.h" // for EditTxn, NS_DECL_EDITTXN
10 #include "nsCOMPtr.h" // for nsCOMPtr
11 #include "nsCycleCollectionParticipant.h"
12 #include "nsIContent.h" // for nsIContent
13 #include "nsISupportsImpl.h" // for NS_DECL_ISUPPORTS_INHERITED
15 class nsEditor;
17 namespace mozilla {
18 namespace dom {
20 /**
21 * A transaction that inserts a single element
23 class InsertNodeTxn : public EditTxn
25 public:
26 /** initialize the transaction.
27 * @param aNode the node to insert
28 * @param aParent the node to insert into
29 * @param aOffset the offset in aParent to insert aNode
31 InsertNodeTxn(nsIContent& aNode, nsINode& aParent, int32_t aOffset,
32 nsEditor& aEditor);
34 NS_DECL_ISUPPORTS_INHERITED
35 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(InsertNodeTxn, EditTxn)
37 NS_DECL_EDITTXN
39 protected:
40 virtual ~InsertNodeTxn();
42 /** the element to insert */
43 nsCOMPtr<nsIContent> mNode;
45 /** the node into which the new node will be inserted */
46 nsCOMPtr<nsINode> mParent;
48 /** the index in mParent for the new node */
49 int32_t mOffset;
51 /** the editor for this transaction */
52 nsEditor& mEditor;
55 } // namespace dom
56 } // namespace mozilla
58 #endif