Logo Search packages:      
Sourcecode: xulrunner 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 nsMenuFrame 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 401 of file nsIFrame.h.


Public Types

enum  { eMathML = 1 << 0, eSVG = 1 << 1, eSVGForeignObject = 1 << 2 }
enum  Halignment { hAlign_Left, hAlign_Right, hAlign_Center }
enum  Valignment { vAlign_Top, vAlign_Middle, vAlign_BaseLine, vAlign_Bottom }

Public Member Functions

void AddStateBits (nsFrameState aBits)
NS_IMETHOD AdjustFrameSize (nscoord aExtraSpace, nscoord &aUsedSpace)=0
virtual void AdjustOffsetsForBidi (PRInt32 aStart, PRInt32 aEnd)
NS_IMETHOD AppendFrames (nsIAtom *aListName, nsIFrame *aFrameList)=0
virtual PRBool AreAncestorViewsVisible () const
NS_IMETHOD AttributeChanged (nsIContent *aChild, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType)=0
NS_IMETHOD CalcBorderPadding (nsMargin &aBorderPadding) const =0
NS_IMETHOD CanContinueTextRun (PRBool &aContinueTextRun) const =0
virtual PRBool CanPaintBackground ()
NS_IMETHOD CaptureMouse (nsPresContext *aPresContext, PRBool aGrabMouseEvents)=0
NS_IMETHOD CharacterDataChanged (nsPresContext *aPresContext, nsIContent *aChild, PRBool aAppend)=0
NS_IMETHOD CheckVisibility (nsPresContext *aContext, PRInt32 aStartIndex, PRInt32 aEndIndex, PRBool aRecurse, PRBool *aFinished, PRBool *_retval)=0
NS_IMETHOD ChildrenMustHaveWidgets (PRBool &aMust) const =0
virtual nsresult CreateWidgetForView (nsIView *aView)
NS_IMETHOD Destroy (nsPresContext *aPresContext)=0
NS_IMETHOD DidReflow (nsPresContext *aPresContext, const nsHTMLReflowState *aReflowState, nsDidReflowStatus aStatus)=0
NS_IMETHOD DidSetStyleContext (nsPresContext *aPresContext)=0
void FinishAndStoreOverflow (nsHTMLReflowMetrics *aMetrics)
void FinishAndStoreOverflow (nsRect *aOverflowArea, nsSize aNewSize)
virtual nsIAtom * GetAdditionalChildListName (PRInt32 aIndex) const =0
virtual nsStyleContext * GetAdditionalStyleContext (PRInt32 aIndex) const =0
nsIFrameGetAncestorWithView () const
virtual nsIFrameGetAncestorWithViewExternal () const
NS_IMETHOD GetAscent (nsBoxLayoutState &aBoxLayoutState, nscoord &aAscent)=0
NS_IMETHOD GetBorder (nsMargin &aBorder)=0
NS_IMETHOD GetBorderAndPadding (nsMargin &aBorderAndPadding)
nsresult GetChildBox (nsIBox **aBox)
NS_IMETHOD GetChildFrameContainingOffset (PRInt32 inContentOffset, PRBool inHint, PRInt32 *outFrameContentOffset, nsIFrame **outChildFrame)=0
nsIViewGetClosestView (nsPoint *aOffset=nsnull) const
nsIContentGetContent () const
NS_IMETHOD GetContentAndOffsetsFromPoint (nsPresContext *aCX, const nsPoint &aPoint, nsIContent **aNewContent, PRInt32 &aContentOffset, PRInt32 &aContentOffsetEnd, PRBool &aBeginFrameContent)=0
NS_IMETHOD GetContentForEvent (nsPresContext *aPresContext, nsEvent *aEvent, nsIContent **aContent)=0
virtual nsIFrameGetContentInsertionFrame ()
virtual already_AddRefed
< nsIContent
GetContentInsertionNode ()
NS_IMETHOD GetCursor (const nsPoint &aPoint, Cursor &aCursor)=0
nsresult GetDirection (PRBool &aIsNormal)
 XXX to be removed.
