2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef EditTxn_h__
|
|
|
|
#define EditTxn_h__
|
|
|
|
|
|
|
|
#include "nsITransaction.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsPIEditorTransaction.h"
|
2009-05-08 21:59:25 -07:00
|
|
|
#include "nsCycleCollectionParticipant.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Base class for all document editing transactions.
|
|
|
|
*/
|
|
|
|
class EditTxn : public nsITransaction,
|
|
|
|
public nsPIEditorTransaction
|
|
|
|
{
|
|
|
|
public:
|
2009-05-08 21:59:25 -07:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(EditTxn, nsITransaction)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
virtual ~EditTxn();
|
|
|
|
|
|
|
|
NS_IMETHOD RedoTransaction(void);
|
2011-09-28 23:19:26 -07:00
|
|
|
NS_IMETHOD GetIsTransient(bool *aIsTransient);
|
|
|
|
NS_IMETHOD Merge(nsITransaction *aTransaction, bool *aDidMerge);
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#define NS_DECL_EDITTXN \
|
|
|
|
NS_IMETHOD DoTransaction(); \
|
|
|
|
NS_IMETHOD UndoTransaction(); \
|
|
|
|
NS_IMETHOD GetTxnDescription(nsAString& aTxnDescription);
|
|
|
|
|
|
|
|
#endif
|