User's Guide


Defining a custom widget

Earlier, you learned that each primitive visual part has a matching Common Widget, which displays and manages the control and hides the operating system-specific details of the control. Notice that the circle method you wrote earlier doesn't really draw a circle. It simply defers the real work of drawing the circle to its widget, by sending the message drawFilledCircle to the widget.

The widget that is inherited from AbtDrawingAreaView is a CwDrawingArea widget. CwDrawingArea objects do not understand the message drawFilledCircle, so you need to implement a new widget to handle the drawing operations for the shape part.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]