nsPeekOffsetStruct GetExtremeCaretPosition (PRBool aStart)
virtual nsIFrameGetFirstChild (nsIAtom *aListName) const =0
virtual nsIFrameGetFirstInFlow () const
NS_IMETHOD GetFlex (nsBoxLayoutState &aBoxLayoutState, nscoord &aFlex)=0
NS_IMETHOD GetFrameForPoint (const nsPoint &aPoint, nsFramePaintLayer aWhichLayer, nsIFrame **aFrame)=0
NS_IMETHOD GetHAlign (Halignment &aAlign)=0
NS_IMETHOD GetIndexOf (nsIBox *aChild, PRInt32 *aIndex)=0
nsresult GetInset (nsMargin &aInset)
virtual nsIFrameGetLastInFlow () const
NS_IMETHOD GetLayoutManager (nsIBoxLayout **aLayout)=0
NS_IMETHOD GetMargin (nsMargin &aMargin)=0
NS_IMETHOD GetMaxSize (nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)=0
NS_IMETHOD GetMinSize (nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)=0
virtual nsSize GetMinSizeForScrollArea (nsBoxLayoutState &aBoxLayoutState)=0
virtual nsIViewGetMouseCapturer () const
NS_IMETHOD GetMouseThrough (PRBool &aMouseThrough)=0
nsresult GetNextBox (nsIBox **aBox)
virtual nsIFrameGetNextInFlow () 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
 GetOrdinal (nsBoxLayoutState &aBoxLayoutState, PRUint32 &aOrdinal)
nsresult GetOrientation (PRBool &aIsHorizontal)
 XXX to be removed.
