2007-06-11 23:10:23 -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 nsMathMLmactionFrame_h___
|
|
|
|
#define nsMathMLmactionFrame_h___
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsMathMLContainerFrame.h"
|
2011-06-28 10:59:14 -07:00
|
|
|
#include "nsIDOMEventListener.h"
|
2012-06-18 20:26:34 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
//
|
|
|
|
// <maction> -- bind actions to a subexpression
|
|
|
|
//
|
|
|
|
|
2009-11-03 14:43:39 -08:00
|
|
|
class nsMathMLmactionFrame : public nsMathMLContainerFrame {
|
2007-03-22 10:30:00 -07:00
|
|
|
public:
|
2009-09-12 09:49:24 -07:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
friend nsIFrame* NS_NewMathMLmactionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
|
|
|
|
2011-03-24 20:38:59 -07:00
|
|
|
NS_IMETHOD
|
|
|
|
TransmitAutomaticData();
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_IMETHOD
|
|
|
|
Init(nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIFrame* aPrevInFlow);
|
|
|
|
|
|
|
|
NS_IMETHOD
|
2011-08-24 13:54:30 -07:00
|
|
|
SetInitialChildList(ChildListID aListID,
|
2009-07-28 05:53:20 -07:00
|
|
|
nsFrameList& aChildList);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
virtual nsresult
|
|
|
|
ChildListChanged(PRInt32 aModType);
|
|
|
|
|
|
|
|
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
const nsDisplayListSet& aLists);
|
|
|
|
|
2008-03-17 21:52:48 -07:00
|
|
|
virtual nsresult
|
2011-04-07 18:04:40 -07:00
|
|
|
Place(nsRenderingContext& aRenderingContext,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool aPlaceOrigin,
|
2007-03-22 10:30:00 -07:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize);
|
|
|
|
|
|
|
|
NS_IMETHOD
|
|
|
|
Reflow(nsPresContext* aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus);
|
|
|
|
|
2012-05-18 10:35:43 -07:00
|
|
|
NS_IMETHOD
|
|
|
|
AttributeChanged(PRInt32 aNameSpaceID,
|
|
|
|
nsIAtom* aAttribute,
|
|
|
|
PRInt32 aModType);
|
|
|
|
|
2009-11-03 14:43:39 -08:00
|
|
|
private:
|
|
|
|
void MouseClick();
|
|
|
|
void MouseOver();
|
|
|
|
void MouseOut();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-06-18 20:26:34 -07:00
|
|
|
class MouseListener MOZ_FINAL : public nsIDOMEventListener
|
2011-06-28 10:59:14 -07:00
|
|
|
{
|
2009-11-03 14:43:39 -08:00
|
|
|
NS_DECL_ISUPPORTS
|
2011-06-28 10:59:14 -07:00
|
|
|
NS_DECL_NSIDOMEVENTLISTENER
|
2009-11-03 14:43:39 -08:00
|
|
|
|
|
|
|
MouseListener(nsMathMLmactionFrame* aOwner) : mOwner(aOwner) { };
|
|
|
|
|
|
|
|
nsMathMLmactionFrame* mOwner;
|
|
|
|
};
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
protected:
|
|
|
|
nsMathMLmactionFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {}
|
|
|
|
virtual ~nsMathMLmactionFrame();
|
|
|
|
|
|
|
|
virtual PRIntn GetSkipSides() const { return 0; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
PRInt32 mActionType;
|
|
|
|
PRInt32 mChildCount;
|
|
|
|
PRInt32 mSelection;
|
|
|
|
nsIFrame* mSelectedFrame;
|
2009-11-03 14:43:39 -08:00
|
|
|
nsCOMPtr<MouseListener> mListener;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// helper to return the frame for the attribute selection="number"
|
|
|
|
nsIFrame*
|
|
|
|
GetSelectedFrame();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmactionFrame_h___ */
|