previous up next     contents index
Next: wxSnip::GetNumScrollSteps Up: wxSnip: wxObject Previous: wxSnip::GetAdmin

wxSnip::GetExtent

void GetExtent (wxDC *dc, float x, float y, float *w = NULL, float *h = NULL, float *descent = NULL, float *space = NULL, float *lspace = NULL, float *rspace = NULL)

Calculates the snip's width, height, descent (amount of height which should be drawn below the baseline), space (amount of height which is ``filler'' space at the top), and horizontal spaces (amount of width which is ``filler'' space at the left and right). Any of the last six parameters may be NULL. Override this method in your own snip class. The default GetExtent fills in all return values with 0.0.

A drawing context is provided for the purpose of finding font sizes, etc., but no drawing should occur. x and y specify the snip's left and top locations. In an editor bufferm, y is the line's top location; the snip's actual top location may not be determined until its height is known.



PLT