Name
Group.Paint -- request paint notification
Function
Set up a listener on this attribute to have your event handler called whenever the group background needs to be drawn. Your event handler can then draw custom graphics to the group background.

RapaGUI will pass the identifier of a Hollywood brush whose size is exactly as big as the group background. You then have to draw the desired background graphics to this brush. Precisely, you just have to draw to the rectangle defined by the four coordinates X, Y, Width, and Height which are passed to your callback as well. These four coordinates describe a rectangular area within the dimensions of the brush that is passed to your callback. When a full redraw is needed, X and Y will be 0 and Width and Height will match the dimensions of the brush. Most oftenly, however, only a partial redraw is needed and then you must only draw to the portion of the brush defined by those coordinates.

The following extra arguments will be passed to your event handler:

Brush:
Contains the identifier of a brush you have to draw to. Use Hollywood's SelectBrush() command to select this brush as the output device in your callback. Don't forget to call EndSelect() when you are done!

ViewWidth:
Contains the total group width. This is also identical to the width of the brush that is passed to your callback.

ViewHeight:
Contains the total group height. This is also identical to the height of the brush that is passed to your callback.

X:
Contains the x-position inside the brush at which you should start drawing. See above for details.

Y:
Contains the y-position inside the brush at which you should start drawing. See above for details.

Width:
Contains the number of columns you should paint to the brush (starting from X). See above for details.

Height:
Contains the number of rows you should paint to the brush (starting from Y). See above for details.

Note that Group.Paint must only be used with <hgroup> or <vgroup> objects. It isn't supported for <colgroup> objects. Also, you must not set Group.Frame to True when using this attribute. If you want to draw the background of a framed group, you have to create a helper group around the group whose background you want to draw, e.g.

 
<vgroup frame="true" padding="0">
    <vgroup notify="paint">
        ...
    </vgroup>
</vgroup>

If you want to draw the background of a <colgroup>, you can also just create a helper group around the column group (see above).

Note that on AmigaOS and compatibles this feature is only available on MUI 4.0 or higher.

Type
Boolean

Applicability
N


Show TOC