nsIFrame Class Reference

#include <nsIFrame.h>

Inheritance diagram for nsIFrame:

Inheritance graph
[legend]
Collaboration diagram for nsIFrame:

Collaboration graph
[legend]
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 402 of file nsIFrame.h.

Public Member Functions

Protected Attributes


Member Function Documentation

nsIPresContext* nsIFrame::GetPresContext  )  const [inline]
 

Definition at line 407 of file nsIFrame.h.

References GetStyleContext().

Referenced by nsSVGGlyphFrame::GetHighlight(), nsSVGPathGeometryFrame::GetPresContext(), and nsSVGGlyphFrame::GetPresContext().

virtual nsresult nsIFrame::Init nsIPresContext *  aPresContext,
nsIContent *  aContent,
nsIFrame *  aParent,
nsStyleContext *  aContext,
nsIFrame *  aPrevInFlow
[pure 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()

Implemented in nsSVGGlyphFrame, nsSVGPathGeometryFrame, and nsFrame.

virtual nsresult nsIFrame::Destroy nsIPresContext *  aPresContext  )  [pure virtual]
 

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

Implemented in nsFrame.

virtual void nsIFrame::RemovedAsPrimaryFrame nsIPresContext *  aPresContext  )  [inline, virtual]
 

Definition at line 444 of file nsIFrame.h.

virtual nsresult nsIFrame::SetInitialChildList nsIPresContext *  aPresContext,
nsIAtom *  aListName,
nsIFrame *  aChildList
[pure 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()

Implemented in nsFrame.

virtual nsresult nsIFrame::AppendFrames nsIPresContext *  aPresContext,
nsIPresShell &  aPresShell,
nsIAtom *  aListName,
nsIFrame *  aFrameList
[pure 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

Implemented in nsFrame.

virtual nsresult nsIFrame::InsertFrames nsIPresContext *  aPresContext,
nsIPresShell &  aPresShell,
nsIAtom *  aListName,
nsIFrame *  aPrevFrame,
nsIFrame *  aFrameList
[pure 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

Implemented in nsFrame.

virtual nsresult nsIFrame::RemoveFrame nsIPresContext *  aPresContext,
nsIPresShell &  aPresShell,
nsIAtom *  aListName,
nsIFrame *  aOldFrame
[pure 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

Implemented in nsFrame.

virtual nsresult nsIFrame::ReplaceFrame nsIPresContext *  aPresContext,
nsIPresShell &  aPresShell,
nsIAtom *  aListName,
nsIFrame *  aOldFrame,
nsIFrame *  aNewFrame
[pure 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

Implemented in nsFrame.

nsIContent* nsIFrame::GetContent  )  const [inline]
 

Get the content object associated with this frame. Does not add a reference.

Definition at line 555 of file nsIFrame.h.

References mContent.

virtual nsresult nsIFrame::GetOffsets PRInt32 &  start,
PRInt32 &  end
const [pure virtual]
 

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

Implemented in nsFrame.

virtual void nsIFrame::AdjustOffsetsForBidi PRInt32  aStart,
PRInt32  aEnd
[inline, virtual]
 

Reset the offsets when splitting frames during Bidi reordering

Definition at line 567 of file nsIFrame.h.

nsStyleContext* nsIFrame::GetStyleContext  )  const [inline]
 

Get the style context associated with this frame.

Definition at line 573 of file nsIFrame.h.

References mStyleContext.

Referenced by nsSVGGlyphFrame::GetFont(), and GetPresContext().

void nsIFrame::SetStyleContext nsIPresContext *  aPresContext,
nsStyleContext *  aContext
[inline]
 

Definition at line 574 of file nsIFrame.h.

References DidSetStyleContext(), and mStyleContext.

virtual nsresult nsIFrame::DidSetStyleContext nsIPresContext *  aPresContext  )  [pure virtual]
 

Implemented in nsSVGPathGeometryFrame, and nsFrame.

Referenced by SetStyleContext().

virtual const nsStyleStruct* nsIFrame::GetStyleDataExternal nsStyleStructID  aSID  )  const [pure 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.

Implemented in nsFrame.

Referenced by GetStyleData().

const nsStyleStruct* nsIFrame::GetStyleData nsStyleStructID  aSID  )  const [inline]
 

Definition at line 600 of file nsIFrame.h.

References GetStyleDataExternal(), and mStyleContext.

virtual nsresult nsIFrame::CalcBorderPadding nsMargin &  aBorderPadding  )  const [pure virtual]
 

Implemented in nsFrame.

virtual nsStyleContext* nsIFrame::GetAdditionalStyleContext PRInt32  aIndex  )  const [pure 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.

Implemented in nsFrame.

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

Implemented in nsFrame.

nsIFrame* nsIFrame::GetParent  )  const [inline]
 

Accessor functions for geometric parent

Definition at line 647 of file nsIFrame.h.

References mParent.

virtual nsresult nsIFrame::SetParent const nsIFrame *  aParent  )  [inline, virtual]
 

Definition at line 648 of file nsIFrame.h.

References mParent.

