Programmer's Reference
The tool bar usually does not have widgets as children. Instead, it
has specialized children called tools (EwTool).
Tools are user interface elements that look like widgets but do not actually
use all of the platform resources required by a widget. Tools
collaborate with the parent tool bar to display themselves and handle user
events. You add widgets as children of a tool bar by associating a
widget with a widget tool.
Tools are created by sending one of the following messages to a tool
bar:
- createGroup:argBlock:
- Creates a group tool inside the tool bar. The first argument is the
name for the new tool; the second is its argument block. A
group is a tool that contains other tools.
- createLabelTool:argBlock:
- Creates a label tool inside the tool bar.
- createProgressBarTool:argBlock:
- Creates a progress bar tool inside the tool bar.
- createPushButtonTool:argBlock:
- Creates a push button tool inside the tool bar.
- createRadioButtonTool:argBlock:
- Creates a radio button tool inside the tool bar.
- createSeparatorTool:argBlock:
- Creates a separator tool inside the tool bar.
- createSimpleGroup:argBlock:
- Creates a simple group inside the tool bar. A simple
group is a tool that contains only buttons. It provides protocol
for specifying collections of images to be displayed in the group as
buttons.
- createToggleButtonTool:argBlock:
- Creates a toggle button tool inside the tool bar.
- createWidgetTool:name:argBlock:
- Creates a widget and adds it as a tool to the tool bar. The first
argument is the class of widget to be created; the second is its
name; the third is its argument block.
Tools are lighter weight than widgets and minimize platform
resources. However, they do not always look like a platform
widget. Using widgets and widget tools on the tool bar ensures that the
tools look exactly like their widget counterparts on a particular
platform. This platform look and feel, though, comes at the expense of
using platform resources.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]