There are three different type of widget implementations. 1. Atomic widget This widget is always a leaf in the widget tree (never has a child widget). Example: label. 2. Layout widget This widget may have child widgets. The main purpose of a layout widget is to arrange its children, but as a side effect the layout widget may also: - draw (frame, background, overlay) - manage secondary lists and information about its children - implement mechanisms operating over its children. Simple examples are the box and tbl widgets, whose primary goal is to arrange their children. A more advanced example is the button widget, whose primary goal is to draw decoration (button graphics) around its child widget. It also arranges its children, but a typical button has a single child. An advanced example is the menu widget, which is a vbox of widgets used for menu items. Besides arranging the widgets in a vertical box, the menu keeps tracks of its children to remember associated submenus and pop them up on when a menu item has the cursor. 3. Composite widget A composite widget is really a subtree of widgets. The _new() call of the widget creates the subtree. A simple example is the rim widget, which adds a box and a label widget (for title) around a child widget. An advanced example is the scrolled_wb widget, which creates a table of three widgets: a scrolled and two scrollbars. It then keeps the scrollbars synced with the scroll offset of the scrolled widget.