2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef _nshtmlobjectresizer__h
|
|
|
|
#define _nshtmlobjectresizer__h
|
|
|
|
|
|
|
|
#include "nsIDOMEventListener.h"
|
|
|
|
#include "nsISelectionListener.h"
|
2012-07-12 23:33:42 -07:00
|
|
|
#include "nsISupportsImpl.h"
|
|
|
|
#include "nsIWeakReferenceUtils.h"
|
|
|
|
#include "nsLiteralString.h"
|
|
|
|
|
|
|
|
class nsIHTMLEditor;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#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")
|
|
|
|
|
|
|
|
// ==================================================================
|
|
|
|
// ResizerSelectionListener
|
|
|
|
// ==================================================================
|
|
|
|
|
|
|
|
class ResizerSelectionListener : public nsISelectionListener
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2014-08-31 20:33:43 -07:00
|
|
|
explicit ResizerSelectionListener(nsIHTMLEditor * aEditor);
|
2007-03-22 10:30:00 -07:00
|
|
|
void Reset();
|
|
|
|
|
|
|
|
/*interfaces for addref and release and queryinterface*/
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
NS_DECL_NSISELECTIONLISTENER
|
|
|
|
|
|
|
|
protected:
|
2014-06-23 15:40:02 -07:00
|
|
|
virtual ~ResizerSelectionListener();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsWeakPtr mEditor;
|
|
|
|
};
|
|
|
|
|
|
|
|
// ==================================================================
|
|
|
|
// ResizerMouseMotionListener
|
|
|
|
// ==================================================================
|
|
|
|
|
2011-06-27 16:34:54 -07:00
|
|
|
class ResizerMouseMotionListener : public nsIDOMEventListener
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2014-08-31 20:33:43 -07:00
|
|
|
explicit ResizerMouseMotionListener(nsIHTMLEditor * aEditor);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/*interfaces for addref and release and queryinterface*/
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
NS_DECL_NSIDOMEVENTLISTENER
|
|
|
|
|
|
|
|
protected:
|
2014-06-23 15:40:02 -07:00
|
|
|
virtual ~ResizerMouseMotionListener();
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
nsWeakPtr mEditor;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
// ==================================================================
|
|
|
|
// DocumentResizeEventListener
|
|
|
|
// ==================================================================
|
|
|
|
|
|
|
|
class DocumentResizeEventListener: public nsIDOMEventListener
|
|
|
|
{
|
|
|
|
public:
|
2014-08-31 20:33:43 -07:00
|
|
|
explicit DocumentResizeEventListener(nsIHTMLEditor * aEditor);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/*interfaces for addref and release and queryinterface*/
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
NS_DECL_NSIDOMEVENTLISTENER
|
|
|
|
|
|
|
|
protected:
|
2014-06-23 15:40:02 -07:00
|
|
|
virtual ~DocumentResizeEventListener();
|
2007-03-22 10:30:00 -07:00
|
|
|
nsWeakPtr mEditor;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _nshtmlobjectresizer__h */
|