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 _nshtmlobjectresizer__h michael@0: #define _nshtmlobjectresizer__h michael@0: michael@0: #include "nsIDOMEventListener.h" michael@0: #include "nsISelectionListener.h" michael@0: #include "nsISupportsImpl.h" michael@0: #include "nsIWeakReferenceUtils.h" michael@0: #include "nsLiteralString.h" michael@0: michael@0: class nsIHTMLEditor; michael@0: michael@0: #define kTopLeft NS_LITERAL_STRING("nw") michael@0: #define kTop NS_LITERAL_STRING("n") michael@0: #define kTopRight NS_LITERAL_STRING("ne") michael@0: #define kLeft NS_LITERAL_STRING("w") michael@0: #define kRight NS_LITERAL_STRING("e") michael@0: #define kBottomLeft NS_LITERAL_STRING("sw") michael@0: #define kBottom NS_LITERAL_STRING("s") michael@0: #define kBottomRight NS_LITERAL_STRING("se") michael@0: michael@0: // ================================================================== michael@0: // ResizerSelectionListener michael@0: // ================================================================== michael@0: michael@0: class ResizerSelectionListener : public nsISelectionListener michael@0: { michael@0: public: michael@0: michael@0: ResizerSelectionListener(nsIHTMLEditor * aEditor); michael@0: void Reset(); michael@0: virtual ~ResizerSelectionListener(); michael@0: michael@0: /*interfaces for addref and release and queryinterface*/ michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: NS_DECL_NSISELECTIONLISTENER michael@0: michael@0: protected: michael@0: michael@0: nsWeakPtr mEditor; michael@0: }; michael@0: michael@0: // ================================================================== michael@0: // ResizerMouseMotionListener michael@0: // ================================================================== michael@0: michael@0: class ResizerMouseMotionListener : public nsIDOMEventListener michael@0: { michael@0: public: michael@0: ResizerMouseMotionListener(nsIHTMLEditor * aEditor); michael@0: virtual ~ResizerMouseMotionListener(); michael@0: michael@0: michael@0: /*interfaces for addref and release and queryinterface*/ michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: NS_DECL_NSIDOMEVENTLISTENER michael@0: michael@0: protected: michael@0: nsWeakPtr mEditor; michael@0: michael@0: }; michael@0: michael@0: // ================================================================== michael@0: // DocumentResizeEventListener michael@0: // ================================================================== michael@0: michael@0: class DocumentResizeEventListener: public nsIDOMEventListener michael@0: { michael@0: public: michael@0: DocumentResizeEventListener(nsIHTMLEditor * aEditor); michael@0: virtual ~DocumentResizeEventListener(); michael@0: michael@0: /*interfaces for addref and release and queryinterface*/ michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: NS_DECL_NSIDOMEVENTLISTENER michael@0: michael@0: protected: michael@0: nsWeakPtr mEditor; michael@0: michael@0: }; michael@0: michael@0: #endif /* _nshtmlobjectresizer__h */