nsRect nsIFrame::GetRect  )  const [inline]
 

Bounding rect of the frame. The values are in twips, and the origin is relative to the upper-left of the geometric parent. The size includes the content area, borders, and padding.

Note: moving or sizing the frame does not affect the view's size or position.

Definition at line 658 of file nsIFrame.h.

References mRect.

nsPoint nsIFrame::GetPosition  )  const [inline]
 

Definition at line 659 of file nsIFrame.h.

References mRect.

nsSize nsIFrame::GetSize  )  const [inline]
 

Definition at line 660 of file nsIFrame.h.

References mRect.

void nsIFrame::SetRect const nsRect &  aRect  )  [inline]
 

Definition at line 661 of file nsIFrame.h.

References mRect.

void nsIFrame::SetPosition const nsPoint &  aPt  )  [inline]
 

Definition at line 662 of file nsIFrame.h.

References mRect.

void nsIFrame::SetSize const nsSize &  aSize  )  [inline]
 

Definition at line 663 of file nsIFrame.h.

References mRect.

virtual nsresult nsIFrame::GetAdditionalChildListName PRInt32  aIndex,
nsIAtom **  aListName
const [pure 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

Implemented in nsFrame.

virtual nsresult nsIFrame::FirstChild nsIPresContext *  aPresContext,
nsIAtom *  aListName,
nsIFrame **  aFirstChild
const [pure 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()

Implemented in nsFrame.

nsIFrame* nsIFrame::GetNextSibling  )  const [inline]
 

Child frames are linked together in a singly-linked list

Definition at line 693 of file nsIFrame.h.

References mNextSibling.

Referenced by nsSVGGlyphFrame::GetNextGlyphFragment().

void nsIFrame::SetNextSibling nsIFrame *  aNextSibling  )  [inline]
 

Definition at line 694 of file nsIFrame.h.

References mNextSibling.

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

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

Implemented in nsFrame.

virtual PRBool nsIFrame::CanPaintBackground  )  [inline, virtual]
 

Definition at line 711 of file nsIFrame.h.

virtual nsresult nsIFrame::HandleEvent nsIPresContext *  aPresContext,
nsGUIEvent *  aEvent,
nsEventStatus *  aEventStatus
[pure 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

Implemented in nsFrame.

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

Implemented in nsFrame.

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

Implemented in nsFrame.

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

Get the cursor for a given frame.

Implemented in nsFrame.

virtual nsresult nsIFrame::GetFrameForPoint nsIPresContext *  aPresContext,
const nsPoint &  aPoint,
nsFramePaintLayer  aWhichLayer,
nsIFrame **  aFrame
[pure 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.

Implemented in nsFrame.

virtual nsresult nsIFrame::GetPointFromOffset nsIPresContext *  inPresContext,
nsIRenderingContext *  inRendContext,
PRInt32  inOffset,
nsPoint *  outPoint
[pure 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

Implemented in nsFrame.

virtual nsresult nsIFrame::GetChildFrameContainingOffset PRInt32  inContentOffset,
PRBool  inHint,
PRInt32 *  outFrameContentOffset,
nsIFrame **  outChildFrame
[pure 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.

Implemented in nsFrame.

nsFrameState nsIFrame::GetStateBits  )  const [inline]
 

Get the current frame-state value for this frame. aResult is filled in with the state bits.

Definition at line 791 of file nsIFrame.h.

References mState, and nsFrameState.

void nsIFrame::AddStateBits nsFrameState  aBits  )  [inline]
 

Update the current frame-state value for this frame.

Definition at line 796 of file nsIFrame.h.

References mState.

void nsIFrame::RemoveStateBits nsFrameState  aBits  )  [inline]
 

Definition at line 797 of file nsIFrame.h.

References mState.

virtual nsresult nsIFrame::ContentChanged nsIPresContext *  aPresContext,
nsIContent *  aChild,
nsISupports *  aSubContent
[pure 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

Implemented in nsSVGGlyphFrame, and nsFrame.

virtual nsresult nsIFrame::AttributeChanged nsIPresContext *  aPresContext,
nsIContent *  aChild,
PRInt32  aNameSpaceID,
nsIAtom *  aAttribute,
PRInt32  aModType
[pure 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

Implemented in nsFrame.

virtual nsresult nsIFrame::IsSplittable nsSplittableType aIsSplittable  )  const [pure virtual]
 

Return how your frame can be split.

Implemented in nsFrame.

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

Flow member functions

Implemented in nsFrame.

virtual nsresult nsIFrame::SetPrevInFlow nsIFrame *   )  [pure virtual]
 

Implemented in nsFrame.

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

Implemented in nsFrame.

virtual nsresult nsIFrame::SetNextInFlow nsIFrame *   )  [pure virtual]
 

Implemented in nsFrame.

virtual nsIFrame* nsIFrame::GetFirstInFlow  )  const [inline, virtual]
 

Return the first frame in our current flow.

Definition at line 844 of file nsIFrame.h.

virtual nsIFrame* nsIFrame::GetLastInFlow  )  const [inline, virtual]
 

