Specifications
3 Laying Out GUIs and Setting Properties
3-64
Syntax of the Callback Subfunction
The GUI M-file contains all callbacks for the GUI, including the menu
callbacks. All generated callbacks use the same syntax.
For example, the
Select all menu item from the previous example has following
callback string:
MyGui('menu_edit_selectall_Callback',gcbo,[],guidata(gcbo))
where:
•
MyGui — is the name of the GUI M-file that launches the figure containing
the menus.
•
menu_edit_selectall_Callback — is the name of the subfunction callback
for the
Select All menu item (derived from the Tag specified in the Menu
Editor).
•
gcbo — is the handle of the Select All uimenu item.
•
[] — is an empty matrix used as a place holder for future use.
•
guidata(gcbo) — gets the handles structure from the figure’s application
data.
Tag forms the
name of the
callback