editor/libeditor/html/nsHTMLObjectResizer.h

changeset 2
7e26c7da4463
equal deleted inserted replaced
-1:000000000000 0:35c58d1a226b
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/. */
5
6 #ifndef _nshtmlobjectresizer__h
7 #define _nshtmlobjectresizer__h
8
9 #include "nsIDOMEventListener.h"
10 #include "nsISelectionListener.h"
11 #include "nsISupportsImpl.h"
12 #include "nsIWeakReferenceUtils.h"
13 #include "nsLiteralString.h"
14
15 class nsIHTMLEditor;
16
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")
25
26 // ==================================================================
27 // ResizerSelectionListener
28 // ==================================================================
29
30 class ResizerSelectionListener : public nsISelectionListener
31 {
32 public:
33
34 ResizerSelectionListener(nsIHTMLEditor * aEditor);
35 void Reset();
36 virtual ~ResizerSelectionListener();
37
38 /*interfaces for addref and release and queryinterface*/
39 NS_DECL_ISUPPORTS
40
41 NS_DECL_NSISELECTIONLISTENER
42
43 protected:
44
45 nsWeakPtr mEditor;
46 };
47
48 // ==================================================================
49 // ResizerMouseMotionListener
50 // ==================================================================
51
52 class ResizerMouseMotionListener : public nsIDOMEventListener
53 {
54 public:
55 ResizerMouseMotionListener(nsIHTMLEditor * aEditor);
56 virtual ~ResizerMouseMotionListener();
57
58
59 /*interfaces for addref and release and queryinterface*/
60 NS_DECL_ISUPPORTS
61
62 NS_DECL_NSIDOMEVENTLISTENER
63
64 protected:
65 nsWeakPtr mEditor;
66
67 };
68
69 // ==================================================================
70 // DocumentResizeEventListener
71 // ==================================================================
72
73 class DocumentResizeEventListener: public nsIDOMEventListener
74 {
75 public:
76 DocumentResizeEventListener(nsIHTMLEditor * aEditor);
77 virtual ~DocumentResizeEventListener();
78
79 /*interfaces for addref and release and queryinterface*/
80 NS_DECL_ISUPPORTS
81
82 NS_DECL_NSIDOMEVENTLISTENER
83
84 protected:
85 nsWeakPtr mEditor;
86
87 };
88
89 #endif /* _nshtmlobjectresizer__h */

mercurial