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/. */
|
1999-09-21 02:12:01 +00:00
|
|
|
|
|
|
|
#ifndef nsMathMLmoFrame_h___
|
|
|
|
#define nsMathMLmoFrame_h___
|
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2002-08-16 21:36:31 +00:00
|
|
|
#include "nsMathMLTokenFrame.h"
|
2013-08-30 21:37:12 +00:00
|
|
|
#include "nsMathMLChar.h"
|
1999-09-21 02:12:01 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// <mo> -- operator, fence, or separator
|
|
|
|
//
|
|
|
|
|
2002-08-16 21:36:31 +00:00
|
|
|
class nsMathMLmoFrame : public nsMathMLTokenFrame {
|
1999-09-21 02:12:01 +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_NewMathMLmoFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2000-03-28 09:38:24 +00:00
|
|
|
|
2013-05-14 16:33:23 +00:00
|
|
|
virtual eMathMLFrameType GetMathMLFrameType() MOZ_OVERRIDE;
|
2002-08-12 23:30:35 +00:00
|
|
|
|
2003-02-22 00:32:13 +00:00
|
|
|
virtual void
|
2012-08-22 15:56:38 +00:00
|
|
|
SetAdditionalStyleContext(int32_t aIndex,
|
2013-05-14 16:33:23 +00:00
|
|
|
nsStyleContext* aStyleContext) MOZ_OVERRIDE;
|
2003-02-22 00:32:13 +00:00
|
|
|
virtual nsStyleContext*
|
2013-05-14 16:33:23 +00:00
|
|
|
GetAdditionalStyleContext(int32_t aIndex) const MOZ_OVERRIDE;
|
2000-03-28 09:38:24 +00:00
|
|
|
|
2013-02-14 11:12:27 +00:00
|
|
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
1999-09-21 02:12:01 +00:00
|
|
|
|
2002-04-02 04:15:22 +00:00
|
|
|
NS_IMETHOD
|
2012-09-14 16:10:08 +00:00
|
|
|
InheritAutomaticData(nsIFrame* aParent) MOZ_OVERRIDE;
|
2002-04-02 04:15:22 +00:00
|
|
|
|
2002-02-07 04:38:08 +00:00
|
|
|
NS_IMETHOD
|
2012-09-14 16:10:08 +00:00
|
|
|
TransmitAutomaticData() MOZ_OVERRIDE;
|
2002-02-07 04:38:08 +00:00
|
|
|
|
2014-02-18 07:47:48 +00:00
|
|
|
virtual nsresult
|
2013-12-02 16:50:10 +00:00
|
|
|
SetInitialChildList(ChildListID aListID,
|
|
|
|
nsFrameList& aChildList) MOZ_OVERRIDE;
|
|
|
|
|
2014-02-18 07:47:48 +00:00
|
|
|
virtual nsresult
|
2004-07-31 23:15:21 +00:00
|
|
|
Reflow(nsPresContext* aPresContext,
|
2000-01-07 14:49:46 +00:00
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
2012-09-14 16:10:08 +00:00
|
|
|
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
2000-01-07 14:49:46 +00:00
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
virtual void MarkIntrinsicWidthsDirty() MOZ_OVERRIDE;
|
2002-02-02 05:43:03 +00:00
|
|
|
|
2013-11-25 14:20:20 +00:00
|
|
|
virtual void
|
|
|
|
GetIntrinsicWidthMetrics(nsRenderingContext* aRenderingContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize) MOZ_OVERRIDE;
|
2008-02-27 10:47:43 +00:00
|
|
|
|
2014-02-18 07:47:48 +00:00
|
|
|
virtual nsresult
|
2012-08-22 15:56:38 +00:00
|
|
|
AttributeChanged(int32_t aNameSpaceID,
|
2002-02-08 00:57:39 +00:00
|
|
|
nsIAtom* aAttribute,
|
2012-09-14 16:10:08 +00:00
|
|
|
int32_t aModType) MOZ_OVERRIDE;
|
2002-02-08 00:57:39 +00:00
|
|
|
|
1999-09-21 02:12:01 +00:00
|
|
|
// This method is called by the parent frame to ask <mo>
|
|
|
|
// to stretch itself.
|
|
|
|
NS_IMETHOD
|
2011-04-08 01:04:40 +00:00
|
|
|
Stretch(nsRenderingContext& aRenderingContext,
|
1999-11-17 00:49:37 +00:00
|
|
|
nsStretchDirection aStretchDirection,
|
2000-03-28 09:38:24 +00:00
|
|
|
nsBoundingMetrics& aContainerSize,
|
2012-09-14 16:10:08 +00:00
|
|
|
nsHTMLReflowMetrics& aDesiredStretchSize) MOZ_OVERRIDE;
|
1999-09-21 02:12:01 +00:00
|
|
|
|
2013-12-02 16:50:10 +00:00
|
|
|
virtual nsresult
|
|
|
|
ChildListChanged(int32_t aModType) MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
ProcessTextData();
|
|
|
|
return nsMathMLContainerFrame::ChildListChanged(aModType);
|
|
|
|
}
|
|
|
|
|
1999-09-21 02:12:01 +00:00
|
|
|
protected:
|
2006-03-26 21:30:36 +00:00
|
|
|
nsMathMLmoFrame(nsStyleContext* aContext) : nsMathMLTokenFrame(aContext) {}
|
1999-09-21 02:12:01 +00:00
|
|
|
virtual ~nsMathMLmoFrame();
|
|
|
|
|
2000-03-28 09:38:24 +00:00
|
|
|
nsMathMLChar mMathMLChar; // Here is the MathMLChar that will deal with the operator.
|
|
|
|
nsOperatorFlags mFlags;
|
|
|
|
float mMinSize;
|
|
|
|
float mMaxSize;
|
2002-02-07 04:38:08 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool UseMathMLChar();
|
2008-03-14 04:05:43 +00:00
|
|
|
|
2002-08-16 21:36:31 +00:00
|
|
|
// overload the base method so that we can setup our nsMathMLChar
|
2013-12-02 16:50:10 +00:00
|
|
|
void ProcessTextData();
|
2002-02-07 04:38:08 +00:00
|
|
|
|
|
|
|
// helper to get our 'form' and lookup in the Operator Dictionary to fetch
|
|
|
|
// our default data that may come from there, and to complete the setup
|
|
|
|
// using attributes that we may have
|
|
|
|
void
|
2005-02-07 01:57:50 +00:00
|
|
|
ProcessOperatorData();
|
2002-04-02 04:15:22 +00:00
|
|
|
|
|
|
|
// helper to double check thar our char should be rendered as a selected char
|
2011-09-29 06:19:26 +00:00
|
|
|
bool
|
2005-02-07 01:57:50 +00:00
|
|
|
IsFrameInSelection(nsIFrame* aFrame);
|
1999-09-21 02:12:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmoFrame_h___ */
|