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