Draw yourself into the available space. 0,0 will be your top
left.
Note that the width may be larger than the DataSource.GetItemSize method returned because unused
space is spread amongst the items. It will never be smaller than what
was returned. You should set the clipping region if necessary.
The main display code needs to know the bounding box for each item so
that it can tell when an item has been clicked on, as opposed to the
white space surrounding an item. By default it clears the bounding box
and looks at what area you draw on in this function. If you return None,
then that is what happens.
Instead you may also return a 4 item tuple of (minx, miny, maxx, maxy)
and that will be used.
- Parameters:
dc - The device context to draw into
width - maximum space to use
height - maximum space to use
selected - if the item is currently selected
|