Creating Graphical User Interfaces    

Getting Started with GUIDE

GUIDE - GUI Development Environment

GUIDE Toolset

GUI FIG-Files and M-Files

Using GUIDE Templates

Example: Creating a GUI

Designing the GUI

Laying Out the GUI

Layout and Code for the Example

Open a New GUI in the Layout Editor

Set the GUI Figure Size

Add the Components

Align the Objects

Programming the GUI

Set Properties for the GUI Components

Opening the GUI M-File

Opening Function

Sharing Data Between Callbacks

Adding Code to the Opening Function

Adding Code to the Callbacks

Using the Object Browser to Identify Callbacks

Saving and Running the GUI

MATLAB GUIs

What Is a GUI?

Creating GUIs with GUIDE

GUI Development Environment

Editing Version 5 GUIs with Version 6 GUIDE

Using GUIDE Templates

Blank GUI

GUI with UIcontrols

GUI with Axes and Menu

Modal Question Dialog

Example: Using the Modal Dialog to Confirm an Operation

View the Layout and GUI M-File

Setting Up the Close Confirmation Dialog

Setting Up the GUI with the Close Button

Running the GUI with the Close Button

How the GUI and Dialog Work

Example: Displaying an Image File

Selecting GUI Options

Configuring the GUI M-File

Resize Behavior

Command-Line Accessibility

Generate FIG-File and M-File

Generate Callback Function Prototypes

GUI Allows Only One Instance to Run (Singleton)

Using the System Background Colors

Generate FIG-File Only

User Interface Controls

Push Buttons

Toggle Buttons

Radio Buttons

Check Boxes

Edit Text

Static Text

Sliders

Frames

List Boxes

Pop-Up Menus

Enabling or Disabling Controls

Axes

Figure

Renaming GUI Files and Tags

Renaming GUI Files Using Save As

Changing Component Tag Properties

Updating Callback Properties and Functions After Changing Tags

Changing the Name of Callback Properties

Exporting a GUI to a Single M-File

GUIDE Layout Tools

Laying Out GUIs - The Layout Editor

Placing Objects In the Layout Area

Running the GUI

Saving the Layout

Displaying Your GUI

Layout Editor Preferences

Layout Editor Context Menus

Aligning Components in the Layout Editor

Aligning Groups of Components - The Alignment Tool

Grids and Rulers

Aligning Components to Guide Lines

Front to Back Positioning

Setting Component Properties - The Property Inspector

Viewing the Object Hierarchy - The Object Browser

Creating Menus - The Menu Editor

Defining Menus for the Menu Bar

Menu Callbacks

Defining Context Menus

Setting the Tab Order - The Tab Order Editor

Programming GUIs

Understanding the GUI M-File

Sharing Data with the Handles Structure

Functions and Callbacks in the M-File

Opening Function

Output Function

Callbacks

Input and Output Arguments

Managing GUI Data with the Handles Structure

Example: Passing Data Between Callbacks

Application Data

Designing for Cross-Platform Compatibility

Using the Default System Font

Using Standard Background Color

Cross-Platform Compatible Figure Units

Types of Callbacks

Callback Properties for All Graphics Objects

Callback Properties for Figures

Which Callback Executes

Adding A Callback

Interrupting Executing Callbacks

Controlling Interruptibility

The Event Queue

Event Processing During Callback Execution

Controlling Figure Window Behavior

Using Modal Figure Windows

Application Examples

GUI with Multiple Axes

Techniques Used in the Example

View the Layout and GUI M-File

Design of the GUI

Plot Push Button Callback

List Box Directory Reader

View the Layout and GUI M-File

Implementing the GUI

Specifying the Directory to List

Loading the List Box

Accessing Workspace Variables from a List Box

Techniques Used in This Example

View the Layout and GUI M-File

Reading Workspace Variables

Reading the Selections from the List Box

A GUI to Set Simulink Model Parameters

Techniques Used in This Example

View the Layout and GUI M-File

How to Use the GUI (Text of GUI Help)

Running the GUI

Programming the Slider and Edit Text Components

Running the Simulation from the GUI

Removing Results from the List Box

Plotting the Results Data

The GUI Help Button

Closing the GUI

The List Box Callback and Create Function

An Address Book Reader

Techniques Used in This Example

Managing Shared Data

View the Layout and GUI M-File

Running the GUI

Loading an Address Book Into the Reader

The Contact Name Callback

The Contact Phone Number Callback

Paging Through the Address Book - Prev/Next

Saving Changes to the Address Book from the Menu

The Create New Menu

The Address Book Resize Function


  Creating Graphical User Interfaces Getting Started with GUIDE