Creating Graphical User Interfaces    

Understanding the Application M-File

MATLAB generates the application M-file to provide a framework for the program that controls the GUI. This framework fosters a programming style that is efficient and robust. All code, including the callbacks, is contained in the application M-file. Each callback is implemented as a subfunction in the M-file. This approach enables the M-file to have a single entry point that can initialize the GUI or can call the appropriate callback, or any helper subfunction you may want to use in your GUI.

Whether or not you use the GUIDE generated application M-file or create your own code, the programming techniques discussed here are useful approaches to GUI programming. The following sections discuss the architecture and functioning of the application M-file:


 Programming GUIs Automatic Naming of Callback Routines