Return the last frame in our current flow.

Definition at line 851 of file nsIFrame.h.

virtual nsresult nsIFrame::WillReflow nsIPresContext *  aPresContext  )  [pure 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...

Implemented in nsFrame.

virtual nsresult nsIFrame::Reflow nsIPresContext *  aPresContext,
nsHTMLReflowMetrics &  aReflowMetrics,
const nsHTMLReflowState &  aReflowState,
nsReflowStatus aStatus
[pure 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

Implemented in nsFrame.

virtual nsresult nsIFrame::DidReflow nsIPresContext *  aPresContext,
const nsHTMLReflowState *  aReflowState,
nsDidReflowStatus  aStatus
[pure 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?

Implemented in nsFrame.

virtual nsresult nsIFrame::CanContinueTextRun PRBool &  aContinueTextRun  )  const [pure 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.

Implemented in nsFrame.

virtual nsresult nsIFrame::AdjustFrameSize nscoord  aExtraSpace,
nscoord &  aUsedSpace
[pure virtual]
 

Implemented in nsFrame.

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

Implemented in nsFrame.

PRBool nsIFrame::HasView  )  const [inline]
 

Accessor functions to get/set the associated view object

GetView returns non-null if and only if |HasView| returns true.

Definition at line 961 of file nsIFrame.h.

References mState, and NS_FRAME_HAS_VIEW.

nsIView* nsIFrame::GetView  )  const
 

Referenced by GetView().

virtual nsIView* nsIFrame::GetViewExternal  )  const [virtual]
 

Referenced by GetViewExternal().

nsresult nsIFrame::SetView nsIView *  aView  ) 
 

Referenced by SetView().

nsIView* nsIFrame::GetClosestView  )  const
 

Find the closest view (on |this| or an ancestor).

Referenced by GetClosestView().

nsIFrame* nsIFrame::GetAncestorWithView  )  const
 

Find the closest ancestor (excluding |this| !) that has a view

virtual nsIFrame* nsIFrame::GetAncestorWithViewExternal  )  const [virtual]
 

Referenced by GetParentWithView().

virtual nsresult nsIFrame::GetOffsetFromView nsIPresContext *  aPresContext,
nsPoint &  aOffset,
nsIView **  aView
const [pure 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

Implemented in nsFrame.

virtual nsresult nsIFrame::GetOriginToViewOffset nsIPresContext *  aPresContext,
nsPoint &  aOffset,
nsIView **  aView
const [pure 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.

Implemented in nsFrame.

virtual PRBool nsIFrame::AreAncestorViewsVisible  )  const [virtual]
 

Returns true if and only if all views, from |GetClosestView| up to the top of the view hierarchy are visible.

Referenced by AreAncestorViewsVisible().

virtual nsIWidget* nsIFrame::GetWindow  )  const [virtual]
 

Returns the window that contains this frame. If this frame has a view and the view has a window, then this frames window is returned, otherwise this frame's geometric parent is checked recursively upwards.

virtual nsresult nsIFrame::GetFrameType nsIAtom **  aType  )  const [pure virtual]
 

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

See also:
nsLayoutAtoms

Implemented in nsFrame.

virtual nsresult nsIFrame::IsPercentageBase PRBool &  aBase  )  const [pure virtual]
 

Is this frame a "containing block"?

Implemented in nsFrame.

virtual nsresult nsIFrame::SetSelected nsIPresContext *  aPresContext,
nsIDOMRange *  aRange,
PRBool  aSelected,
nsSpread  aSpread
[pure 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?

Implemented in nsSVGGlyphFrame, and nsFrame.

virtual nsresult nsIFrame::GetSelected PRBool *  aSelected  )  const [pure virtual]
 

Implemented in nsSVGGlyphFrame, and nsFrame.

virtual nsresult nsIFrame::IsSelectable PRBool *  aIsSelectable,
PRUint8 *  aSelectStyle
const [pure 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).

Implemented in nsFrame.

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

Called to retrieve the SelectionController associated with the frame.

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

Implemented in nsFrame.

virtual nsresult nsIFrame::CaptureMouse nsIPresContext *  aPresContext,
PRBool  aGrabMouseEvents
[pure 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

Implemented in nsFrame.

virtual nsresult nsIFrame::PeekOffset nsIPresContext *  aPresContext,
nsPeekOffsetStruct *  aPos
[pure 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

Implemented in nsFrame.

virtual nsresult nsIFrame::CheckVisibility nsIPresContext *  aContext,
PRInt32  aStartIndex,
PRInt32  aEndIndex,
PRBool  aRecurse,
PRBool *  aFinished,
PRBool *  _retval
[pure 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.

Implemented in nsFrame.

virtual nsresult nsIFrame::ReflowDirtyChild nsIPresShell *  aPresShell,
nsIFrame *  aChild
[pure 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.

Implemented in nsFrame.

virtual nsresult nsIFrame::GetParentStyleContextFrame nsIPresContext *  aPresContext,
nsIFrame **  aProviderFrame,
PRBool *  aIsChild
[pure 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. <