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