Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
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 _nshtmlobjectresizer__h
7 #define _nshtmlobjectresizer__h
9 #include "nsIDOMEventListener.h"
10 #include "nsISelectionListener.h"
11 #include "nsISupportsImpl.h"
12 #include "nsIWeakReferenceUtils.h"
13 #include "nsLiteralString.h"
15 class nsIHTMLEditor;
17 #define kTopLeft NS_LITERAL_STRING("nw")
18 #define kTop NS_LITERAL_STRING("n")
19 #define kTopRight NS_LITERAL_STRING("ne")
20 #define kLeft NS_LITERAL_STRING("w")
21 #define kRight NS_LITERAL_STRING("e")
22 #define kBottomLeft NS_LITERAL_STRING("sw")
23 #define kBottom NS_LITERAL_STRING("s")
24 #define kBottomRight NS_LITERAL_STRING("se")
26 // ==================================================================
27 // ResizerSelectionListener
28 // ==================================================================
30 class ResizerSelectionListener : public nsISelectionListener
31 {
32 public:
34 ResizerSelectionListener(nsIHTMLEditor * aEditor);
35 void Reset();
36 virtual ~ResizerSelectionListener();
38 /*interfaces for addref and release and queryinterface*/
39 NS_DECL_ISUPPORTS
41 NS_DECL_NSISELECTIONLISTENER
43 protected:
45 nsWeakPtr mEditor;
46 };
48 // ==================================================================
49 // ResizerMouseMotionListener
50 // ==================================================================
52 class ResizerMouseMotionListener : public nsIDOMEventListener
53 {
54 public:
55 ResizerMouseMotionListener(nsIHTMLEditor * aEditor);
56 virtual ~ResizerMouseMotionListener();
59 /*interfaces for addref and release and queryinterface*/
60 NS_DECL_ISUPPORTS
62 NS_DECL_NSIDOMEVENTLISTENER
64 protected:
65 nsWeakPtr mEditor;
67 };
69 // ==================================================================
70 // DocumentResizeEventListener
71 // ==================================================================
73 class DocumentResizeEventListener: public nsIDOMEventListener
74 {
75 public:
76 DocumentResizeEventListener(nsIHTMLEditor * aEditor);
77 virtual ~DocumentResizeEventListener();
79 /*interfaces for addref and release and queryinterface*/
80 NS_DECL_ISUPPORTS
82 NS_DECL_NSIDOMEVENTLISTENER
84 protected:
85 nsWeakPtr mEditor;
87 };
89 #endif /* _nshtmlobjectresizer__h */