2007-06-12 06:10:23 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00: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/. */
|
2000-02-07 08:47:48 +00:00
|
|
|
|
|
|
|
#ifndef nsMathMLmactionFrame_h___
|
|
|
|
#define nsMathMLmactionFrame_h___
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
2013-05-10 12:40:44 +00:00
|
|
|
#include "nsMathMLSelectedFrame.h"
|
2011-06-28 17:59:14 +00:00
|
|
|
#include "nsIDOMEventListener.h"
|
2012-06-19 03:26:34 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2000-02-07 08:47:48 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// <maction> -- bind actions to a subexpression
|
|
|
|
//
|
|
|
|
|
2013-05-10 12:40:44 +00:00
|
|
|
class nsMathMLmactionFrame : public nsMathMLSelectedFrame {
|
2000-02-07 08:47:48 +00:00
|
|
|
public:
|
2009-09-12 16:49:24 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2006-03-26 21:30:36 +00:00
|
|
|
friend nsIFrame* NS_NewMathMLmactionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2000-02-07 08:47:48 +00:00
|
|
|
|
2013-03-20 01:47:48 +00:00
|
|
|
virtual void
|
2014-05-24 22:20:40 +00:00
|
|
|
Init(nsIContent* aContent,
|
|
|
|
nsContainerFrame* aParent,
|
|
|
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
2000-02-07 08:47:48 +00:00
|
|
|
|
2014-05-28 19:36:58 +00:00
|
|
|
virtual void
|
2011-08-24 20:54:30 +00:00
|
|
|
SetInitialChildList(ChildListID aListID,
|
2013-05-29 19:37:49 +00:00
|
|
|
nsFrameList& aChildList) MOZ_OVERRIDE;
|
2000-02-07 08:47:48 +00:00
|
|
|
|
2006-01-09 00:36:46 +00:00
|
|
|
virtual nsresult
|
2013-05-29 19:37:49 +00:00
|
|
|
ChildListChanged(int32_t aModType) MOZ_OVERRIDE;
|
2001-05-19 12:09:41 +00:00
|
|
|
|
2014-02-18 07:47:48 +00:00
|
|
|
virtual nsresult
|
2012-08-22 15:56:38 +00:00
|
|
|
AttributeChanged(int32_t aNameSpaceID,
|
2012-05-18 17:35:43 +00:00
|
|
|
nsIAtom* aAttribute,
|
2013-05-29 19:37:49 +00:00
|
|
|
int32_t aModType) MOZ_OVERRIDE;
|
2012-05-18 17:35:43 +00:00
|
|
|
|
2009-11-03 22:43:39 +00:00
|
|
|
private:
|
|
|
|
void MouseClick();
|
|
|
|
void MouseOver();
|
|
|
|
void MouseOut();
|
2000-02-07 08:47:48 +00:00
|
|
|
|
2012-06-19 03:26:34 +00:00
|
|
|
class MouseListener MOZ_FINAL : public nsIDOMEventListener
|
2011-06-28 17:59:14 +00:00
|
|
|
{
|
2014-06-23 22:40:01 +00:00
|
|
|
private:
|
|
|
|
~MouseListener() {}
|
|
|
|
|
|
|
|
public:
|
2009-11-03 22:43:39 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
2011-06-28 17:59:14 +00:00
|
|
|
NS_DECL_NSIDOMEVENTLISTENER
|
2009-11-03 22:43:39 +00:00
|
|
|
|
2012-12-09 17:23:19 +00:00
|
|
|
MouseListener(nsMathMLmactionFrame* aOwner) : mOwner(aOwner) { }
|
2009-11-03 22:43:39 +00:00
|
|
|
|
|
|
|
nsMathMLmactionFrame* mOwner;
|
|
|
|
};
|
2000-02-07 08:47:48 +00:00
|
|
|
|
|
|
|
protected:
|
2013-05-10 12:40:44 +00:00
|
|
|
nsMathMLmactionFrame(nsStyleContext* aContext) :
|
|
|
|
nsMathMLSelectedFrame(aContext) {}
|
2000-02-07 08:47:48 +00:00
|
|
|
virtual ~nsMathMLmactionFrame();
|
|
|
|
|
|
|
|
private:
|
2012-08-22 15:56:38 +00:00
|
|
|
int32_t mActionType;
|
|
|
|
int32_t mChildCount;
|
|
|
|
int32_t mSelection;
|
2014-03-18 00:23:03 +00:00
|
|
|
nsRefPtr<MouseListener> mListener;
|
2000-02-07 08:47:48 +00:00
|
|
|
|
|
|
|
// helper to return the frame for the attribute selection="number"
|
|
|
|
nsIFrame*
|
2013-05-29 19:37:49 +00:00
|
|
|
GetSelectedFrame() MOZ_OVERRIDE;
|
2000-02-07 08:47:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmactionFrame_h___ */
|