summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/HTMLEditorObjectResizerUtils.h
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /editor/libeditor/HTMLEditorObjectResizerUtils.h
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'editor/libeditor/HTMLEditorObjectResizerUtils.h')
-rw-r--r--editor/libeditor/HTMLEditorObjectResizerUtils.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/editor/libeditor/HTMLEditorObjectResizerUtils.h b/editor/libeditor/HTMLEditorObjectResizerUtils.h
new file mode 100644
index 000000000..2bebbe76b
--- /dev/null
+++ b/editor/libeditor/HTMLEditorObjectResizerUtils.h
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+#ifndef HTMLEditorObjectResizerUtils_h
+#define HTMLEditorObjectResizerUtils_h
+
+#include "nsIDOMEventListener.h"
+#include "nsISelectionListener.h"
+#include "nsISupportsImpl.h"
+#include "nsIWeakReferenceUtils.h"
+#include "nsLiteralString.h"
+
+class nsIHTMLEditor;
+
+namespace mozilla {
+
+#define kTopLeft NS_LITERAL_STRING("nw")
+#define kTop NS_LITERAL_STRING("n")
+#define kTopRight NS_LITERAL_STRING("ne")
+#define kLeft NS_LITERAL_STRING("w")
+#define kRight NS_LITERAL_STRING("e")
+#define kBottomLeft NS_LITERAL_STRING("sw")
+#define kBottom NS_LITERAL_STRING("s")
+#define kBottomRight NS_LITERAL_STRING("se")
+
+/******************************************************************************
+ * mozilla::ResizerSelectionListener
+ ******************************************************************************/
+
+class ResizerSelectionListener final : public nsISelectionListener
+{
+public:
+ explicit ResizerSelectionListener(nsIHTMLEditor* aEditor);
+ void Reset();
+
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSISELECTIONLISTENER
+
+protected:
+ virtual ~ResizerSelectionListener() {}
+ nsWeakPtr mEditor;
+};
+
+/******************************************************************************
+ * mozilla::ResizerMouseMotionListener
+ ******************************************************************************/
+
+class ResizerMouseMotionListener final : public nsIDOMEventListener
+{
+public:
+ explicit ResizerMouseMotionListener(nsIHTMLEditor* aEditor);
+
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIDOMEVENTLISTENER
+
+protected:
+ virtual ~ResizerMouseMotionListener() {}
+ nsWeakPtr mEditor;
+};
+
+/******************************************************************************
+ * mozilla::DocumentResizeEventListener
+ ******************************************************************************/
+
+class DocumentResizeEventListener final : public nsIDOMEventListener
+{
+public:
+ explicit DocumentResizeEventListener(nsIHTMLEditor* aEditor);
+
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIDOMEVENTLISTENER
+
+protected:
+ virtual ~DocumentResizeEventListener() {}
+ nsWeakPtr mEditor;
+};
+
+} // namespace mozilla
+
+#endif // #ifndef HTMLEditorObjectResizerUtils_h