NS_IMETHOD GetOriginToViewOffset (nsPoint &aOffset, nsIView **aView) const =0
NS_IMETHOD GetOverflow (nsSize &aOverflow)=0
nsRect * GetOverflowAreaProperty (PRBool aCreateIfNecessary=PR_FALSE)
nsRect GetOverflowRect () const
NS_IMETHOD GetPadding (nsMargin &aBorderAndPadding)=0
nsIFrameGetParent () const
NS_IMETHOD GetParentStyleContextFrame (nsPresContext *aPresContext, nsIFrame **aProviderFrame, PRBool *aIsChild)=0
virtual nsIViewGetParentViewForChildFrame (nsIFrame *aFrame) const
NS_IMETHOD GetPointFromOffset (nsPresContext *inPresContext, nsIRenderingContext *inRendContext, PRInt32 inOffset, nsPoint *outPoint)=0
nsPoint GetPosition () const
NS_IMETHOD GetPrefSize (nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)=0
nsPresContext * GetPresContext () const
virtual nsIFrameGetPrevInFlow () const =0
nsRect GetRect () const
nsIntRect GetScreenRect () const
virtual nsIntRect GetScreenRectExternal () const
NS_IMETHOD GetSelected (PRBool *aSelected) const =0
NS_IMETHOD GetSelectionController (nsPresContext *aPresContext, nsISelectionController **aSelCon)=0
nsSize GetSize () const
nsFrameState GetStateBits () const
nsStyleContext * GetStyleContext () const
const nsStyleStruct * GetStyleData (nsStyleStructID aSID) const
virtual const nsStyleStruct * GetStyleDataExternal (nsStyleStructID aSID) const =0
virtual nsIAtom * GetType () const =0
NS_IMETHOD GetVAlign (Valignment &aAlign)=0
nsIViewGetView () const
virtual nsIViewGetViewExternal () const
virtual nsIWidgetGetWindow () const
NS_IMETHOD HandleEvent (nsPresContext *aPresContext, nsGUIEvent *aEvent, nsEventStatus *aEventStatus)=0
nsresult HasDirtyChildren (PRBool &aIsDirty)
PRBool HasView () const
NS_IMETHOD Init (nsPresContext *aPresContext, nsIContent *aContent, nsIFrame *aParent, nsStyleContext *aContext, nsIFrame *aPrevInFlow)=0
NS_IMETHOD InsertFrames (nsIAtom *aListName, nsIFrame *aPrevFrame, nsIFrame *aFrameList)=0
void Invalidate (const nsRect &aDamageRect, PRBool aImmediate=PR_FALSE) const
PRBool IsBoxFrame () const
PRBool IsBoxWrapped () const
NS_IMETHOD IsCollapsed (nsBoxLayoutState &aBoxLayoutState, PRBool &aCollapsed)=0
virtual PRBool IsContainingBlock () const =0
nsresult IsDirty (PRBool &aIsDirty)
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)
NS_IMETHOD IsSelectable (PRBool *aIsSelectable, PRUint8 *aSelectStyle) const =0
virtual PRBool IsSelfEmpty ()=0
NS_IMETHOD IsSplittable (nsSplittableType &aIsSplittable) const =0
NS_IMETHOD IsVisibleForPainting (nsPresContext *aPresContext, nsIRenderingContext &aRenderingContext, PRBool aCheckVis, PRBool *aIsVisible)=0
NS_IMETHOD MarkChildrenStyleChange ()=0
NS_IMETHOD MarkDirty (nsBoxLayoutState &aState)=0
NS_IMETHOD MarkStyleChange (nsBoxLayoutState &aState)=0
NS_IMETHOD NeedsRecalc ()=0
virtual PRBool NeedsView ()
 NS_HIDDEN_ (nsresult) Redraw(nsBoxLayoutState &aState
 NS_HIDDEN_ (nsresult) GetClientRect(nsRect &aContentRect)
 NS_HIDDEN_ (nsresult) GetContentRect(nsRect &aContentRect)
 NS_HIDDEN_ (nsresult) GetParentBox(nsIBox **aParent)
 NS_HIDDEN_ (nsresult) MarkDirtyChildren(nsBoxLayoutState &aState)
 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
NS_IMETHOD Paint (nsPresContext *aPresContext, nsIRenderingContext &aRenderingContext, const nsRect &aDirtyRect, nsFramePaintLayer aWhichLayer, PRUint32 aFlags=0)=0
NS_IMETHOD PeekOffset (nsPresContext *aPresContext, nsPeekOffsetStruct *aPos)=0
NS_IMETHOD Reflow (nsPresContext *aPresContext, nsHTMLReflowMetrics &aReflowMetrics, const nsHTMLReflowState &aReflowState, nsReflowStatus &aStatus)=0
NS_IMETHOD ReflowDirtyChild (nsIPresShell *aPresShell, nsIFrame *aChild)=0
NS_IMETHOD RelayoutChildAtOrdinal (nsBoxLayoutState &aState, nsIBox *aChild)=0
NS_IMETHOD RelayoutDirtyChild (nsBoxLayoutState &aState, nsIBox *aChild)=0
virtual void RemovedAsPrimaryFrame (nsPresContext *aPresContext)
NS_IMETHOD RemoveFrame (nsIAtom *aListName, nsIFrame *aOldFrame)=0
void RemoveStateBits (nsFrameState aBits)
NS_IMETHOD ReplaceFrame (nsIAtom *aListName, nsIFrame *aOldFrame, nsIFrame *aNewFrame)=0
virtual void SetAdditionalStyleContext (PRInt32 aIndex, nsStyleContext *aStyleContext)=0
NS_IMETHOD SetBounds (nsBoxLayoutState &aBoxLayoutState, const nsRect &aRect, PRBool aRemoveOverflowArea=PR_FALSE)=0
NS_IMETHOD SetIncludeOverflow (PRBool aInclude)=0
NS_IMETHOD SetInitialChildList (nsPresContext *aPresContext, nsIAtom *aListName, nsIFrame *aChildList)=0
NS_IMETHOD SetLayoutManager (nsIBoxLayout *aLayout)=0
NS_IMETHOD SetNextInFlow (nsIFrame *)=0
void SetNextSibling (nsIFrame *aNextSibling)
NS_IMETHOD SetParent (const nsIFrame *aParent)
void SetPosition (const nsPoint &aPt)
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 (nsPresContext *aPresContext, nsStyleContext *aContext)
nsresult SetView (nsIView *aView)
virtual PRBool SupportsVisibilityHidden ()
NS_IMETHOD TrimTrailingWhiteSpace (nsPresContext *aPresContext, nsIRenderingContext &aRC, nscoord &aDeltaWidth, PRBool &aLastCharIsJustifiable)=0
NS_IMETHOD WillReflow (nsPresContext *aPresContext)=0
Methods
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 Attributes

nsIContentmContent
nsIFramemNextSibling
nsIFramemParent
nsRect mRect
nsFrameState mState
nsStyleContext * mStyleContext

Private Member Functions

 NS_IMETHOD_ (nsrefcnt) Release(void)=0
 NS_IMETHOD_ (nsrefcnt) AddRef(void)=0

Classes

struct  Cursor

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

Generated by  Doxygen 1.6.0   Back to index