nsFrame Class Reference

#include <nsFrame.h>

Inheritance diagram for nsFrame:

Inheritance graph
[legend]
Collaboration diagram for nsFrame:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implementation of a simple frame that's not splittable and has no child frames.

Sets the NS_FRAME_SYNCHRONIZE_FRAME_AND_VIEW bit, so the default behavior is to keep the frame and view position and size in sync.

Definition at line 126 of file nsFrame.h.

Public Member Functions

Static Public Member Functions

Protected Member Functions

Static Protected Member Functions

Friends


Constructor & Destructor Documentation

nsFrame::nsFrame  )  [protected]
 

virtual nsFrame::~nsFrame  )  [protected, virtual]
 


Member Function Documentation

void* nsFrame::operator new size_t  sz,
nsIPresShell *  aPresShell
throw ()
 

void nsFrame::operator delete void *  aPtr,
size_t  sz
 

virtual nsresult nsFrame::QueryInterface const nsIID &  aIID,
void **  aInstancePtr
[virtual]
 

Reimplemented in nsSVGGlyphFrame, and nsSVGPathGeometryFrame.

virtual nsresult nsFrame::Init nsIPresContext *  aPresContext,
nsIContent *  aContent,
nsIFrame aParent,
nsStyleContext *  aContext,
nsIFrame asPrevInFlow
[virtual]
 

Called to initialize the frame. This is called immediately after creating the frame.

If the frame is a continuing frame, then aPrevInFlow indicates the previous frame (the frame that was split). You should connect the continuing frame to its prev-in-flow, e.g. by using the AppendToFlow() function

If you want a view associated with your frame, you should create the view now.

Parameters:
aContent the content object associated with the frame
aGeometricParent the geometric parent frame
aContentParent the content parent frame
aContext the style context associated with the frame
aPrevInFlow the prev-in-flow frame
See also:
#AppendToFlow()

Implements nsIFrame.

Reimplemented in nsSVGGlyphFrame, and nsSVGPathGeometryFrame.

virtual nsresult nsFrame::SetInitialChildList nsIPresContext *  aPresContext,
nsIAtom *  aListName,
nsIFrame aChildList
[virtual]
 

Called to set the initial list of frames. This happens after the frame has been initialized.

This is only called once for a given child list, and won't be called at all for child lists with no initial list of frames.

Parameters:
aListName the name of the child list. A NULL pointer for the atom name means the unnamed principal child list
aChildList list of child frames. Each of the frames has its NS_FRAME_IS_DIRTY bit set
Returns:
NS_ERROR_INVALID_ARG if there is no child list with the specified name, NS_ERROR_UNEXPECTED if the frame is an atomic frame or if the initial list of frames has already been set for that child list, NS_OK otherwise
See also:
Init()

Implements nsIFrame.

virtual nsresult nsFrame::AppendFrames nsIPresContext *  aPresContext,
nsIPresShell &  aPresShell,
nsIAtom *  aListName,
nsIFrame aFrameList
[virtual]
 

This method is responsible for appending frames to the frame list. The implementation should append the frames to the specified child list and then generate a reflow command.

Parameters:
aListName the name of the child list. A NULL pointer for the atom name means the unnamed principal child list
aFrameList list of child frames to append. Each of the frames has its NS_FRAME_IS_DIRTY bit set
Returns:
NS_ERROR_INVALID_ARG if there is no child list with the specified name, NS_ERROR_UNEXPECTED if the frame is an atomic frame, NS_OK otherwise

Implements nsIFrame.

virtual nsresult nsFrame::InsertFrames nsIPresContext *  aPresContext,
nsIPresShell &  aPresShell,
nsIAtom *  aListName,
nsIFrame aPrevFrame,
nsIFrame aFrameList
[virtual]
 

This method is responsible for inserting frames into the frame list. The implementation should insert the new frames into the specified child list and then generate a reflow command.

