/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* 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/. */
namespace mozilla { class nsDisplayListBuilder; class nsDisplayListSet;
} // namespace mozilla
// Concrete base class with default methods that derived MathML frames can // override class nsMathMLFrame : public nsIMathMLFrame { public: // nsIMathMLFrame ---
// helper to get the mEmbellishData of a frame // 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. staticvoid GetEmbellishDataFrom(nsIFrame* aFrame,
nsEmbellishData& aEmbellishData);
// helper to get the presentation data of a frame. If aClimbTree is // set to true and the frame happens to be surrounded by non-MathML // helper frames needed for its support, we walk up the frame hierarchy // until we reach a MathML ancestor or the <root> math element. staticvoid GetPresentationDataFrom(nsIFrame* aFrame,
nsPresentationData& aPresentationData, bool aClimbTree = true);
// utilities to parse and retrieve numeric values in CSS units // All values are stored in twips. // @pre aLengthValue is the default length value of the attribute. // @post aLengthValue is the length value computed from the attribute. staticvoid ParseNumericValue(const nsString& aString, nscoord* aLengthValue,
uint32_t aFlags, nsPresContext* aPresContext,
mozilla::ComputedStyle* aComputedStyle, float aFontSizeInflation);
staticvoid GetEmHeight(nsFontMetrics* fm, nscoord& emHeight) { #if 0 // should switch to this API in order to scale with changes of TextZoom
emHeight = fm->EmHeight(); #else
emHeight = fm->Font().size.ToAppUnits(); #endif
}
// Some parameters are not accurately obtained using the x-height. // Here are some slower variants to obtain the desired metrics // by actually measuring some characters staticvoid GetRuleThickness(mozilla::gfx::DrawTarget* aDrawTarget,
nsFontMetrics* aFontMetrics,
nscoord& aRuleThickness);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.