Public Types | Public Member Functions | Protected Attributes

nsDisplayGeneric Class Reference

Use this class to implement not-very-frequently-used display items that are not opaque, do not receive events, and are bounded by a frame's border-rect. More...

#include <nsDisplayList.h>

Inheritance diagram for nsDisplayGeneric:
Collaboration diagram for nsDisplayGeneric:

List of all members.

Public Types

typedef void(* PaintCallback )(nsIFrame *aFrame, nsIRenderingContext *aCtx, const nsRect &aDirtyRect, nsPoint aFramePt)

Public Member Functions

 nsDisplayGeneric (nsIFrame *aFrame, PaintCallback aPaint, const char *aName)
virtual void Paint (nsDisplayListBuilder *aBuilder, nsIRenderingContext *aCtx)
 Actually paint this item to some rendering context.

Protected Attributes

PaintCallback mPaint

Detailed Description

Use this class to implement not-very-frequently-used display items that are not opaque, do not receive events, and are bounded by a frame's border-rect.

This should not be used for display items which are created frequently, because each item is one or two pointers bigger than an item from a custom display item class could be, and fractionally slower. However it does save code size. We use this for infrequently-used item types.


Member Typedef Documentation

typedef void(* nsDisplayGeneric::PaintCallback)(nsIFrame *aFrame, nsIRenderingContext *aCtx, const nsRect &aDirtyRect, nsPoint aFramePt)

Constructor & Destructor Documentation

nsDisplayGeneric::nsDisplayGeneric ( nsIFrame *  aFrame,
PaintCallback  aPaint,
const char *  aName 
) [inline]

Member Function Documentation

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

Actually paint this item to some rendering context.

Content outside mVisibleRect need not be painted.

Reimplemented from nsDisplayItem.


Member Data Documentation


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