Parameters:
aListName the name of the child list. A NULL pointer for the atom name means the unnamed principal child list
aPrevFrame the frame to insert frames after
aFrameList list of child frames to insert after aPrevFrame. Each of the frames has its NS_FRAME_IS_DIRTY bit set
Returns:
NS_ERROR_INVALID_ARG if there is no child list with the specified name, NS_ERROR_UNEXPECTED if the frame is an atomic frame, NS_OK otherwise

Implements nsIFrame.

virtual nsresult nsFrame::RemoveFrame nsIPresContext *  aPresContext,
nsIPresShell &  aPresShell,
nsIAtom *  aListName,
nsIFrame aOldFrame
[virtual]
 

This method is responsible for removing a frame in the frame list. The implementation should do something with the removed frame and then generate a reflow command. The implementation is responsible for destroying aOldFrame (the caller mustn't destroy aOldFrame).

Parameters:
aListName the name of the child list. A NULL pointer for the atom name means the unnamed principal child list
aOldFrame the frame to remove
Returns:
NS_ERROR_INVALID_ARG if there is no child list with the specified name, NS_ERROR_FAILURE if the child frame is not in the specified child list, NS_ERROR_UNEXPECTED if the frame is an atomic frame, NS_OK otherwise

Implements nsIFrame.

virtual nsresult nsFrame::ReplaceFrame nsIPresContext *  aPresContext,
nsIPresShell &  aPresShell,
nsIAtom *  aListName,
nsIFrame aOldFrame,
nsIFrame aNewFrame
[virtual]
 

This method is responsible for replacing the old frame with the new frame. The old frame should be destroyed and the new frame inserted in its place in the specified child list.

Parameters:
aListName the name of the child list. A NULL pointer for the atom name means the unnamed principal child list
aOldFrame the frame to remove
aNewFrame the frame to replace it with. The new frame has its NS_FRAME_IS_DIRTY bit set
Returns:
NS_ERROR_INVALID_ARG if there is no child list with the specified name, NS_ERROR_FAILURE if the old child frame is not in the specified child list, NS_ERROR_UNEXPECTED if the frame is an atomic frame, NS_OK otherwise

Implements nsIFrame.

virtual nsresult nsFrame::Destroy nsIPresContext *  aPresContext  )  [virtual]
 

Destroys this frame and each of its child frames (recursively calls Destroy() for each child)

Implements nsIFrame.

virtual nsresult nsFrame::CalcBorderPadding nsMargin &  aBorderPadding  )  const [virtual]
 

Implements nsIFrame.

virtual nsStyleContext* nsFrame::GetAdditionalStyleContext PRInt32  aIndex  )  const [virtual]
 

These methods are to access any additional style contexts that the frame may be holding. These are contexts that are children of the frame's primary context and are NOT used as style contexts for any child frames. These contexts also MUST NOT have any child contexts whatsoever. If you need to insert style contexts into the style tree, then you should create pseudo element frames to own them The indicies must be consecutive and implementations MUST return an NS_ERROR_INVALID_ARG if asked for an index that is out of range.

Implements nsIFrame.

virtual void nsFrame::SetAdditionalStyleContext PRInt32  aIndex,
nsStyleContext *  aStyleContext
[virtual]
 

Implements nsIFrame.

virtual nsresult nsFrame::GetAdditionalChildListName PRInt32  aIndex,
nsIAtom **  aListName
const [virtual]
 

Used to iterate the list of additional child list names. Returns the atom name for the additional child list at the specified 0-based index, or a NULL pointer if there are no more named child lists.

Note that the list is only the additional named child lists and does not include the unnamed principal child list.

Returns:
NS_ERROR_INVALID_ARG if the index is < 0 and NS_OK otherwise

Implements nsIFrame.

virtual nsresult nsFrame::FirstChild nsIPresContext *  aPresContext,
nsIAtom *  aListName,
nsIFrame **  aFirstChild
const [virtual]
 

Get the first child frame from the specified child list.

Parameters:
aListName the name of the child list. A NULL pointer for the atom name means the unnamed principal child list
Returns:
NS_ERROR_INVALID_ARG if there is no child list with the specified name
See also:
#GetAdditionalListName()

Implements nsIFrame.

virtual nsresult nsFrame::Paint nsIPresContext *  aPresContext,
nsIRenderingContext &  aRenderingContext,
const nsRect &  aDirtyRect,
nsFramePaintLayer  aWhichLayer,
PRUint32  aFlags = 0
[virtual]
 

Paint is responsible for painting the frame. The aWhichLayer argument indicates which layer of painting should be done during the call.

Implements nsIFrame.

virtual nsresult nsFrame::HandleEvent nsIPresContext *  aPresContext,
nsGUIEvent *  aEvent,
nsEventStatus *  aEventStatus
[virtual]
 

Event handling of GUI events.

Parameters:
aEvent event structure describing the type of event and rge widget where the event originated
aEventStatus a return value indicating whether the event was handled and whether default processing should be done
XXX From a frame's perspective it's unclear what the effect of the event status is. Does it cause the event to continue propagating through the frame hierarchy or is it just returned to the widgets?

See also:
nsGUIEvent

nsEventStatus

Implements nsIFrame.

virtual nsresult nsFrame::GetContentForEvent nsIPresContext *  aPresContext,
nsEvent *  aEvent,
nsIContent **  aContent
[virtual]
 

Implements nsIFrame.

virtual nsresult nsFrame::GetCursor nsIPresContext *  aPresContext,
nsPoint &  aPoint,
PRInt32 &  aCursor
[virtual]
 

Get the cursor for a given frame.

Implements nsIFrame.

virtual nsresult nsFrame::GetFrameForPoint nsIPresContext *  aPresContext,
const nsPoint &  aPoint,
nsFramePaintLayer  aWhichLayer,
nsIFrame **  aFrame
[virtual]
 

Get the frame that should receive events for a given point in the coordinate space of this frame's parent, if the frame is painted in the given paint layer. A frame should return itself if it should recieve the events. A successful return value indicates that a point was found.

Implements nsIFrame.

virtual nsresult nsFrame::GetPointFromOffset nsIPresContext *  inPresContext,
nsIRenderingContext *  inRendContext,
PRInt32  inOffset,
nsPoint *  outPoint
[virtual]
 

Get a point (in the frame's coordinate space) given an offset into the content. This point should be on the baseline of text with the correct horizontal offset

Implements nsIFrame.

virtual nsresult nsFrame::GetChildFrameContainingOffset PRInt32  inContentOffset,
PRBool  inHint,
PRInt32 *  outFrameContentOffset,
nsIFrame **  outChildFrame
[virtual]
 

Get the child frame of this frame which contains the given content offset. outChildFrame may be this frame, or nsnull on return. outContentOffset returns the content offset relative to the start of the returned node. You can also pass a hint which tells the method to stick to the end of the first found frame or the beginning of the next in case the offset falls on a boundary.

Implements nsIFrame.

nsresult nsFrame::GetNextPrevLineFromeBlockFrame nsIPresContext *  aPresContext,
nsPeekOffsetStruct *  aPos,
nsIFrame aBlockFrame,
PRInt32  aLineStart,
PRInt8  aOutSideLimit
[static]
 

virtual nsresult nsFrame::ContentChanged nsIPresContext *  aPresContext,
nsIContent *  aChild,
nsISupports *  aSubContent
[virtual]
 

This call is invoked when content is changed in the content tree. The first frame that maps that content is asked to deal with the change by generating an incremental reflow command.

Parameters:
aPresContext the presentation context
aContent the content node that was changed
aSubContent a hint to the frame about the change

Implements nsIFrame.

Reimplemented in nsSVGGlyphFrame.

virtual nsresult nsFrame::AttributeChanged nsIPresContext *  aPresContext,
nsIContent *  aChild,
PRInt32  aNameSpaceID,
nsIAtom *  aAttribute,
PRInt32  aModType
[virtual]
 

This call is invoked when the value of a content objects's attribute is changed. The first frame that maps that content is asked to deal with the change by doing whatever is appropriate.

Parameters:
aChild the content object
aAttribute the attribute whose value changed
aHint the level of change that has already been dealt with

Implements nsIFrame.

virtual nsresult nsFrame::IsSplittable nsSplittableType aIsSplittable  )  const [virtual]
 

