1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/libeditor/html/nsHTMLObjectResizer.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,89 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef _nshtmlobjectresizer__h 1.10 +#define _nshtmlobjectresizer__h 1.11 + 1.12 +#include "nsIDOMEventListener.h" 1.13 +#include "nsISelectionListener.h" 1.14 +#include "nsISupportsImpl.h" 1.15 +#include "nsIWeakReferenceUtils.h" 1.16 +#include "nsLiteralString.h" 1.17 + 1.18 +class nsIHTMLEditor; 1.19 + 1.20 +#define kTopLeft NS_LITERAL_STRING("nw") 1.21 +#define kTop NS_LITERAL_STRING("n") 1.22 +#define kTopRight NS_LITERAL_STRING("ne") 1.23 +#define kLeft NS_LITERAL_STRING("w") 1.24 +#define kRight NS_LITERAL_STRING("e") 1.25 +#define kBottomLeft NS_LITERAL_STRING("sw") 1.26 +#define kBottom NS_LITERAL_STRING("s") 1.27 +#define kBottomRight NS_LITERAL_STRING("se") 1.28 + 1.29 +// ================================================================== 1.30 +// ResizerSelectionListener 1.31 +// ================================================================== 1.32 + 1.33 +class ResizerSelectionListener : public nsISelectionListener 1.34 +{ 1.35 +public: 1.36 + 1.37 + ResizerSelectionListener(nsIHTMLEditor * aEditor); 1.38 + void Reset(); 1.39 + virtual ~ResizerSelectionListener(); 1.40 + 1.41 + /*interfaces for addref and release and queryinterface*/ 1.42 + NS_DECL_ISUPPORTS 1.43 + 1.44 + NS_DECL_NSISELECTIONLISTENER 1.45 + 1.46 +protected: 1.47 + 1.48 + nsWeakPtr mEditor; 1.49 +}; 1.50 + 1.51 +// ================================================================== 1.52 +// ResizerMouseMotionListener 1.53 +// ================================================================== 1.54 + 1.55 +class ResizerMouseMotionListener : public nsIDOMEventListener 1.56 +{ 1.57 +public: 1.58 + ResizerMouseMotionListener(nsIHTMLEditor * aEditor); 1.59 + virtual ~ResizerMouseMotionListener(); 1.60 + 1.61 + 1.62 +/*interfaces for addref and release and queryinterface*/ 1.63 + NS_DECL_ISUPPORTS 1.64 + 1.65 + NS_DECL_NSIDOMEVENTLISTENER 1.66 + 1.67 + protected: 1.68 + nsWeakPtr mEditor; 1.69 + 1.70 +}; 1.71 + 1.72 +// ================================================================== 1.73 +// DocumentResizeEventListener 1.74 +// ================================================================== 1.75 + 1.76 +class DocumentResizeEventListener: public nsIDOMEventListener 1.77 +{ 1.78 +public: 1.79 + DocumentResizeEventListener(nsIHTMLEditor * aEditor); 1.80 + virtual ~DocumentResizeEventListener(); 1.81 + 1.82 + /*interfaces for addref and release and queryinterface*/ 1.83 + NS_DECL_ISUPPORTS 1.84 + 1.85 + NS_DECL_NSIDOMEVENTLISTENER 1.86 + 1.87 + protected: 1.88 + nsWeakPtr mEditor; 1.89 + 1.90 +}; 1.91 + 1.92 +#endif /* _nshtmlobjectresizer__h */