2
* The contents of this file are subject to the Mozilla Public
3
* License Version 1.1 (the "License"); you may not use this file
4
* except in compliance with the License. You may obtain a copy of
5
* the License at http://www.mozilla.org/MPL/
7
* Software distributed under the License is distributed on an "AS
8
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
* implied. See the License for the specific language governing
10
* rights and limitations under the License.
12
* The Original Code is Mozilla MathML Project.
14
* The Initial Developer of the Original Code is The University Of
15
* Queensland. Portions created by The University Of Queensland are
16
* Copyright (C) 1999 The University Of Queensland. All Rights Reserved.
19
* Roger B. Sidje <rbs@maths.uq.edu.au>
20
* David J. Fiddes <D.J.Fiddes@hw.ac.uk>
21
* Shyjan Mahamud <mahamud@cs.cmu.edu>
24
#ifndef nsMathMLmoFrame_h___
25
#define nsMathMLmoFrame_h___
28
#include "nsMathMLTokenFrame.h"
31
// <mo> -- operator, fence, or separator
34
class nsMathMLmoFrame : public nsMathMLTokenFrame {
36
friend nsresult NS_NewMathMLmoFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame);
38
virtual nsIAtom* GetType() const;
41
SetAdditionalStyleContext(PRInt32 aIndex,
42
nsStyleContext* aStyleContext);
43
virtual nsStyleContext*
44
GetAdditionalStyleContext(PRInt32 aIndex) const;
47
Paint(nsIPresContext* aPresContext,
48
nsIRenderingContext& aRenderingContext,
49
const nsRect& aDirtyRect,
50
nsFramePaintLayer aWhichLayer,
54
InheritAutomaticData(nsIPresContext* aPresContext,
58
TransmitAutomaticData(nsIPresContext* aPresContext);
61
Reflow(nsIPresContext* aPresContext,
62
nsHTMLReflowMetrics& aDesiredSize,
63
const nsHTMLReflowState& aReflowState,
64
nsReflowStatus& aStatus);
67
ReflowDirtyChild(nsIPresShell* aPresShell,
71
AttributeChanged(nsIPresContext* aPresContext,
77
// This method is called by the parent frame to ask <mo>
80
Stretch(nsIPresContext* aPresContext,
81
nsIRenderingContext& aRenderingContext,
82
nsStretchDirection aStretchDirection,
83
nsBoundingMetrics& aContainerSize,
84
nsHTMLReflowMetrics& aDesiredStretchSize);
88
virtual ~nsMathMLmoFrame();
90
virtual PRIntn GetSkipSides() const { return 0; }
92
nsMathMLChar mMathMLChar; // Here is the MathMLChar that will deal with the operator.
93
nsOperatorFlags mFlags;
97
// overload the base method so that we can setup our nsMathMLChar
99
ProcessTextData(nsIPresContext* aPresContext);
101
// helper to get our 'form' and lookup in the Operator Dictionary to fetch
102
// our default data that may come from there, and to complete the setup
103
// using attributes that we may have
105
ProcessOperatorData(nsIPresContext* aPresContext);
107
// helper to double check thar our char should be rendered as a selected char
109
IsFrameInSelection(nsIPresContext* aPresContext,
113
#endif /* nsMathMLmoFrame_h___ */