Return how your frame can be split.

Implements nsIFrame.

virtual nsresult nsFrame::GetPrevInFlow nsIFrame **  aPrevInFlow  )  const [virtual]
 

Flow member functions

Implements nsIFrame.

virtual nsresult nsFrame::SetPrevInFlow nsIFrame  )  [virtual]
 

Implements nsIFrame.

virtual nsresult nsFrame::GetNextInFlow nsIFrame **  aNextInFlow  )  const [virtual]
 

Implements nsIFrame.

virtual nsresult nsFrame::SetNextInFlow nsIFrame  )  [virtual]
 

Implements nsIFrame.

virtual nsresult nsFrame::GetOffsetFromView nsIPresContext *  aPresContext,
nsPoint &  aOffset,
nsIView **  aView
const [virtual]
 

Returns the offset from this frame to the closest geometric parent that has a view. Also returns the containing view or null in case of error

Implements nsIFrame.

virtual nsresult nsFrame::GetOriginToViewOffset nsIPresContext *  aPresContext,
nsPoint &  aOffset,
nsIView **  aView
const [virtual]
 

Returns the offset from this frame's upper left corner to the upper left corner of the view returned by a call to GetView(). aOffset will contain the offset to the view or (0,0) if the frame has no view. aView will contain a pointer to the view returned by GetView(). aView is optional, that is, you may pass null if you are not interested in getting a pointer to the view.

Implements nsIFrame.

virtual nsresult nsFrame::GetFrameType nsIAtom **  aType  )  const [virtual]
 

Get the "type" of the frame. May return a NULL atom pointer

See also:
nsLayoutAtoms

Implements nsIFrame.

virtual nsresult nsFrame::IsPercentageBase PRBool &  aBase  )  const [virtual]
 

Is this frame a "containing block"?

Implements nsIFrame.

virtual nsresult nsFrame::SetSelected nsIPresContext *  aPresContext,
nsIDOMRange *  aRange,
PRBool  aSelected,
nsSpread  aSpread
[virtual]
 

Called to set the selection of the frame based on frame offsets. you can FORCE the frame to redraw event if aSelected == the frame selection with the last parameter. data in struct may be changed when passed in.

Parameters:
aRange is the range that will dictate if the frames need to be redrawn null means the whole content needs to be redrawn
aSelected is it selected?
aSpread should it spread the selection to flow elements around it? or go down to its children?

Implements nsIFrame.

Reimplemented in nsSVGGlyphFrame.

virtual nsresult nsFrame::GetSelected PRBool *  aSelected  )  const [virtual]
 

Implements nsIFrame.

Reimplemented in nsSVGGlyphFrame.

virtual nsresult nsFrame::IsSelectable PRBool *  aIsSelectable,
PRUint8 *  aSelectStyle
const [virtual]
 

called to discover where this frame, or a parent frame has user-select style applied, which affects that way that it is selected.

Parameters:
aIsSelectable out param. Set to true if the frame can be selected (i.e. is not affected by user-select: none)
aSelectStyle out param. Returns the type of selection style found (using values defined in nsStyleConsts.h).

Implements nsIFrame.

virtual nsresult nsFrame::GetSelectionController nsIPresContext *  aPresContext,
nsISelectionController **  aSelCon
[virtual]
 

Called to retrieve the SelectionController associated with the frame.

Parameters:
aSelCon will contain the selection controller associated with the frame.

Implements nsIFrame.

Referenced by nsSVGGlyphFrame::GetHighlight().

virtual nsresult nsFrame::PeekOffset nsIPresContext *  aPresContext,
nsPeekOffsetStruct *  aPos
[virtual]
 

called to find the previous/next character, word, or line returns the actual nsIFrame and the frame offset. THIS DOES NOT CHANGE SELECTION STATE uses frame's begin selection state to start. if no selection on this frame will return NS_ERROR_FAILURE

