User`s guide

5 GUIDE Preferences and Options
Add Comments for Newly Generated Callback Functions
Callbacks are blocks of code that execute in response to actions by the GUI’s
user, such as clicking buttons or manipulating sliders. By default, GUIDE
sets up templates that declare callbacks as functions and adds comments at
the beginning of each one. Most of the comments are similar to the following.
% --- Executes during object deletion, before destroying properties.
function figure1_D eleteFcn(hObject, eventdata, handles)
% hObject handle to figure1 (see GCBO)
% eventdata reserved - to be defined in a future v ersion of MATLAB
% handles structure with handles and user data (see GUIDATA)
Some callbacks are added automatically because their associated com ponents
are part of the original GUIDE template that you chose. Other commonly
used callbacks are added automatically when you add components. You can
also add callbacks explicitly by selecting them from View Callbacks on the
View menu or on the component’s context menu.
If you deselect this preference, GUIDE includes comments only for callbacks
that are automatically included to support the original GUIDE template.
GUIDE does not include comments for callbacks subsequently added to the
code.
See “Customizing Callbacks in GUIDE” on page 8-15 for more information
about callbacks and about the arguments described in the comments above.
5-8