Public Member Functions

nsDisplayBackground Class Reference

The standard display item to paint the CSS background of a frame. More...

#include <nsDisplayList.h>

Inheritance diagram for nsDisplayBackground:
Collaboration diagram for nsDisplayBackground:

List of all members.

Public Member Functions

 nsDisplayBackground (nsIFrame *aFrame)
virtual nsIFrame * HitTest (nsDisplayListBuilder *aBuilder, nsPoint aPt, HitTestState *aState)
 This is called after we've constructed a display list for event handling.
virtual PRBool IsOpaque (nsDisplayListBuilder *aBuilder)
virtual PRBool IsVaryingRelativeToMovingFrame (nsDisplayListBuilder *aBuilder)
virtual PRBool IsUniform (nsDisplayListBuilder *aBuilder)
virtual nsRect GetBounds (nsDisplayListBuilder *aBuilder)
 The default bounds is the frame border rect.
virtual void Paint (nsDisplayListBuilder *aBuilder, nsIRenderingContext *aCtx)
 Actually paint this item to some rendering context.

Detailed Description

The standard display item to paint the CSS background of a frame.


Constructor & Destructor Documentation

nsDisplayBackground::nsDisplayBackground ( nsIFrame *  aFrame  )  [inline]

Member Function Documentation

virtual nsRect nsDisplayBackground::GetBounds ( nsDisplayListBuilder aBuilder  )  [virtual]

The default bounds is the frame border rect.

Returns:
a rectangle relative to aBuilder->ReferenceFrame() that contains the area drawn by this display item

Reimplemented from nsDisplayItem.

virtual nsIFrame* nsDisplayBackground::HitTest ( nsDisplayListBuilder aBuilder,
nsPoint  aPt,
HitTestState aState 
) [inline, virtual]

This is called after we've constructed a display list for event handling.

When this is called, we've already ensured that aPt is in the item's bounds.

Parameters:
aState must point to a HitTestState. If you don't have one, just create one with the default constructor and pass it in.
Returns:
the frame that the point is considered over, or nsnull if this is not over any frame

Reimplemented from nsDisplayItem.

virtual PRBool nsDisplayBackground::IsOpaque ( nsDisplayListBuilder aBuilder  )  [virtual]
Returns:
PR_TRUE if the item is definitely opaque --- i.e., paints every pixel within its bounds opaquely

Reimplemented from nsDisplayItem.

virtual PRBool nsDisplayBackground::IsUniform ( nsDisplayListBuilder aBuilder  )  [virtual]
Returns:
PR_TRUE if the item is guaranteed to paint every pixel in its bounds with the same (possibly translucent) color

Reimplemented from nsDisplayItem.

virtual PRBool nsDisplayBackground::IsVaryingRelativeToMovingFrame ( nsDisplayListBuilder aBuilder  )  [virtual]
Returns:
PR_FALSE if the painting performed by the item is invariant when frame aFrame is moved relative to aBuilder->GetRootMovingFrame(). This can only be called when aBuilder->IsMovingFrame(mFrame) is true. It return PR_TRUE for all wrapped lists.

Reimplemented from nsDisplayItem.

virtual void nsDisplayBackground::Paint ( nsDisplayListBuilder aBuilder,
nsIRenderingContext *  aCtx 
) [virtual]

Actually paint this item to some rendering context.

Content outside mVisibleRect need not be painted.

Reimplemented from nsDisplayItem.


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