Public Member Functions

nsDisplayOutline Class Reference

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

#include <nsDisplayList.h>

Inheritance diagram for nsDisplayOutline:
Collaboration diagram for nsDisplayOutline:

List of all members.

Public Member Functions

 nsDisplayOutline (nsIFrame *aFrame)
virtual Type GetType ()
 Some consecutive items should be rendered together as a unit, e.g., outlines for the same element.
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.
virtual PRBool ComputeVisibility (nsDisplayListBuilder *aBuilder, nsRegion *aVisibleRegion, nsRegion *aVisibleRegionBeforeMove)
 On entry, aVisibleRegion contains the region (relative to ReferenceFrame()) which may be visible.

Detailed Description

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


Constructor & Destructor Documentation

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

Member Function Documentation

virtual PRBool nsDisplayOutline::ComputeVisibility ( nsDisplayListBuilder aBuilder,
nsRegion aVisibleRegion,
nsRegion aVisibleRegionBeforeMove 
) [virtual]

On entry, aVisibleRegion contains the region (relative to ReferenceFrame()) which may be visible.

If the display item opaquely covers an area, it can remove that area from aVisibleRegion before returning. If we're doing scroll analysis with moving frames, then aVisibleRegionBeforeMove will be non-null and contains the region that would have been visible before the move. aVisibleRegion contains the region that is visible after the move. nsDisplayList::ComputeVisibility automatically subtracts the bounds of items that return true from IsOpaque(), and automatically removes items whose bounds do not intersect the visible area, so implementations of nsDisplayItem::ComputeVisibility do not need to do these things. nsDisplayList::ComputeVisibility will already have set mVisibleRect on this item to the intersection of *aVisibleRegion (unioned with *aVisibleRegionBeforeMove, if that's non-null) and this item's bounds.

Returns:
PR_TRUE if the item is visible, PR_FALSE if no part of the item is visible

Reimplemented from nsDisplayItem.

virtual nsRect nsDisplayOutline::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 Type nsDisplayOutline::GetType (  )  [inline, virtual]

Some consecutive items should be rendered together as a unit, e.g., outlines for the same element.

For this, we need a way for items to identify their type.

Reimplemented from nsDisplayItem.

virtual void nsDisplayOutline::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: