Logo Search packages:      
Sourcecode: xulrunner-1.9 version File versions  Download package

nsIFrame Class Reference

#include <nsIFrame.h>

Inheritance diagram for nsIFrame:

nsISupports nsFrame nsBulletFrame nsLeafFrame nsFormControlFrame nsContainerFrame nsPlaceholderFrame ViewportFrame nsDeckFrame nsGridRowGroupFrame nsGridRowLeafFrame nsStackFrame nsXULScrollFrame CanvasFrame nsHTMLScrollFrame nsTableCellFrame nsTableColGroupFrame nsTableFrame nsTableOuterFrame nsTableRowFrame nsTableRowGroupFrame

List of all members.

Detailed Description

A frame in the layout model. This interface is supported by all frame objects.

Frames can have multiple child lists: the default unnamed child list (referred to as the principal child list, and additional named child lists. There is an ordering of frames within a child list, but there is no order defined between frames in different child lists of the same parent frame.

Frames are NOT reference counted. Use the Destroy() member function to destroy a frame. The lifetime of the frame hierarchy is bounded by the lifetime of the presentation shell which owns the frames.

nsIFrame is a private Gecko interface. If you are not Gecko then you should not use it. If you're not in layout, then you won't be able to link to many of the functions defined here. Too bad.

If you're not in layout but you must call functions in here, at least restrict yourself to calling virtual methods, which won't hurt you as badly.

Definition at line 461 of file nsIFrame.h.

Public Types

enum  {
  eMathML = 1 << 0, eSVG = 1 << 1, eSVGForeignObject = 1 << 2, eBidiInlineContainer = 1 << 3,
  eReplaced = 1 << 4, eReplacedContainsBlock = 1 << 5, eLineParticipant = 1 << 6, eXULBox = 1 << 7,
  eCanContainOverflowContainers = 1 << 8, eBlockFrame = 1 << 9, eDEBUGAllFrames = 1 << 30, eDEBUGNoFrames = 1 << 31
enum  Halignment { hAlign_Left, hAlign_Right, hAlign_Center }
enum  Valignment { vAlign_Top, vAlign_Middle, vAlign_BaseLine, vAlign_Bottom }

Public Member Functions

virtual void AddInlineMinWidth (nsIRenderingContext *aRenderingContext, InlineMinWidthData *aData)=0
virtual void AddInlinePrefWidth (nsIRenderingContext *aRenderingContext, InlinePrefWidthData *aData)=0
void AddStateBits (nsFrameState aBits)
virtual void AdjustOffsetsForBidi (PRInt32 aStart, PRInt32 aEnd)
NS_IMETHOD AppendFrames (nsIAtom *aListName, nsIFrame *aFrameList)=0
void ApplySkipSides (nsMargin &aMargin) const
virtual PRBool AreAncestorViewsVisible () const
NS_IMETHOD AttributeChanged (PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType)=0
NS_IMETHOD BuildDisplayList (nsDisplayListBuilder *aBuilder, const nsRect &aDirtyRect, const nsDisplayListSet &aLists)
nsresult BuildDisplayListForChild (nsDisplayListBuilder *aBuilder, nsIFrame *aChild, const nsRect &aDirtyRect, const nsDisplayListSet &aLists, PRUint32 aFlags=0)
nsresult BuildDisplayListForStackingContext (nsDisplayListBuilder *aBuilder, const nsRect &aDirtyRect, nsDisplayList *aList)
virtual PRBool CachedIsEmpty ()
virtual PRBool CanContinueTextRun () const =0
NS_IMETHOD CaptureMouse (nsPresContext *aPresContext, PRBool aGrabMouseEvents)=0
NS_IMETHOD CharacterDataChanged (nsPresContext *aPresContext, nsIContent *aChild, PRBool aAppend)=0
void CheckInvalidateSizeChange (const nsRect &aOldRect, const nsRect &aOldOverflowRect, nsHTMLReflowMetrics &aNewDesiredSize)
NS_IMETHOD CheckVisibility (nsPresContext *aContext, PRInt32 aStartIndex, PRInt32 aEndIndex, PRBool aRecurse, PRBool *aFinished, PRBool *_retval)=0
virtual void ChildIsDirty (nsIFrame *aChild)=0
virtual PRBool ChildrenMustHaveWidgets () const
nsresult Clip (nsDisplayListBuilder *aBuilder, const nsDisplayListSet &aFromSet, const nsDisplayListSet &aToSet, const nsRect &aClipRect)
virtual nsSize ComputeSize (nsIRenderingContext *aRenderingContext, nsSize aCBSize, nscoord aAvailableWidth, nsSize aMargin, nsSize aBorder, nsSize aPadding, PRBool aShrinkWrap)=0
virtual nsRect ComputeTightBounds (gfxContext *aContext) const
virtual nsresult CreateWidgetForView (nsIView *aView)
virtual void Destroy ()=0
NS_IMETHOD DidReflow (nsPresContext *aPresContext, const nsHTMLReflowState *aReflowState, nsDidReflowStatus aStatus)=0
NS_IMETHOD DidSetStyleContext ()=0
nsresult DisplayCaret (nsDisplayListBuilder *aBuilder, const nsRect &aDirtyRect, const nsDisplayListSet &aLists)
void FinishAndStoreOverflow (nsHTMLReflowMetrics *aMetrics)
void FinishAndStoreOverflow (nsRect *aOverflowArea, nsSize aNewSize)
PRBool GetAbsPosClipRect (const nsStyleDisplay *aDisp, nsRect *aRect, const nsSize &aSize)
virtual nsIAtom * GetAdditionalChildListName (PRInt32 aIndex) const =0
virtual nsStyleContext * GetAdditionalStyleContext (PRInt32 aIndex) const =0
nsIFrameGetAncestorWithView () const
virtual nsIFrameGetAncestorWithViewExternal () const
virtual nscoord GetBaseline () const =0
NS_IMETHOD GetBorder (nsMargin &aBorder)=0
NS_IMETHOD GetBorderAndPadding (nsMargin &aBorderAndPadding)
virtual nscoord GetBoxAscent (nsBoxLayoutState &aBoxLayoutState)=0
nsIBox * GetChildBox () const
NS_IMETHOD GetChildFrameContainingOffset (PRInt32 inContentOffset, PRBool inHint, PRInt32 *outFrameContentOffset, nsIFrame **outChildFrame)=0
nsIViewGetClosestView (nsPoint *aOffset=nsnull) const
const nsFrameSelectionGetConstFrameSelection ()
nsIContentGetContent () const
NS_IMETHOD GetContentForEvent (nsPresContext *aPresContext, nsEvent *aEvent, nsIContent **aContent)=0
virtual nsIFrameGetContentInsertionFrame ()
ContentOffsets GetContentOffsetsFromPoint (nsPoint aPoint, PRBool aIgnoreSelectionStyle=PR_FALSE)
virtual ContentOffsets GetContentOffsetsFromPointExternal (nsPoint aPoint, PRBool aIgnoreSelectionStyle=PR_FALSE)
nsRect GetContentRect () const
NS_IMETHOD GetCursor (const nsPoint &aPoint, Cursor &aCursor)=0
nsPeekOffsetStruct GetExtremeCaretPosition (PRBool aStart)
virtual nsIFrameGetFirstChild (nsIAtom *aListName) const =0
virtual nsIFrameGetFirstContinuation () const
virtual nsIFrameGetFirstInFlow () const
virtual nscoord GetFlex (nsBoxLayoutState &aBoxLayoutState)=0
nsresult GetFrameFromDirection (nsDirection aDirection, PRBool aVisual, PRBool aJumpLines, PRBool aScrollViewStop, nsIFrame **aOutFrame, PRInt32 *aOutOffset, PRBool *aOutJumpedLine)
< nsFrameSelection
GetFrameSelection ()
virtual Halignment GetHAlign () const =0
virtual nsSize GetIntrinsicRatio ()=0
virtual IntrinsicSize GetIntrinsicSize ()=0
virtual nsIFrameGetLastContinuation () const
virtual nsIFrameGetLastInFlow () const
NS_IMETHOD GetLayoutManager (nsIBoxLayout **aLayout)=0
NS_IMETHOD GetMargin (nsMargin &aMargin)=0
nsRect GetMarginRect () const
virtual nsSize GetMaxSize (nsBoxLayoutState &aBoxLayoutState)=0
virtual nsSize GetMinSize (nsBoxLayoutState &aBoxLayoutState)=0
virtual nsSize GetMinSizeForScrollArea (nsBoxLayoutState &aBoxLayoutState)=0
virtual nscoord GetMinWidth (nsIRenderingContext *aRenderingContext)=0
virtual nsIViewGetMouseCapturer () const
virtual PRBool GetMouseThrough () const =0
nsIBox * GetNextBox () const
virtual nsIFrameGetNextContinuation () const =0
nsIFrameGetNextInFlow () const
virtual nsIFrameGetNextInFlowVirtual () const =0
nsIFrameGetNextSibling () const
NS_IMETHOD GetOffsetFromView (nsPoint &aOffset, nsIView **aView) const =0
NS_IMETHOD GetOffsets (PRInt32 &start, PRInt32 &end) const =0
nsPoint GetOffsetTo (const nsIFrame *aOther) const
virtual nsPoint GetOffsetToExternal (const nsIFrame *aOther) const
PRUint32 GetOrdinal (nsBoxLayoutState &aBoxLayoutState)
NS_IMETHOD GetOriginToViewOffset (nsPoint &aOffset, nsIView **aView) const =0
nsRect GetOverflowRect () const
NS_IMETHOD GetPadding (nsMargin &aBorderAndPadding)=0
nsRect GetPaddingRect () const
nsIFrameGetParent () const
nsIBox * GetParentBox () const
NS_IMETHOD GetParentStyleContextFrame (nsPresContext *aPresContext, nsIFrame **aProviderFrame, PRBool *aIsChild)=0
virtual nsIViewGetParentViewForChildFrame (nsIFrame *aFrame) const
NS_IMETHOD GetPointFromOffset (PRInt32 inOffset, nsPoint *outPoint)=0
nsPoint GetPosition () const
nsPoint GetPositionIgnoringScrolling ()
virtual nsPoint GetPositionOfChildIgnoringScrolling (nsIFrame *aChild)
virtual nsSize GetPrefSize (nsBoxLayoutState &aBoxLayoutState)=0
virtual nscoord GetPrefWidth (nsIRenderingContext *aRenderingContext)=0
virtual nsIFrameGetPrevContinuation () const =0
nsIFrameGetPrevInFlow () const
virtual nsIFrameGetPrevInFlowVirtual () const =0
nsRect GetRect () const
nsPoint GetRelativeOffset (const nsStyleDisplay *aDisplay=nsnull) const
virtual nsresult GetRenderedText (nsAString *aAppendToString=nsnull, gfxSkipChars *aSkipChars=nsnull, gfxSkipCharsIterator *aSkipIter=nsnull, PRUint32 aSkippedStartOffset=0, PRUint32 aSkippedMaxLength=PR_UINT32_MAX)
nsIntRect GetScreenRect () const
virtual nsIntRect GetScreenRectExternal () const
nsRect GetScreenRectInAppUnits () const
NS_IMETHOD GetSelected (PRBool *aSelected) const =0
NS_IMETHOD GetSelectionController (nsPresContext *aPresContext, nsISelectionController **aSelCon)=0
nsSize GetSize () const
virtual PRIntn GetSkipSides () const
virtual nsSplittableType GetSplittableType () const =0
nsFrameState GetStateBits () const
nsStyleContext * GetStyleContext () const
virtual const void * GetStyleDataExternal (nsStyleStructID aSID) const =0
nsIFrameGetTailContinuation ()
virtual nsIAtom * GetType () const =0
virtual nsMargin GetUsedBorder () const
nsMargin GetUsedBorderAndPadding () const
virtual nsMargin GetUsedMargin () const
virtual nsMargin GetUsedPadding () const
virtual Valignment GetVAlign () const =0
nsIViewGetView () const
virtual nsIViewGetViewExternal () const
virtual nsIWidgetGetWindow () const
NS_IMETHOD HandleEvent (nsPresContext *aPresContext, nsGUIEvent *aEvent, nsEventStatus *aEventStatus)=0
virtual PRBool HasTerminalNewline () const
PRBool HasView () const
virtual PRBool HonorPrintBackgroundSettings ()
NS_IMETHOD Init (nsIContent *aContent, nsIFrame *aParent, nsIFrame *aPrevInFlow)=0
NS_IMETHOD InsertFrames (nsIAtom *aListName, nsIFrame *aPrevFrame, nsIFrame *aFrameList)=0
virtual IntrinsicWidthOffsetData IntrinsicWidthOffsets (nsIRenderingContext *aRenderingContext)=0
void Invalidate (const nsRect &aDamageRect, PRBool aImmediate=PR_FALSE)
virtual void InvalidateInternal (const nsRect &aDamageRect, nscoord aOffsetX, nscoord aOffsetY, nsIFrame *aForChild, PRBool aImmediate)
void InvalidateOverflowRect ()
void InvalidateRectDifference (const nsRect &aR1, const nsRect &aR2)
PRBool IsBoxFrame () const
PRBool IsBoxWrapped () const
virtual PRBool IsCollapsed (nsBoxLayoutState &aBoxLayoutState)=0
virtual PRBool IsContainingBlock () const =0
virtual PRBool IsEmpty ()=0
virtual PRBool IsFloatContainingBlock () const
virtual PRBool IsFocusable (PRInt32 *aTabIndex=nsnull, PRBool aWithMouse=PR_FALSE)
virtual PRBool IsFrameOfType (PRUint32 aFlags) const
PRBool IsGeneratedContentFrame ()
PRBool IsHorizontal () const
virtual PRBool IsLeaf () const
PRBool IsNormalDirection () const
PRBool IsPseudoFrame (nsIContent *aParentContent)
PRBool IsPseudoStackingContextFromStyle ()
NS_IMETHOD IsSelectable (PRBool *aIsSelectable, PRUint8 *aSelectStyle) const =0
virtual PRBool IsSelfEmpty ()=0
PRBool IsThemed (const nsStyleDisplay *aDisp)
PRBool IsThemed ()
PRBool IsVisibleForPainting ()
PRBool IsVisibleForPainting (nsDisplayListBuilder *aBuilder)
virtual PRBool IsVisibleInSelection (nsISelection *aSelection)
PRBool IsVisibleInSelection (nsDisplayListBuilder *aBuilder)
PRBool IsVisibleOrCollapsedForPainting (nsDisplayListBuilder *aBuilder)
virtual void MarkIntrinsicWidthsDirty ()=0
virtual PRBool NeedsView ()
 NS_HIDDEN_ (nsresult) Redraw(nsBoxLayoutState &aState
 NS_HIDDEN_ (nsresult) GetClientRect(nsRect &aContentRect)
 NS_HIDDEN_ (nsresult) Layout(nsBoxLayoutState &aBoxLayoutState)
 NS_HIDDEN_ (void *) UnsetProperty(nsIAtom *aPropertyName
 NS_HIDDEN_ (nsresult) DeleteProperty(nsIAtom *aPropertyName) const
 NS_HIDDEN_ (nsresult) SetProperty(nsIAtom *aPropertyName
virtual NS_HIDDEN_ (void *) GetPropertyExternal(nsIAtom *aPropertyName
 NS_HIDDEN_ (void *) GetProperty(nsIAtom *aPropertyName
nsresult OverflowClip (nsDisplayListBuilder *aBuilder, const nsDisplayListSet &aFromSet, const nsDisplayListSet &aToSet, const nsRect &aClipRect, PRBool aClipBorderBackground=PR_FALSE, PRBool aClipAll=PR_FALSE)
NS_IMETHOD PeekOffset (nsPeekOffsetStruct *aPos)
nsPresContext * PresContext () const
NS_IMETHOD Reflow (nsPresContext *aPresContext, nsHTMLReflowMetrics &aReflowMetrics, const nsHTMLReflowState &aReflowState, nsReflowStatus &aStatus)=0
NS_IMETHOD RelayoutChildAtOrdinal (nsBoxLayoutState &aState, nsIBox *aChild)=0
virtual void RemovedAsPrimaryFrame ()
NS_IMETHOD RemoveFrame (nsIAtom *aListName, nsIFrame *aOldFrame)=0
void RemoveStateBits (nsFrameState aBits)
virtual void SetAdditionalStyleContext (PRInt32 aIndex, nsStyleContext *aStyleContext)=0
virtual void SetBounds (nsBoxLayoutState &aBoxLayoutState, const nsRect &aRect, PRBool aRemoveOverflowArea=PR_FALSE)=0
NS_IMETHOD SetInitialChildList (nsIAtom *aListName, nsIFrame *aChildList)=0
NS_IMETHOD SetLayoutManager (nsIBoxLayout *aLayout)=0
NS_IMETHOD SetNextContinuation (nsIFrame *)=0
NS_IMETHOD SetNextInFlow (nsIFrame *)=0
void SetNextSibling (nsIFrame *aNextSibling)
NS_IMETHOD SetParent (const nsIFrame *aParent)
void SetPosition (const nsPoint &aPt)
NS_IMETHOD SetPrevContinuation (nsIFrame *)=0
NS_IMETHOD SetPrevInFlow (nsIFrame *)=0
void SetRect (const nsRect &aRect)
NS_IMETHOD SetSelected (nsPresContext *aPresContext, nsIDOMRange *aRange, PRBool aSelected, nsSpread aSpread)=0
void SetSize (const nsSize &aSize)
void SetStyleContext (nsStyleContext *aContext)
void SetStyleContextWithoutNotification (nsStyleContext *aContext)
nsresult SetView (nsIView *aView)
virtual PRBool SupportsVisibilityHidden ()
NS_IMETHOD WillReflow (nsPresContext *aPresContext)=0
NS_IMETHOD QueryInterface (REFNSIID aIID, void **aInstancePtr)=0

Static Public Member Functions

static PRBool AddCSSCollapsed (nsBoxLayoutState &aState, nsIBox *aBox, PRBool &aCollapsed)
static PRBool AddCSSFlex (nsBoxLayoutState &aState, nsIBox *aBox, nscoord &aFlex)
static PRBool AddCSSMaxSize (nsBoxLayoutState &aState, nsIBox *aBox, nsSize &aSize)
static PRBool AddCSSMinSize (nsBoxLayoutState &aState, nsIBox *aBox, nsSize &aSize)
static PRBool AddCSSOrdinal (nsBoxLayoutState &aState, nsIBox *aBox, PRUint32 &aOrdinal)
static PRBool AddCSSPrefSize (nsBoxLayoutState &aState, nsIBox *aBox, nsSize &aSize)

Public Attributes

void NSPropertyDtorFunc aDestructor = nsnull
void NSPropertyDtorFunc void * aDtorData = nsnull)
const nsRect PRBool aImmediate = PR_FALSE)
const nsRect * aRect = nsnull
nsresult * aStatus = nsnull) const
void * aValue
virtual nsresult *aStatus const

Protected Member Functions

void InvalidateRoot (const nsRect &aDamageRect, nscoord aOffsetX, nscoord aOffsetY, PRBool aImmediate)
virtual PRBool PeekOffsetCharacter (PRBool aForward, PRInt32 *aOffset)=0
virtual PRBool PeekOffsetNoAmount (PRBool aForward, PRInt32 *aOffset)=0
nsresult PeekOffsetParagraph (nsPeekOffsetStruct *aPos)
virtual PRBool PeekOffsetWord (PRBool aForward, PRBool aWordSelectEatSpace, PRBool aIsKeyboardSelect, PRInt32 *aOffset, PeekWordState *aState)=0

Protected Attributes

nsRect mRect
nsFrameState mState
nsStyleContext * mStyleContext

Private Member Functions

nsRect * GetOverflowAreaProperty (PRBool aCreateIfNecessary=PR_FALSE)
 NS_IMETHOD_ (nsrefcnt) Release(void)=0
 NS_IMETHOD_ (nsrefcnt) AddRef(void)=0


struct  ContentOffsets
struct  Cursor
struct  InlineIntrinsicWidthData
struct  InlineMinWidthData
struct  InlinePrefWidthData
struct  IntrinsicSize
struct  IntrinsicWidthOffsetData
struct  PeekWordState

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index