Parameters:
aPOS is defined in nsIFrameSelection

Implements nsIFrame.

virtual nsresult nsFrame::CheckVisibility nsIPresContext *  aContext,
PRInt32  aStartIndex,
PRInt32  aEndIndex,
PRBool  aRecurse,
PRBool *  aFinished,
PRBool *  _retval
[virtual]
 

called to see if the children of the frame are visible from indexstart to index end. this does not change any state. returns PR_TRUE only if the indexes are valid and any of the children are visible. for textframes this index is the character index. if aStart = aEnd result will be PR_FALSE

Parameters:
aStart start index of first child from 0-N (number of children)
aEnd end index of last child from 0-N
aRecurse should this frame talk to siblings to get to the contents other children?
aFinished did this frame have the aEndIndex? or is there more work to do
_retval return value true or false. false = range is not rendered.

Implements nsIFrame.

virtual nsresult nsFrame::PeekOffsetParagraph nsIPresContext *  aPresContext,
nsPeekOffsetStruct *  aPos
[virtual]
 

virtual nsresult nsFrame::GetOffsets PRInt32 &  aStart,
PRInt32 &  aEnd
const [virtual]
 

Get the offsets of the frame. most will be 0,0

Implements nsIFrame.

virtual nsresult nsFrame::ReflowDirtyChild nsIPresShell *  aPresShell,
nsIFrame aChild
[virtual]
 

Called by a child frame on a parent frame to tell the parent frame that the child needs to be reflowed. The parent should either propagate the request to its parent frame or handle the request by generating a eReflowType_ReflowDirtyChildren reflow command.

Implements nsIFrame.

virtual nsresult nsFrame::GetParentStyleContextFrame nsIPresContext *  aPresContext,
nsIFrame **  aProviderFrame,
PRBool *  aIsChild
[virtual]
 

Get the frame whose style context should be the parent of this frame's style context (i.e., provide the parent style context). This frame must either be an ancestor of this frame or a child. If this frame returns a child frame, then the child frame must be sure to return a grandparent or higher!

Parameters:
aPresContext: PresContext
aProviderFrame: The frame whose style context should be the parent of this frame's style context. Null is permitted, and means that this frame's style context should be the root of the style context tree.
aIsChild: True if |aProviderFrame| is set to a child of this frame; false if it is an ancestor or null.

Implements nsIFrame.

virtual nsresult nsFrame::IsVisibleForPainting nsIPresContext *  aPresContext,
nsIRenderingContext &  aRenderingContext,
PRBool  aCheckVis,
PRBool *  aIsVisible
[virtual]
 

Determines whether a frame is visible for painting this takes into account whether it is painting a selection or printing.

Parameters:
aPresContext PresContext
aRenderingContext PresContext
aCheckVis indicates whether it should check for CSS visibility, PR_FALSE skips the check, PR_TRUE does the check
aIsVisible return value

Implements nsIFrame.

virtual nsresult nsFrame::IsEmpty nsCompatibility  aCompatMode,
PRBool  aIsPre,
PRBool *  aResult
[virtual]
 

Determine whether the frame is logically empty, i.e., whether the layout would be the same whether or not the frame is present. Placeholder frames should return true. Block frames should be considered empty whenever margins collapse through them, even though those margins are relevant.

aIsPre should be ignored by frames to which the 'white-space' property applies.

Implements nsIFrame.

virtual nsresult nsFrame::WillReflow nsIPresContext *  aPresContext  )  [virtual]
 

Pre-reflow hook. Before a frame is reflowed this method will be called. This call will always be invoked at least once before a subsequent Reflow and DidReflow call. It may be called more than once, In general you will receive on WillReflow notification before each Reflow request.

XXX Is this really the semantics we want? Because we have the NS_FRAME_IN_REFLOW bit we can ensure we don't call it more than once...

Implements nsIFrame.

virtual nsresult nsFrame::Reflow nsIPresContext *  aPresContext,
nsHTMLReflowMetrics &  aDesiredSize,
const nsHTMLReflowState &  aReflowState,
nsReflowStatus aStatus
[virtual]
 

