User`s guide
6 Lay Out a GUIDE GUI
• Predefined tools, having standard icons and behaviors
• Custom tools, having generic icons and n o b ehaviors
Predefined Tools. The set of icons o n the bottom of the Tool Palette
represent standard MATLAB figure tools. Their behavior is built in.
Predefined tools that require an axes (such as pan and zoom) do n ot exhibit
any behavior in GUIs lacking axes. The callback(s) defining the behavior of
the predefined tool are shown as
%default, which calls the same function
that the tool calls in standard figure toolbars and menus (to open files, save
figures, change modes, etc.). You can change
%default to some other callback
to custom ize the tool; GUIDE warns you that you will modify the behavior of
the tool when you change a callback field or click the View button next to i t,
and asks if you w ant to proceed or not.
Custom Tools. The two icons at the top of the Tool Palette create pushtools
and toggletools. These have no built-in behavior except for m anaging their
appearance wh en clicked on and off. Consequently, y ou need to provide your
own callback(s) when you add one to your toolbar. In order for custom tools to
respond to clicks, you need to edit their callbacks to create the behaviors you
desire. Do this by clicking the View button next to the callback in the Tool
Properties pane, and then editing the callback in the Editor window.
Add and Remove Separators
Separators are vertical bars that set off tools, enabling you to group them
visually. You can add or remove a separator in any of three ways:
• Right-click on a tool’s preview and select Show Separator,whichtoggles
its separator on and off.
• Check or clear the check box Separator to the left in the tool’s property
pane.
• Change the
Separator property of the tool from the Property Inspector
After adding a separator, that s eparator appears in the Toolbar Layout
to the left of the tool. The separator is not a distinct object or icon; it is a
property of the tool.
6-128