
12 Examples of GUIs Created Programmatically
12-38
3 GUI figure and component creation.
4 Command line input processing.
5 GUI initialization.
6 Block execution of the program until the GUI user clicks OK or Cancel.
7 Return output if requested.
8 Callback definitions. These callbacks, which service the GUI components,
are subfunctions of the
iconEditor function and so have access to the data
and component handles created at the top level, without their having to be
passed as arguments.
9 Helper function definitions. These helper functions are subfunctions of the
iconEditor function and so have access to the data and component handles
created at the top level, without their having to be passed as arguments.
Note For information about using nested functions, see Nested Functions in
the MATLAB documentation.
GUI Programming Techniques
This topic explains the following GUI programming techniques as they are
used in the creation of the iconEditor.
• “Returning Only After the User Makes a Choice” on page 12-39
• “Passing Input Arguments to a GUI” on page 12-40
• “Retrieving Output on Return from a GUI” on page 12-41
• “Protecting a GUI from Inadvertent Access” on page 12-41
• “Running a GUI on Multiple Platforms” on page 12-42
• “Making a GUI Modal” on page 12-44
• “Sharing Data Between Two GUIs” on page 12-44
• “Achieving Proper Resize Behavior” on page 12-45
Komentáře k této Příručce