The frame is given a maximum size and asked for its desired size. This is the frame's opportunity to reflow its children.

Parameters:
aDesiredSize out parameter where you should return the desired size and ascent/descent info. You should include any space you want for border/padding in the desired size you return.
It's okay to return a desired size that exceeds the max size if that's the smallest you can be, i.e. it's your minimum size.

maxElementSize is an optional parameter for returning your maximum element size. If may be null in which case you don't have to compute a maximum element size. The maximum element size must be less than or equal to your desired size.

For an incremental reflow you are responsible for invalidating any area within your frame that needs repainting (including borders). If your new desired size is different than your current size, then your parent frame is responsible for making sure that the difference between the two rects is repainted

Parameters:
aReflowState information about your reflow including the reason for the reflow and the available space in which to lay out. Each dimension of the available space can either be constrained or unconstrained (a value of NS_UNCONSTRAINEDSIZE). If constrained you should choose a value that's less than or equal to the constrained size. If unconstrained you can choose as large a value as you like.
Note that the available space can be negative. In this case you still must return an accurate desired size. If you're a container you must always reflow at least one frame regardless of the available space

Parameters:
aStatus a return value indicating whether the frame is complete and whether the next-in-flow is dirty and needs to be reflowed

Implements nsIFrame.

virtual nsresult nsFrame::DidReflow nsIPresContext *  aPresContext,
const nsHTMLReflowState *  aReflowState,
nsDidReflowStatus  aStatus
[virtual]
 

Post-reflow hook. After a frame is reflowed this method will be called informing the frame that this reflow process is complete, and telling the frame the status returned by the Reflow member function.

This call may be invoked many times, while NS_FRAME_IN_REFLOW is set, before it is finally called once with a NS_FRAME_REFLOW_COMPLETE value. When called with a NS_FRAME_REFLOW_COMPLETE value the NS_FRAME_IN_REFLOW bit in the frame state will be cleared.

XXX This doesn't make sense. If the frame is reflowed but not complete, then the status should be NS_FRAME_NOT_COMPLETE and not NS_FRAME_COMPLETE XXX Don't we want the semantics to dictate that we only call this once for a given reflow?

Implements nsIFrame.

virtual nsresult nsFrame::CanContinueTextRun PRBool &  aContinueTextRun  )  const [virtual]
 

Helper method used by block reflow to identify runs of text so that proper word-breaking can be done.

Parameters:
aContinueTextRun A frame should set aContinueTextRun to PR_TRUE if we can continue a "text run" through the frame. A text run is text that should be treated contiguously for line and word breaking.
Returns:
The return value is irrelevant.

Implements nsIFrame.

virtual nsresult nsFrame::AdjustFrameSize nscoord  aExtraSpace,
nscoord &  aUsedSpace
[virtual]
 

Implements nsIFrame.

virtual nsresult nsFrame::TrimTrailingWhiteSpace nsIPresContext *  aPresContext,
nsIRenderingContext &  aRC,
nscoord &  aDeltaWidth
[virtual]
 

Implements nsIFrame.

virtual nsresult nsFrame::HandlePress nsIPresContext *  aPresContext,
nsGUIEvent *  aEvent,
nsEventStatus *  aEventStatus
[virtual]
 

virtual nsresult nsFrame::HandleMultiplePress nsIPresContext *  aPresContext,
nsGUIEvent *  aEvent,
nsEventStatus *  aEventStatus
[virtual]
 

virtual nsresult nsFrame::HandleDrag nsIPresContext *  aPresContext,
nsGUIEvent *  aEvent,
nsEventStatus *  aEventStatus
[virtual]
 

virtual nsresult nsFrame::HandleRelease nsIPresContext *  aPresContext,
nsGUIEvent *  aEvent,
nsEventStatus *  aEventStatus
[virtual]
 

