1999-09-21 02:12:01 +00:00
|
|
|
/*
|
|
|
|
* The contents of this file are subject to the Mozilla Public
|
|
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS
|
|
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
* implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
|
|
|
*
|
|
|
|
* The Original Code is Mozilla MathML Project.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is The University Of
|
|
|
|
* Queensland. Portions created by The University Of Queensland are
|
|
|
|
* Copyright (C) 1999 The University Of Queensland. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
* Roger B. Sidje <rbs@maths.uq.edu.au>
|
|
|
|
*/
|
2000-03-28 10:32:09 +00:00
|
|
|
//#define SHOW_BOUNDING_BOX 1
|
1999-09-21 02:12:01 +00:00
|
|
|
#ifndef nsIMathMLFrame_h___
|
|
|
|
#define nsIMathMLFrame_h___
|
|
|
|
|
2000-01-14 08:38:25 +00:00
|
|
|
struct nsPresentationData;
|
2000-01-07 14:49:46 +00:00
|
|
|
struct nsEmbellishData;
|
1999-12-10 13:02:23 +00:00
|
|
|
typedef PRInt32 nsStretchDirection;
|
|
|
|
|
|
|
|
#define NS_STRETCH_DIRECTION_UNSUPPORTED -1
|
|
|
|
#define NS_STRETCH_DIRECTION_DEFAULT 0
|
|
|
|
#define NS_STRETCH_DIRECTION_HORIZONTAL 1
|
|
|
|
#define NS_STRETCH_DIRECTION_VERTICAL 2
|
|
|
|
|
1999-09-21 02:12:01 +00:00
|
|
|
// IID for the nsIMathMLFrame interface (the IID was taken from IIDS.h)
|
1999-10-02 09:14:57 +00:00
|
|
|
/* a6cf9113-15b3-11d2-932e-00805f8add32 */
|
|
|
|
#define NS_IMATHMLFRAME_IID \
|
|
|
|
{ 0xa6cf9113, 0x15b3, 0x11d2, \
|
1999-09-21 02:12:01 +00:00
|
|
|
{ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
|
|
|
|
|
|
|
|
static NS_DEFINE_IID(kIMathMLFrameIID, NS_IMATHMLFRAME_IID);
|
|
|
|
|
|
|
|
class nsIMathMLFrame : public nsISupports {
|
|
|
|
public:
|
|
|
|
static const nsIID& GetIID() { static nsIID iid = NS_IMATHMLFRAME_IID; return iid; }
|
|
|
|
|
1999-12-10 13:02:23 +00:00
|
|
|
/* SUPPORT FOR PRECISE POSITIONING */
|
|
|
|
/*====================================================================*/
|
1999-09-21 02:12:01 +00:00
|
|
|
|
1999-12-10 13:02:23 +00:00
|
|
|
/* Metrics that _exactly_ enclose the text of the frame.
|
|
|
|
* The frame *must* have *already* being reflowed, before you can call
|
|
|
|
* the GetBoundingMetrics() method.
|
|
|
|
* Note that for a frame with nested children, the bounding metrics
|
|
|
|
* will exactly enclose its children. For example, the bounding metrics
|
|
|
|
* of msub is the smallest rectangle that exactly encloses both the
|
|
|
|
* base and the subscript.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD
|
|
|
|
GetBoundingMetrics(nsBoundingMetrics& aBoundingMetrics) = 0;
|
|
|
|
|
|
|
|
NS_IMETHOD
|
|
|
|
SetBoundingMetrics(const nsBoundingMetrics& aBoundingMetrics) = 0;
|
2000-01-07 14:49:46 +00:00
|
|
|
|
1999-12-10 13:02:23 +00:00
|
|
|
NS_IMETHOD
|
|
|
|
GetReference(nsPoint& aReference) = 0;
|
|
|
|
|
|
|
|
NS_IMETHOD
|
|
|
|
SetReference(const nsPoint& aReference) = 0;
|
2000-01-07 14:49:46 +00:00
|
|
|
|
1999-12-10 13:02:23 +00:00
|
|
|
|
1999-09-21 02:12:01 +00:00
|
|
|
/* SUPPORT FOR STRETCHY ELEMENTS: <mo> */
|
|
|
|
/*====================================================================*/
|
|
|
|
|
1999-10-02 06:20:30 +00:00
|
|
|
/* Stretch :
|
1999-12-10 13:02:23 +00:00
|
|
|
* Called to ask a stretchy MathML frame to stretch itself depending
|
|
|
|
* on its context.
|
|
|
|
*
|
|
|
|
* @param aStretchDirection [in] the direction where to attempt to
|
|
|
|
* stretch.
|
|
|
|
* @param aContainerSize [in] struct that suggests the maximumn size for
|
|
|
|
* the stretched frame. Only member data of the struct that are
|
|
|
|
* relevant to the direction are used (the rest is ignored).
|
|
|
|
* @param aDesiredStretchSize [in/out] On input the current size
|
2000-03-28 09:38:24 +00:00
|
|
|
* of the frame, on output the size after stretching.
|
1999-09-21 02:12:01 +00:00
|
|
|
*/
|
|
|
|
NS_IMETHOD
|
1999-11-24 06:03:41 +00:00
|
|
|
Stretch(nsIPresContext* aPresContext,
|
1999-11-17 00:49:37 +00:00
|
|
|
nsIRenderingContext& aRenderingContext,
|
|
|
|
nsStretchDirection aStretchDirection,
|
2000-03-28 09:38:24 +00:00
|
|
|
nsBoundingMetrics& aContainerSize,
|
|
|
|
nsHTMLReflowMetrics& aDesiredStretchSize) = 0;
|
1999-12-10 13:02:23 +00:00
|
|
|
|
|
|
|
#if 0
|
|
|
|
NS_IMETHOD
|
|
|
|
GetDesiredStretchSize(nsIPresContext* aPresContext,
|
|
|
|
nsIRenderingContext& aRenderingContext,
|
2000-05-16 13:15:15 +00:00
|
|
|
nsBoundingMetrics& aDesiredStretchSize) = 0;
|
1999-12-10 13:02:23 +00:00
|
|
|
#endif
|
|
|
|
/* Place :
|
|
|
|
* This method is used before returning from Reflow(), or when a MathML frame
|
|
|
|
* has just been stretched. It is called to fine-tune the positions of the elements.
|
|
|
|
*
|
|
|
|
* IMPORTANT: This method uses the origin of child frames (rect.x and rect.y) as
|
|
|
|
* placeholders between calls: On invocation, child->GetRect(rect) should give a
|
|
|
|
* rect such that rect.x holds the child's descent, rect.y holds the child's ascent,
|
|
|
|
* (rect.width should give the width, and rect.height should give the height).
|
|
|
|
* The Place() method will use this information to compute the desired size
|
|
|
|
* of the frame.
|
|
|
|
*
|
|
|
|
* @param aPlaceOrigin [in]
|
|
|
|
* If aPlaceOrigin is false, compute your desired size using the
|
|
|
|
* information in your children's rectangles. However, upon return,
|
|
|
|
* the origins of your children should keep their ascent information, i.e.,
|
|
|
|
* a child rect.x, and rect.y should still act like placeholders for the
|
|
|
|
* child's descent and ascent.
|
|
|
|
*
|
|
|
|
* If aPlaceOrigin is true, reflow is finished. You should position all
|
|
|
|
* your children, and return your desired size. You should now convert
|
|
|
|
* the origins of your child frames into the coordinate system
|
|
|
|
* expected by Gecko (which is relative to the upper-left
|
|
|
|
* corner of the parent) and use FinishReflowChild() on your children
|
|
|
|
* to complete post-reflow operations.
|
|
|
|
*
|
|
|
|
* @param aDesiredSize [out] parameter where you should return your
|
|
|
|
* desired size and your ascent/descent info. Compute your desired size
|
|
|
|
* using the information in your children's rectangles, and include any
|
|
|
|
* space you want for border/padding in the desired size you return.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD
|
|
|
|
Place(nsIPresContext* aPresContext,
|
|
|
|
nsIRenderingContext& aRenderingContext,
|
|
|
|
PRBool aPlaceOrigin,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize) = 0;
|
|
|
|
|
|
|
|
/* EmbellishOperator :
|
|
|
|
* Call this method to probe and set a frame as an "embellished operator".
|
|
|
|
* Calls must be bottom up. The method will set the frame as an
|
|
|
|
* "embellished operator" if the frame satisfies the definition of
|
|
|
|
* the MathML REC. Conversely, it will set the frame as
|
|
|
|
* non-embellished if it is not an "embellished operator".
|
|
|
|
*
|
|
|
|
* Note that this method must only be called from tags who *can* be
|
|
|
|
* embellished operators.
|
|
|
|
*
|
|
|
|
* The MathML REC precisely defines an "embellished operator" as:
|
|
|
|
* - an <mo> element;
|
|
|
|
* - or one of the elements <msub>, <msup>, <msubsup>, <munder>, <mover>,
|
|
|
|
* <munderover>, <mmultiscripts>, <mfrac>, or <semantics>, whose first
|
|
|
|
* argument exists and is an embellished operator;
|
|
|
|
* - or one of the elements <mstyle>, <mphantom>, or <mpadded>, such that
|
|
|
|
* an <mrow> containing the same arguments would be an embellished
|
|
|
|
* operator;
|
|
|
|
* - or an <maction> element whose selected subexpression exists and is an
|
|
|
|
* embellished operator;
|
|
|
|
* - or an <mrow> whose arguments consist (in any order) of one embellished
|
|
|
|
* operator and zero or more spacelike elements.
|
|
|
|
*
|
|
|
|
* When an embellished frame receives a Stretch() command, it passes the
|
|
|
|
* command to its first child and the stretched size is bubbled up from the
|
|
|
|
* inner-most <mo> frame.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD
|
|
|
|
EmbellishOperator() = 0;
|
|
|
|
|
2000-01-07 14:49:46 +00:00
|
|
|
/* GetEmbellishData/SetEmbellishData :
|
2000-01-14 08:38:25 +00:00
|
|
|
* Get/Set the mEmbellishData member variable.
|
1999-12-10 13:02:23 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
NS_IMETHOD
|
2000-01-07 14:49:46 +00:00
|
|
|
GetEmbellishData(nsEmbellishData& aEmbellishData) = 0;
|
1999-12-10 13:02:23 +00:00
|
|
|
|
|
|
|
NS_IMETHOD
|
2000-01-07 14:49:46 +00:00
|
|
|
SetEmbellishData(const nsEmbellishData& aEmbellishData) = 0;
|
1999-09-21 02:12:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* SUPPORT FOR SCRIPTING ELEMENTS: */
|
|
|
|
/*====================================================================*/
|
|
|
|
|
2000-01-14 08:38:25 +00:00
|
|
|
/* GetPresentationData/SetPresentationData :
|
|
|
|
* Get/Set the mPresentationData member variable.
|
1999-10-02 06:20:30 +00:00
|
|
|
*/
|
2000-01-14 08:38:25 +00:00
|
|
|
|
|
|
|
NS_IMETHOD
|
|
|
|
GetPresentationData(nsPresentationData& aPresentationData) = 0;
|
|
|
|
|
1999-09-21 02:12:01 +00:00
|
|
|
NS_IMETHOD
|
2000-01-14 08:38:25 +00:00
|
|
|
SetPresentationData(const nsPresentationData& aPresentationData) = 0;
|
1999-09-21 02:12:01 +00:00
|
|
|
|
|
|
|
/* UpdatePresentationData :
|
2000-03-28 09:38:24 +00:00
|
|
|
* Increments the scriptlevel of the frame, and
|
|
|
|
* sets its displaystyle and compression flags.
|
1999-09-21 02:12:01 +00:00
|
|
|
* Note that <mstyle> is the only tag which allows to set
|
|
|
|
* <mstyle displaystyle="true|false" scriptlevel="[+|-]number">
|
1999-12-10 13:02:23 +00:00
|
|
|
* to reset or increment the scriptlevel in a manual way.
|
2000-03-28 09:38:24 +00:00
|
|
|
* Therefore <mstyle> has its own peculiar version of this method.
|
1999-09-21 02:12:01 +00:00
|
|
|
*/
|
|
|
|
NS_IMETHOD
|
|
|
|
UpdatePresentationData(PRInt32 aScriptLevelIncrement,
|
2000-03-28 09:38:24 +00:00
|
|
|
PRBool aDisplayStyle,
|
|
|
|
PRBool aCompressed) = 0;
|
1999-09-21 02:12:01 +00:00
|
|
|
|
|
|
|
/* UpdatePresentationDataFromChildAt :
|
2000-03-28 09:38:24 +00:00
|
|
|
* Increments the scriplevel and
|
|
|
|
* sets the displaystyle and compression flags on the whole tree.
|
|
|
|
* For child frames at: aIndex, aIndex+1, aIndex+2, etc, this method sets
|
|
|
|
* their displaystyle and compressed flags, and increment their mScriptLevel
|
1999-09-21 02:12:01 +00:00
|
|
|
* with aScriptLevelIncrement. The increment is propagated down to the
|
|
|
|
* subtrees of each of these child frames. Note that <mstyle> is the only
|
2000-01-07 14:49:46 +00:00
|
|
|
* tag which allows <mstyle displaystyle="true|false" scriptlevel="[+|-]number">
|
1999-09-21 02:12:01 +00:00
|
|
|
* to reset or increment the scriptlevel in a manual way. Therefore <mstyle>
|
|
|
|
* has its own peculiar version of this method.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD
|
|
|
|
UpdatePresentationDataFromChildAt(PRInt32 aIndex,
|
|
|
|
PRInt32 aScriptLevelIncrement,
|
2000-03-28 09:38:24 +00:00
|
|
|
PRBool aDisplayStyle,
|
|
|
|
PRBool aCompressed) = 0;
|
1999-12-10 13:02:23 +00:00
|
|
|
};
|
|
|
|
|
2000-01-14 08:38:25 +00:00
|
|
|
// struct used by a frame to modulate its presentation
|
|
|
|
struct nsPresentationData {
|
|
|
|
PRUint32 flags; // bits for: displaystyle, compressed, etc
|
|
|
|
nsIFrame* mstyle; // up-pointer on the mstyle frame, if any, that defines the scope
|
|
|
|
PRUint32 scriptLevel; // Relevant to nested frames within: msub, msup, msubsup, munder,
|
|
|
|
// mover, munderover, mmultiscripts, mfrac, mroot, mtable.
|
|
|
|
nsPresentationData()
|
|
|
|
{
|
|
|
|
flags = 0;
|
|
|
|
mstyle = nsnull;
|
|
|
|
scriptLevel = 0;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2000-01-07 14:49:46 +00:00
|
|
|
// struct used by an embellished container to keep track of its embellished child
|
|
|
|
struct nsEmbellishData {
|
|
|
|
PRUint32 flags;
|
|
|
|
nsIFrame* firstChild; // handy pointer on our embellished child
|
|
|
|
nsIFrame* core; // pointer on the mo frame at the core of the embellished hierarchy
|
|
|
|
nsStretchDirection direction;
|
2000-03-28 09:38:24 +00:00
|
|
|
float leftSpace, rightSpace;
|
2000-01-07 14:49:46 +00:00
|
|
|
|
|
|
|
nsEmbellishData()
|
|
|
|
{
|
|
|
|
flags = 0;
|
|
|
|
firstChild = nsnull;
|
|
|
|
core = nsnull;
|
|
|
|
direction = NS_STRETCH_DIRECTION_UNSUPPORTED;
|
2000-03-28 09:38:24 +00:00
|
|
|
leftSpace = rightSpace = 0.0f;
|
2000-01-07 14:49:46 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2000-01-14 08:38:25 +00:00
|
|
|
// -------------
|
|
|
|
// Bits used for the presentation flags -- these bits are set
|
|
|
|
// in their relevant situation as they become available
|
|
|
|
|
|
|
|
// This bit is set if the frame is in the *context* of displaystyle=true.
|
|
|
|
// Note: This doesn't mean that the frame has displaystyle=true as attribute,
|
|
|
|
// <mstyle> is the only tag which allows <mstyle displaystyle="true|false">.
|
|
|
|
// The bit merely tells the context of the frame. In the context of
|
|
|
|
// displaystyle="false", it is intended to slightly alter how the
|
|
|
|
// rendering is done in inline mode.
|
|
|
|
#define NS_MATHML_DISPLAYSTYLE 0x00000001
|
|
|
|
|
|
|
|
// This bit is used to emulate TeX rendering.
|
|
|
|
// Internal use only, cannot be set by the user with an attribute.
|
|
|
|
#define NS_MATHML_COMPRESSED 0x00000002
|
|
|
|
|
|
|
|
// This bit is set if the frame is actually an <mstyle> frame *and* that
|
|
|
|
// <mstyle> frame has an explicit attribute scriptlevel="value".
|
|
|
|
// Note: the flag is not set if the <mstyle> instead has an incremental +/-value.
|
|
|
|
#define NS_MATHML_MSTYLE_WITH_EXPLICIT_SCRIPTLEVEL 0x00000004
|
|
|
|
|
|
|
|
// This bit is set if the frame is actually an <mstyle> *and* that
|
|
|
|
// <mstyle> has an explicit attribute displaystyle="true" or "false"
|
|
|
|
#define NS_MATHML_MSTYLE_WITH_DISPLAYSTYLE 0x00000008
|
|
|
|
|
|
|
|
// This bit is set if the frame is an <mover> or <munderover> with
|
|
|
|
// an accent frame
|
|
|
|
#define NS_MATHML_ACCENTOVER 0x00000010
|
|
|
|
|
|
|
|
// This bit is set if the frame is an <munder> or <munderover> with
|
|
|
|
// an accentunder frame
|
|
|
|
#define NS_MATHML_ACCENTUNDER 0x00000020
|
|
|
|
|
2000-03-28 09:38:24 +00:00
|
|
|
// This bit is set if the frame is an <mover>, <munder> or <munderover>
|
2000-01-14 08:38:25 +00:00
|
|
|
// whose base frame is a <mo> frame (or an embellished container with
|
|
|
|
// a core <mo>) for which the movablelimits attribute is set to true
|
|
|
|
#define NS_MATHML_MOVABLELIMITS 0x00000040
|
|
|
|
|
2000-03-28 09:38:24 +00:00
|
|
|
// This bit is set when the frame cannot be formatted due to an
|
|
|
|
// error (e.g., invalid markup such as a <msup> without an overscript).
|
|
|
|
// When set, a visual feedback will be provided to the user.
|
|
|
|
#define NS_MATHML_ERROR 0x80000000
|
|
|
|
|
2000-01-18 04:35:37 +00:00
|
|
|
// This bit is used for visual debug. When set, the bounding box
|
2000-03-28 09:38:24 +00:00
|
|
|
// of your frame is painted. This visual debug enable to ensure that
|
|
|
|
// you have properly filled your mReference and mBoundingMetrics in
|
2000-01-18 04:35:37 +00:00
|
|
|
// Place().
|
2000-03-28 09:38:24 +00:00
|
|
|
#define NS_MATHML_SHOW_BOUNDING_METRICS 0x40000000
|
2000-01-18 04:35:37 +00:00
|
|
|
|
2000-01-14 08:38:25 +00:00
|
|
|
// Macros that retrieve those bits
|
|
|
|
#define NS_MATHML_IS_DISPLAYSTYLE(_flags) \
|
|
|
|
(NS_MATHML_DISPLAYSTYLE == ((_flags) & NS_MATHML_DISPLAYSTYLE))
|
|
|
|
|
|
|
|
#define NS_MATHML_IS_COMPRESSED(_flags) \
|
|
|
|
(NS_MATHML_COMPRESSED == ((_flags) & NS_MATHML_COMPRESSED))
|
|
|
|
|
|
|
|
#define NS_MATHML_IS_MSTYLE_WITH_DISPLAYSTYLE(_flags) \
|
|
|
|
(NS_MATHML_MSTYLE_WITH_DISPLAYSTYLE == ((_flags) & NS_MATHML_MSTYLE_WITH_DISPLAYSTYLE))
|
|
|
|
|
|
|
|
#define NS_MATHML_IS_MSTYLE_WITH_EXPLICIT_SCRIPTLEVEL(_flags) \
|
|
|
|
(NS_MATHML_MSTYLE_WITH_EXPLICIT_SCRIPTLEVEL == ((_flags) & NS_MATHML_MSTYLE_WITH_EXPLICIT_SCRIPTLEVEL))
|
|
|
|
|
|
|
|
#define NS_MATHML_IS_ACCENTOVER(_flags) \
|
|
|
|
(NS_MATHML_ACCENTOVER == ((_flags) & NS_MATHML_ACCENTOVER))
|
|
|
|
|
|
|
|
#define NS_MATHML_IS_ACCENTUNDER(_flags) \
|
|
|
|
(NS_MATHML_ACCENTUNDER == ((_flags) & NS_MATHML_ACCENTUNDER))
|
|
|
|
|
|
|
|
#define NS_MATHML_IS_MOVABLELIMITS(_flags) \
|
|
|
|
(NS_MATHML_MOVABLELIMITS == ((_flags) & NS_MATHML_MOVABLELIMITS))
|
|
|
|
|
2000-03-28 09:38:24 +00:00
|
|
|
#define NS_MATHML_HAS_ERROR(_flags) \
|
|
|
|
(NS_MATHML_ERROR == ((_flags) & NS_MATHML_ERROR))
|
|
|
|
|
2000-01-18 04:35:37 +00:00
|
|
|
#define NS_MATHML_PAINT_BOUNDING_METRICS(_flags) \
|
|
|
|
(NS_MATHML_SHOW_BOUNDING_METRICS == ((_flags) & NS_MATHML_SHOW_BOUNDING_METRICS))
|
|
|
|
|
2000-01-07 14:49:46 +00:00
|
|
|
// --------------
|
2000-01-14 08:38:25 +00:00
|
|
|
// Bits used for the embellish flags -- these bits are set
|
|
|
|
// in their relevant situation as they become available
|
|
|
|
|
|
|
|
// This bit is set if the frame is an embellished operator.
|
2000-03-28 09:38:24 +00:00
|
|
|
#define NS_MATHML_EMBELLISH_OPERATOR 0x00000001
|
2000-01-14 08:38:25 +00:00
|
|
|
|
2000-03-28 09:38:24 +00:00
|
|
|
// This bit is set if the frame will fire a vertical stretch
|
|
|
|
// command on all its (non-empty) children.
|
|
|
|
// Tags like <mrow> (or an inferred mrow), mpadded, etc, will fire a
|
|
|
|
// vertical stretch command on all their non-empty children
|
|
|
|
#define NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY 0x00000002
|
2000-01-14 08:38:25 +00:00
|
|
|
|
2000-03-28 09:38:24 +00:00
|
|
|
// This bit is set if the frame will fire a horizontal stretch
|
|
|
|
// command on all its (non-empty) children.
|
|
|
|
// Tags like munder, mover, munderover, will fire a
|
|
|
|
// horizontal stretch command on all their non-empty children
|
|
|
|
#define NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY 0x00000004
|
2000-01-14 08:38:25 +00:00
|
|
|
|
|
|
|
// This bit is set if the frame is an <mo> frame that should behave
|
2000-03-28 09:38:24 +00:00
|
|
|
// like an accent XXX since it is <mo> specific, use NS_MATHML_EMBELLISH_MO_ACCENT instead?
|
|
|
|
#define NS_MATHML_EMBELLISH_ACCENT 0x00000008
|
2000-01-07 14:49:46 +00:00
|
|
|
|
2000-01-14 08:38:25 +00:00
|
|
|
// This bit is set if the frame is an <mo> frame with the movablelimits
|
2000-03-28 09:38:24 +00:00
|
|
|
// attribute set to true XXX since it is <mo> specific, use NS_MATHML_EMBELLISH_MO_MOVABLELIMITS instead?
|
|
|
|
#define NS_MATHML_EMBELLISH_MOVABLELIMITS 0x00000010
|
1999-12-10 13:02:23 +00:00
|
|
|
|
2000-01-14 08:38:25 +00:00
|
|
|
// a bit used for debug
|
2000-03-28 09:38:24 +00:00
|
|
|
#define NS_MATHML_STRETCH_DONE 0x80000000
|
1999-12-10 13:02:23 +00:00
|
|
|
|
2000-01-14 08:38:25 +00:00
|
|
|
|
|
|
|
// Macros that retrieve those bits
|
1999-12-10 13:02:23 +00:00
|
|
|
|
|
|
|
#define NS_MATHML_IS_EMBELLISH_OPERATOR(_flags) \
|
|
|
|
(NS_MATHML_EMBELLISH_OPERATOR == ((_flags) & NS_MATHML_EMBELLISH_OPERATOR))
|
|
|
|
|
2000-03-28 09:38:24 +00:00
|
|
|
#define NS_MATHML_WILL_STRETCH_ALL_CHILDREN_VERTICALLY(_flags) \
|
|
|
|
(NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY == ((_flags) & NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY))
|
1999-12-10 13:02:23 +00:00
|
|
|
|
2000-03-28 09:38:24 +00:00
|
|
|
#define NS_MATHML_WILL_STRETCH_ALL_CHILDREN_HORIZONTALLY(_flags) \
|
|
|
|
(NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY == ((_flags) & NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY))
|
1999-12-10 13:02:23 +00:00
|
|
|
|
2000-01-14 08:38:25 +00:00
|
|
|
#define NS_MATHML_STRETCH_WAS_DONE(_flags) \
|
|
|
|
(NS_MATHML_STRETCH_DONE == ((_flags) & NS_MATHML_STRETCH_DONE))
|
|
|
|
|
|
|
|
#define NS_MATHML_EMBELLISH_IS_ACCENT(_flags) \
|
|
|
|
(NS_MATHML_EMBELLISH_ACCENT == ((_flags) & NS_MATHML_EMBELLISH_ACCENT))
|
|
|
|
|
|
|
|
#define NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(_flags) \
|
|
|
|
(NS_MATHML_EMBELLISH_MOVABLELIMITS == ((_flags) & NS_MATHML_EMBELLISH_MOVABLELIMITS))
|
|
|
|
|
1999-09-21 02:12:01 +00:00
|
|
|
#endif /* nsIMathMLFrame_h___ */
|