User`s guide

Files Generated by GUIDE
Adding Callback
Templates to an Existing GUI Code
File
When you save the
GUI, GUIDE automatically adds templates for some
callbacks to th
ecodefile. Ifyouwanttoaddothercallbackstothefile,you
can easily do s
o.
Within GUIDE,
you can add a callback subfunction template to the code in
any o f the foll
owing ways. Select the component for w hich you want to add
the callback
,andthen:
Click the rig
ht mouse button to display the L ayout E ditor context menu.
Select the d
esired callback from the View callback s submenu.
In the View m
enu, select the desired callback from the View callbacks
submenu.
Double-cl
ick a component to show its properties in the Property Inspector.
In the Property Inspector, click the pencil-and-paper icon
next to the
name of the callback you wish to install in the code file.
For toolbar buttons, in the Toolbar Editor, click the View button next
to Clicked Callback (for Push Tool buttons) or On Callback,orOff
Callback (for Toggle Tools).
When you perform any of these actions, GUIDE adds the callback template to
the GUI code file and opens it for editing, at the callback you just added. If
you select a callback that currently ex ists in the GUI code file, GUIDE adds
no callback, but opens the file for editing at the callback you select.
For m ore information, see “Default Callback Properties in GUIDE” on page
8-11.
About GUIDE-Generated Callbacks
Callbacks created by GUIDE for GUI components are similar to callbacks
created programmatically, with certain differences.
GUIDE generates callbacks as function templates within the GU I code file,
which GUI components call via function handles.
8-9