Back to index

lightning-sunbird  0.9+nobinonly
nsIMathMLFrame.h
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is Mozilla MathML Project.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * The University Of Queensland.
00018  * Portions created by the Initial Developer are Copyright (C) 1999
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *   Roger B. Sidje <rbs@maths.uq.edu.au>
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 //#define SHOW_BOUNDING_BOX 1
00038 #ifndef nsIMathMLFrame_h___
00039 #define nsIMathMLFrame_h___
00040 
00041 #include "nsIRenderingContext.h"
00042 #include "nsIFrame.h"
00043 
00044 struct nsPresentationData;
00045 struct nsEmbellishData;
00046 struct nsHTMLReflowMetrics;
00047 
00048 // a781ed45-4338-43cb-9739-a7a8f8418ff3
00049 #define NS_IMATHMLFRAME_IID \
00050 { 0xa781ed45, 0x4338, 0x43cb, \
00051   { 0x97, 0x39, 0xa7, 0xa8, 0xf8, 0x41, 0x8f, 0xf3 } }
00052 
00053 static NS_DEFINE_IID(kIMathMLFrameIID, NS_IMATHMLFRAME_IID);
00054 
00055 // For MathML, this 'type' will be used to determine the spacing between frames
00056 // Subclasses can return a 'type' that will give them a particular spacing
00057 enum eMathMLFrameType {
00058   eMathMLFrameType_UNKNOWN = -1,
00059   eMathMLFrameType_Ordinary,
00060   eMathMLFrameType_OperatorOrdinary,
00061   eMathMLFrameType_OperatorInvisible,
00062   eMathMLFrameType_OperatorUserDefined,
00063   eMathMLFrameType_Inner,
00064   eMathMLFrameType_ItalicIdentifier,
00065   eMathMLFrameType_UprightIdentifier,
00066   eMathMLFrameType_COUNT
00067 };
00068 
00069 // Abstract base class that provides additional methods for MathML frames
00070 class nsIMathMLFrame : public nsISupports {
00071 public:
00072   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMATHMLFRAME_IID)
00073 
00074  /* SUPPORT FOR PRECISE POSITIONING */
00075  /*====================================================================*/
00076  
00077  /* Metrics that _exactly_ enclose the text of the frame.
00078   * The frame *must* have *already* being reflowed, before you can call
00079   * the GetBoundingMetrics() method.
00080   * Note that for a frame with nested children, the bounding metrics
00081   * will exactly enclose its children. For example, the bounding metrics
00082   * of msub is the smallest rectangle that exactly encloses both the 
00083   * base and the subscript.
00084   */
00085   NS_IMETHOD
00086   GetBoundingMetrics(nsBoundingMetrics& aBoundingMetrics) = 0;
00087 
00088   NS_IMETHOD
00089   SetBoundingMetrics(const nsBoundingMetrics& aBoundingMetrics) = 0;
00090 
00091   NS_IMETHOD
00092   GetReference(nsPoint& aReference) = 0;
00093 
00094   NS_IMETHOD
00095   SetReference(const nsPoint& aReference) = 0;
00096 
00097   virtual eMathMLFrameType GetMathMLFrameType() = 0;
00098 
00099  /* SUPPORT FOR STRETCHY ELEMENTS */
00100  /*====================================================================*/
00101 
00102  /* Stretch :
00103   * Called to ask a stretchy MathML frame to stretch itself depending
00104   * on its context.
00105   *
00106   * An embellished frame is treated in a special way. When it receives a
00107   * Stretch() command, it passes the command to its embellished child and
00108   * the stretched size is bubbled up from the inner-most <mo> frame. In other
00109   * words, the stretch command descend through the embellished hierarchy.
00110   *
00111   * @param aStretchDirection [in] the direction where to attempt to
00112   *        stretch.
00113   * @param aContainerSize [in] struct that suggests the maximumn size for
00114   *        the stretched frame. Only member data of the struct that are 
00115   *        relevant to the direction are used (the rest is ignored). 
00116   * @param aDesiredStretchSize [in/out] On input the current size
00117   *        of the frame, on output the size after stretching.
00118   */
00119   NS_IMETHOD 
00120   Stretch(nsIRenderingContext& aRenderingContext,
00121           nsStretchDirection   aStretchDirection,
00122           nsBoundingMetrics&   aContainerSize,
00123           nsHTMLReflowMetrics& aDesiredStretchSize) = 0;
00124 
00125  /* Place :
00126   * This method is used before returning from Reflow(), or when a MathML frame
00127   * has just been stretched. It is called to fine-tune the positions of the elements.
00128   *
00129   * IMPORTANT: This method uses the origin of child frames (rect.x and rect.y) as
00130   * placeholders between calls: On invocation, child->GetRect(rect) should give a
00131   * rect such that rect.x holds the child's descent, rect.y holds the child's ascent, 
00132   * (rect.width should give the width, and rect.height should give the height).
00133   * The Place() method will use this information to compute the desired size
00134   * of the frame.
00135   *
00136   * @param aPlaceOrigin [in]
00137   *        If aPlaceOrigin is false, compute your desired size using the
00138   *        information in your children's rectangles. However, upon return,
00139   *        the origins of your children should keep their ascent information, i.e., 
00140   *        a child rect.x, and rect.y should still act like placeholders for the 
00141   *        child's descent and ascent. 
00142   *
00143   *        If aPlaceOrigin is true, reflow is finished. You should position all
00144   *        your children, and return your desired size. You should now convert
00145   *        the origins of your child frames into the coordinate system 
00146   *        expected by Gecko (which is relative to the upper-left
00147   *        corner of the parent) and use FinishReflowChild() on your children
00148   *        to complete post-reflow operations.
00149   *
00150   * @param aDesiredSize [out] parameter where you should return your
00151   *        desired size and your ascent/descent info. Compute your desired size 
00152   *        using the information in your children's rectangles, and include any
00153   *        space you want for border/padding in the desired size you return.  
00154   */
00155   NS_IMETHOD
00156   Place(nsIRenderingContext& aRenderingContext,
00157         PRBool               aPlaceOrigin,
00158         nsHTMLReflowMetrics& aDesiredSize) = 0;
00159 
00160  /* GetEmbellishData/SetEmbellishData :
00161   * Get/Set the mEmbellishData member variable.
00162   */
00163 
00164   NS_IMETHOD
00165   GetEmbellishData(nsEmbellishData& aEmbellishData) = 0;
00166 
00167   NS_IMETHOD
00168   SetEmbellishData(const nsEmbellishData& aEmbellishData) = 0;
00169 
00170 
00171  /* SUPPORT FOR SCRIPTING ELEMENTS */
00172  /*====================================================================*/
00173 
00174  /* GetPresentationData/SetPresentationData :
00175   * Get/Set the mPresentationData member variable.
00176   */
00177 
00178   NS_IMETHOD
00179   GetPresentationData(nsPresentationData& aPresentationData) = 0;
00180 
00181   NS_IMETHOD
00182   SetPresentationData(const nsPresentationData& aPresentationData) = 0;
00183 
00184   /* InheritAutomaticData() / TransmitAutomaticData() :
00185    * There are precise rules governing each MathML frame and its children.
00186    * Properties such as the scriptlevel or the embellished nature of a frame
00187    * depend on those rules. Also, certain properties that we use to emulate
00188    * TeX rendering rules are frame-dependent too. These two methods are meant
00189    * to be implemented by frame classes that need to assert specific properties
00190    * within their subtrees.
00191    *
00192    * InheritAutomaticData() is called in a top-down manner [like nsIFrame::Init],
00193    * as we descend the frame tree, whereas TransmitAutomaticData() is called in a
00194    * bottom-up manner, as we ascend the tree [like nsIFrame::SetInitialChildList].
00195    * However, unlike Init() and SetInitialChildList() which are called only once
00196    * during the life-time of a frame (when initially constructing the frame tree),
00197    * these two methods are called to build automatic data after the <math>...</math>
00198    * subtree has been constructed fully, and are called again as we walk a child's
00199    * subtree to handle dynamic changes that happen in the content model.
00200    *
00201    * As a rule of thumb:
00202    *
00203    * 1. Use InheritAutomaticData() to set properties related to your ancestors:
00204    *    - set properties that are intrinsic to yourself
00205    *    - set properties that depend on the state that you expect your ancestors
00206    *      to have already reached in their own InheritAutomaticData().
00207    *    - set properties that your descendants assume that you would have set in
00208    *      your InheritAutomaticData() -- this way, they can safely query them and
00209    *      the process will feed upon itself.
00210    *
00211    * 2. Use TransmitAutomaticData() to set properties related to your descendants:
00212    *    - set properties that depend on the state that you expect your descendants
00213    *      to have reached upon processing their own TransmitAutomaticData().
00214    *    - transmit properties that your descendants expect that you will transmit to
00215    *      them in your TransmitAutomaticData() -- this way, they remain up-to-date.
00216    *    - set properties that your ancestors expect that you would set in your
00217    *      TransmitAutomaticData() -- this way, they can safely query them and the
00218    *      process will feed upon itself.
00219    */
00220 
00221   NS_IMETHOD
00222   InheritAutomaticData(nsIFrame* aParent) = 0;
00223 
00224   NS_IMETHOD
00225   TransmitAutomaticData() = 0;
00226 
00227  /* UpdatePresentationData :
00228   * Increments the scriptlevel of the frame, and updates its displaystyle and
00229   * compression flags. The displaystyle flag of an environment gets updated
00230   * according to the MathML specification. A frame becomes "compressed" (or
00231   * "cramped") according to TeX rendering rules (TeXBook, Ch.17, p.140-141).
00232   *
00233   * Note that <mstyle> is the only tag which allows to set
00234   * <mstyle displaystyle="true|false" scriptlevel="[+|-]number">
00235   * to reset or increment the scriptlevel in a manual way. 
00236   * Therefore <mstyle> has its own peculiar version of this method.
00237   *
00238   * @param aScriptLevelIncrement [in]
00239   *        The value with which to increment mScriptLevel in the frame.
00240   *
00241   * @param aFlagsValues [in]
00242   *        The new values (e.g., display, compress) that are going to be
00243   *        updated.
00244   *
00245   * @param aFlagsToUpdate [in]
00246   *        The flags that are relevant to this call. Since not all calls
00247   *        are meant to update all flags at once, aFlagsToUpdate is used
00248   *        to distinguish flags that need to retain their existing values
00249   *        from flags that need to be turned on (or turned off). If a bit
00250   *        is set in aFlagsToUpdate, then the corresponding value (which
00251   *        can be 0 or 1) is taken from aFlagsValues and applied to the
00252   *        frame. Therefore, by setting their bits in aFlagsToUpdate, and
00253   *        setting their desired values in aFlagsValues, it is possible to
00254   *        update some flags in the frame, leaving the other flags unchanged.
00255   */
00256   NS_IMETHOD
00257   UpdatePresentationData(PRInt32         aScriptLevelIncrement,
00258                          PRUint32        aFlagsValues,
00259                          PRUint32        aFlagsToUpdate) = 0;
00260 
00261  /* UpdatePresentationDataFromChildAt :
00262   * Increments the scriplevel and sets the displaystyle and compression flags
00263   * on the whole tree. For child frames at aFirstIndex up to aLastIndex, this
00264   * method sets their displaystyle and compression flags, and increment their
00265   * mScriptLevel with aScriptLevelIncrement. The update is propagated down 
00266   * the subtrees of each of these child frames. 
00267   *
00268   * Note that <mstyle> is the only tag which allows
00269   * <mstyle displaystyle="true|false" scriptlevel="[+|-]number">
00270   * to reset or increment the scriptlevel in a manual way.
00271   * Therefore <mstyle> has its own peculiar version of this method.
00272   *
00273   * @param aFirstIndex [in]
00274   *        Index of the first child from where the update is propagated.
00275   *
00276   * @param aLastIndex [in]
00277   *        Index of the last child where to stop the update.
00278   *        A value of -1 means up to last existing child.
00279   *
00280   * @param aScriptLevelIncrement [in]
00281   *        The value with which to increment mScriptLevel in the whole sub-trees.
00282   *
00283   * @param aFlagsValues [in]
00284   *        The new values (e.g., display, compress) that are going to be
00285   *        assigned in the whole sub-trees.
00286   *
00287   * @param aFlagsToUpdate [in]
00288   *        The flags that are relevant to this call. See UpdatePresentationData()
00289   *        for more details about this parameter.
00290   */
00291   NS_IMETHOD
00292   UpdatePresentationDataFromChildAt(PRInt32         aFirstIndex,
00293                                     PRInt32         aLastIndex,
00294                                     PRInt32         aScriptLevelIncrement,
00295                                     PRUint32        aFlagsValues,
00296                                     PRUint32        aFlagsToUpdate) = 0;
00297 
00298  /* ReResolveScriptStyle :
00299   * During frame construction, the Style System gives us style contexts in
00300   * which the sizes of the fonts are not suitable for scripting elements.
00301   * Our expected behavior is that, when given the markup <mtag>base arguments</mtag>,
00302   * we want to render the 'base' in a normal size, and the 'arguments' in a smaller
00303   * size. This is a common functionality to tags like msub, msup, msubsup, mover,
00304   * munder, munderover, mmultiscripts. Moreover, we want the reduction of the font
00305   * size to happen in a top-down manner within the hierarchies of sub-expressions;
00306   * and more importantly, we don't want the sizes to keep decreasing up to a point
00307   * where the scripts become unreadably small.
00308   *
00309   * In general, this scaling effet arises when the scriptlevel changes between a
00310   * parent and a child. Whenever the scriptlevel changes, either automatically or
00311   * by being explicitly incremented, decremented, or set, the current font size has
00312   * to be multiplied by the predefined value of 'scriptsizemultiplier' to the power
00313   * of the change in the scriptlevel, and this scaling effect (downwards or upwards)
00314   * has to be propagated down the subtrees, with the caveat that the font size is
00315   * never allowed to go below the predefined value of 'scriptminsize' within a 
00316   * sub-expression.
00317   *
00318   * ReResolveScriptStyle() will walk a subtree to cause this mathml-specific behavior
00319   * to happen. The method is recursive and only a top-level parent wishing to reflect
00320   * the changes in its children needs to call to the method.
00321   *
00322   * This function is *very* expensive. Unfortunately, there isn't much
00323   * to do about it at the moment. For background on the problem @see 
00324   * http://groups.google.com/groups?selm=3A9192B5.D22B6C38%40maths.uq.edu.au
00325   */
00326   NS_IMETHOD
00327   ReResolveScriptStyle(PRInt32 aParentScriptLevel) = 0;
00328 };
00329 
00330 // struct used by a container frame to keep track of its embellishments.
00331 // By convention, the data that we keep here is bubbled from the embellished
00332 // hierarchy, and it remains unchanged unless we have to recover from a change
00333 // that occurs in the embellished hierarchy. The struct remains in its nil
00334 // state in those frames that are not part of the embellished hierarchy.
00335 struct nsEmbellishData {
00336   // bits used to mark certain properties of our embellishments 
00337   PRUint32 flags;
00338 
00339   // pointer on the <mo> frame at the core of the embellished hierarchy
00340   nsIFrame* coreFrame;
00341 
00342   // stretchy direction that the nsMathMLChar owned by the core <mo> supports
00343   nsStretchDirection direction;
00344 
00345   // spacing that may come from <mo> depending on its 'form'. Since
00346   // the 'form' may also depend on the position of the outermost
00347   // embellished ancestor, the set up of these values may require
00348   // looking up the position of our ancestors.
00349   nscoord leftSpace;
00350   nscoord rightSpace;
00351 
00352   nsEmbellishData() {
00353     flags = 0;
00354     coreFrame = nsnull;
00355     direction = NS_STRETCH_DIRECTION_UNSUPPORTED;
00356     leftSpace = 0;
00357     rightSpace = 0;
00358   }
00359 };
00360 
00361 // struct used by a container frame to modulate its presentation.
00362 // By convention, the data that we keep in this struct can change depending
00363 // on any of our ancestors and/or descendants. If a data can be resolved
00364 // solely from the embellished hierarchy, and it remains immutable once
00365 // resolved, we put it in |nsEmbellishData|. If it can be affected by other
00366 // things, it comes here. This struct is updated as we receive information
00367 // transmitted by our ancestors and is kept in sync with changes in our
00368 // descendants that affects us.
00369 struct nsPresentationData {
00370   // bits for: displaystyle, compressed, etc
00371   PRUint32 flags;
00372 
00373   // handy pointer on our base child (the 'nucleus' in TeX), but it may be
00374   // null here (e.g., tags like <mrow>, <mfrac>, <mtable>, etc, won't
00375   // pick a particular child in their child list to be the base)
00376   nsIFrame* baseFrame;
00377 
00378   // up-pointer on the mstyle frame, if any, that defines the scope
00379   nsIFrame* mstyle;
00380 
00381   // level of nested frames within: msub, msup, msubsup, munder,
00382   // mover, munderover, mmultiscripts, mfrac, mroot, mtable.
00383   PRInt32 scriptLevel;
00384 
00385   nsPresentationData() {
00386     flags = 0;
00387     baseFrame = nsnull;
00388     mstyle = nsnull;
00389     scriptLevel = 0;
00390   }
00391 };
00392 
00393 // ==========================================================================
00394 // Bits used for the presentation flags -- these bits are set
00395 // in their relevant situation as they become available
00396 
00397 // This bit is set if the frame is in the *context* of displaystyle=true.
00398 // Note: This doesn't mean that the frame has displaystyle=true as attribute,
00399 // <mstyle> is the only tag which allows <mstyle displaystyle="true|false">.
00400 // The bit merely tells the context of the frame. In the context of 
00401 // displaystyle="false", it is intended to slightly alter how the
00402 // rendering is done in inline mode.
00403 #define NS_MATHML_DISPLAYSTYLE                        0x00000001
00404 
00405 // This bit is used to emulate TeX rendering. 
00406 // Internal use only, cannot be set by the user with an attribute.
00407 #define NS_MATHML_COMPRESSED                          0x00000002
00408 
00409 // This bit is set if the frame will fire a vertical stretch
00410 // command on all its (non-empty) children.
00411 // Tags like <mrow> (or an inferred mrow), mpadded, etc, will fire a
00412 // vertical stretch command on all their non-empty children
00413 #define NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY     0x00000004
00414 
00415 // This bit is set if the frame will fire a horizontal stretch
00416 // command on all its (non-empty) children.
00417 // Tags like munder, mover, munderover, will fire a 
00418 // horizontal stretch command on all their non-empty children
00419 #define NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY   0x00000008
00420 
00421 // This bit is set if the frame is actually an <mstyle> frame *and* that
00422 // <mstyle> frame has an explicit attribute scriptlevel="value".
00423 // Note: the flag is not set if the <mstyle> instead has an incremental +/-value.
00424 #define NS_MATHML_MSTYLE_WITH_EXPLICIT_SCRIPTLEVEL    0x00000010
00425 
00426 // This bit is set if the frame is actually an <mstyle> *and* that
00427 // <mstyle> has an explicit attribute displaystyle="true" or "false"
00428 #define NS_MATHML_MSTYLE_WITH_DISPLAYSTYLE            0x00000020
00429 
00430 // This bit is set when the frame cannot be formatted due to an
00431 // error (e.g., invalid markup such as a <msup> without an overscript).
00432 // When set, a visual feedback will be provided to the user.
00433 #define NS_MATHML_ERROR                               0x80000000
00434 
00435 // a bit used for debug
00436 #define NS_MATHML_STRETCH_DONE                        0x20000000
00437 
00438 // This bit is used for visual debug. When set, the bounding box
00439 // of your frame is painted. This visual debug enable to ensure that
00440 // you have properly filled your mReference and mBoundingMetrics in
00441 // Place().
00442 #define NS_MATHML_SHOW_BOUNDING_METRICS               0x10000000
00443 
00444 // Macros that retrieve those bits
00445 
00446 #define NS_MATHML_IS_DISPLAYSTYLE(_flags) \
00447   (NS_MATHML_DISPLAYSTYLE == ((_flags) & NS_MATHML_DISPLAYSTYLE))
00448 
00449 #define NS_MATHML_IS_COMPRESSED(_flags) \
00450   (NS_MATHML_COMPRESSED == ((_flags) & NS_MATHML_COMPRESSED))
00451 
00452 #define NS_MATHML_WILL_STRETCH_ALL_CHILDREN_VERTICALLY(_flags) \
00453   (NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY == ((_flags) & NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY))
00454 
00455 #define NS_MATHML_WILL_STRETCH_ALL_CHILDREN_HORIZONTALLY(_flags) \
00456   (NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY == ((_flags) & NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY))
00457 
00458 #define NS_MATHML_IS_MSTYLE_WITH_DISPLAYSTYLE(_flags) \
00459   (NS_MATHML_MSTYLE_WITH_DISPLAYSTYLE == ((_flags) & NS_MATHML_MSTYLE_WITH_DISPLAYSTYLE))
00460 
00461 #define NS_MATHML_IS_MSTYLE_WITH_EXPLICIT_SCRIPTLEVEL(_flags) \
00462   (NS_MATHML_MSTYLE_WITH_EXPLICIT_SCRIPTLEVEL == ((_flags) & NS_MATHML_MSTYLE_WITH_EXPLICIT_SCRIPTLEVEL))
00463 
00464 #define NS_MATHML_HAS_ERROR(_flags) \
00465   (NS_MATHML_ERROR == ((_flags) & NS_MATHML_ERROR))
00466 
00467 #define NS_MATHML_STRETCH_WAS_DONE(_flags) \
00468   (NS_MATHML_STRETCH_DONE == ((_flags) & NS_MATHML_STRETCH_DONE))
00469 
00470 #define NS_MATHML_PAINT_BOUNDING_METRICS(_flags) \
00471   (NS_MATHML_SHOW_BOUNDING_METRICS == ((_flags) & NS_MATHML_SHOW_BOUNDING_METRICS))
00472 
00473 // ==========================================================================
00474 // Bits used for the embellish flags -- these bits are set
00475 // in their relevant situation as they become available
00476 
00477 // This bit is set if the frame is an embellished operator. 
00478 #define NS_MATHML_EMBELLISH_OPERATOR                0x00000001
00479 
00480 // This bit is set if the frame is an <mo> frame or an embellihsed
00481 // operator for which the core <mo> has movablelimits="true"
00482 #define NS_MATHML_EMBELLISH_MOVABLELIMITS           0x00000002
00483 
00484 // This bit is set if the frame is an <mo> frame or an embellihsed
00485 // operator for which the core <mo> has accent="true"
00486 #define NS_MATHML_EMBELLISH_ACCENT                  0x00000004
00487 
00488 // This bit is set if the frame is an <mover> or <munderover> with
00489 // an accent frame
00490 #define NS_MATHML_EMBELLISH_ACCENTOVER              0x00000008
00491 
00492 // This bit is set if the frame is an <munder> or <munderover> with
00493 // an accentunder frame
00494 #define NS_MATHML_EMBELLISH_ACCENTUNDER             0x00000010
00495 
00496 // Macros that retrieve those bits
00497 
00498 #define NS_MATHML_IS_EMBELLISH_OPERATOR(_flags) \
00499   (NS_MATHML_EMBELLISH_OPERATOR == ((_flags) & NS_MATHML_EMBELLISH_OPERATOR))
00500 
00501 #define NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(_flags) \
00502   (NS_MATHML_EMBELLISH_MOVABLELIMITS == ((_flags) & NS_MATHML_EMBELLISH_MOVABLELIMITS))
00503 
00504 #define NS_MATHML_EMBELLISH_IS_ACCENT(_flags) \
00505   (NS_MATHML_EMBELLISH_ACCENT == ((_flags) & NS_MATHML_EMBELLISH_ACCENT))
00506 
00507 #define NS_MATHML_EMBELLISH_IS_ACCENTOVER(_flags) \
00508   (NS_MATHML_EMBELLISH_ACCENTOVER == ((_flags) & NS_MATHML_EMBELLISH_ACCENTOVER))
00509 
00510 #define NS_MATHML_EMBELLISH_IS_ACCENTUNDER(_flags) \
00511   (NS_MATHML_EMBELLISH_ACCENTUNDER == ((_flags) & NS_MATHML_EMBELLISH_ACCENTUNDER))
00512 
00513 #endif /* nsIMathMLFrame_h___ */