virtual nsresult nsFrame::GetContentAndOffsetsFromPoint nsIPresContext *  aCX,
const nsPoint &  aPoint,
nsIContent **  aNewContent,
PRInt32 &  aContentOffset,
PRInt32 &  aContentOffsetEnd,
PRBool &  aBeginFrameContent
[virtual]
 

Implements nsIFrame.

virtual nsresult nsFrame::PeekBackwardAndForward nsSelectionAmount  aAmountBack,
nsSelectionAmount  aAmountForward,
PRInt32  aStartPos,
nsIPresContext *  aPresContext,
PRBool  aJumpLines
[virtual]
 

void nsFrame::Invalidate nsIPresContext *  aPresContext,
const nsRect &  aDamageRect,
PRBool  aImmediate = 0
const
 

PRInt32 nsFrame::ContentIndexInContainer const nsIFrame aFrame  )  [static]
 

PRBool nsFrame::IsFrameTreeTooDeep const nsHTMLReflowState &  aReflowState,
nsHTMLReflowMetrics &  aMetrics
 

nsresult nsFrame::CreateAndPostReflowCommand nsIPresShell *  aPresShell,
nsIFrame aTargetFrame,
nsReflowType  aReflowType,
nsIFrame aChildFrame,
nsIAtom *  aAttribute,
nsIAtom *  aListName
[static]
 

nsresult nsFrame::DoGetParentStyleContextFrame nsIPresContext *  aPresContext,
nsIFrame **  aProviderFrame,
PRBool *  aIsChild
 

virtual nsRect* nsFrame::GetOverflowAreaProperty nsIPresContext *  aPresContext,
PRBool  aCreateIfNecessary = 0
[virtual]
 

Create or retrieve the previously stored overflow area, if the frame does not overflow and no creation is required return nsnull.

Parameters:
aPresContext PresContext
aCreateIfNecessary create a new nsRect for the overflow area
Returns:
pointer to the overflow area rectangle

Implements nsIFrame.

void nsFrame::StoreOverflow nsIPresContext *  aPresContext,
nsHTMLReflowMetrics &  aMetrics
 

virtual nsresult nsFrame::CaptureMouse nsIPresContext *  aPresContext,
PRBool  aGrabMouseEvents
[virtual]
 

Call to turn on/off mouseCapture at the view level. Needed by the ESM so it must be in the public interface.

Parameters:
aPresContext presContext associated with the frame
aGrabMouseEvents PR_TRUE to enable capture, PR_FALSE to disable

Implements nsIFrame.

PRBool nsFrame::IsMouseCaptured nsIPresContext *  aPresContext  ) 
 

virtual void* nsFrame::GetProperty nsIPresContext *  aPresContext,
nsIAtom *  aPropertyName,
PRBool  aRemoveProperty
const [virtual]
 

Implements nsIFrame.

virtual nsresult nsFrame::SetProperty nsIPresContext *  aPresContext,
nsIAtom *  aPropertyName,
void *  aPropertyValue,
NSFramePropertyDtorFunc  aPropDtorFunc
[virtual]
 

Implements nsIFrame.

virtual const nsStyleStruct* nsFrame::GetStyleDataExternal nsStyleStructID  aSID  )  const [virtual]
 

Get the style data associated with this frame. This returns a const style struct pointer that should never be modified. See |nsIStyleContext::GetStyleData| for more information.

The use of the typesafe functions below is preferred to direct use of this function.

Implements nsIFrame.

void nsFrame::PaintSelf nsIPresContext *  aPresContext,
nsIRenderingContext &  aRenderingContext,
const nsRect &  aDirtyRect,
PRIntn  aSkipSides = 0,
PRBool  aUsePrintBackgroundSettings = 1
[protected]
 

To be called by |Paint| of this class or derived classes to paint the background, border, and outline, when in the correct layer to do so.

PRInt16 nsFrame::DisplaySelection nsIPresContext *  aPresContext,
PRBool  isOkToTurnOn = 0
[protected]
 

virtual nsresult nsFrame::GetFrameFromDirection nsIPresContext *  aPresContext,
nsPeekOffsetStruct *  aPos
[protected, virtual]