2001-09-26 02:53:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04: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/. */
|
1999-07-02 07:56:25 +04:00
|
|
|
|
|
|
|
#ifndef nsStylesheetTxns_h__
|
|
|
|
#define nsStylesheetTxns_h__
|
|
|
|
|
2012-07-13 10:33:42 +04:00
|
|
|
#include "EditTxn.h" // for EditTxn, NS_DECL_EDITTXN
|
|
|
|
#include "nsAutoPtr.h" // for nsRefPtr
|
2014-06-20 14:32:49 +04:00
|
|
|
#include "mozilla/CSSStyleSheet.h" // for mozilla::CSSStyleSheet
|
2012-07-13 10:33:42 +04:00
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
#include "nsID.h" // for REFNSIID
|
2014-06-20 14:32:49 +04:00
|
|
|
#include "nsISupportsImpl.h" // for CSSStyleSheet::Release
|
2012-07-13 10:33:42 +04:00
|
|
|
#include "nscore.h" // for NS_IMETHOD
|
|
|
|
|
|
|
|
class nsIEditor;
|
1999-07-02 07:56:25 +04:00
|
|
|
|
|
|
|
class AddStyleSheetTxn : public EditTxn
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** Initialize the transaction.
|
|
|
|
* @param aEditor the object providing core editing operations
|
|
|
|
* @param aSheet the stylesheet to add
|
|
|
|
*/
|
2014-06-20 14:32:49 +04:00
|
|
|
NS_IMETHOD Init(nsIEditor* aEditor,
|
|
|
|
mozilla::CSSStyleSheet* aSheet);
|
1999-07-02 07:56:25 +04:00
|
|
|
|
|
|
|
AddStyleSheetTxn();
|
|
|
|
|
2009-05-09 08:59:25 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AddStyleSheetTxn, EditTxn)
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) override;
|
2009-05-09 08:59:25 +04:00
|
|
|
|
2007-01-11 17:38:02 +03:00
|
|
|
NS_DECL_EDITTXN
|
1999-09-22 02:31:27 +04:00
|
|
|
|
1999-07-02 07:56:25 +04:00
|
|
|
protected:
|
|
|
|
|
2014-06-20 14:32:49 +04:00
|
|
|
nsIEditor* mEditor; // the editor that created this transaction
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<mozilla::CSSStyleSheet> mSheet; // the style sheet to add
|
2010-05-12 00:41:47 +04:00
|
|
|
|
1999-07-02 07:56:25 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class RemoveStyleSheetTxn : public EditTxn
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** Initialize the transaction.
|
|
|
|
* @param aEditor the object providing core editing operations
|
|
|
|
* @param aSheet the stylesheet to remove
|
|
|
|
*/
|
2014-06-20 14:32:49 +04:00
|
|
|
NS_IMETHOD Init(nsIEditor* aEditor,
|
|
|
|
mozilla::CSSStyleSheet* aSheet);
|
2010-05-12 00:41:47 +04:00
|
|
|
|
1999-07-02 07:56:25 +04:00
|
|
|
RemoveStyleSheetTxn();
|
|
|
|
|
2009-05-09 08:59:25 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(RemoveStyleSheetTxn, EditTxn)
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) override;
|
2009-05-09 08:59:25 +04:00
|
|
|
|
2007-01-11 17:38:02 +03:00
|
|
|
NS_DECL_EDITTXN
|
1999-09-22 02:31:27 +04:00
|
|
|
|
1999-07-02 07:56:25 +04:00
|
|
|
protected:
|
|
|
|
|
2014-06-20 14:32:49 +04:00
|
|
|
nsIEditor* mEditor; // the editor that created this transaction
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<mozilla::CSSStyleSheet> mSheet; // the style sheet to remove
|
2010-05-12 00:41:47 +04:00
|
|
|
|
1999-07-02 07:56:25 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* nsStylesheetTxns_h__ */
|