MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Manual de usuario Pagina 19

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 330
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 18
How Does a GUI Work?
1-3
How Does a GUI Work?
Each component, and the GUI itself, is associated with one or more
user-written routines known as callbacks. The execution of each callback is
triggered by a particular user action such as a button push, mouse click,
selection of a menu item, or the cursor passing over a component. You, as the
creator of the GUI, provide these callbacks.
In the GUI described in “What Is a GUI?” on page 1-2, the user selects a data
set from the pop-up menu, then clicks one of the plot type buttons. Clicking the
button triggers the execution of a callback that plots the selected data in the
axes.
This kind of programming is often referred to as event-driven programming.
The event in the example is a button click. In event-driven programming,
callback execution is asynchronous, controlled by events external to the
software. In the case of MATLAB GUIs, these events usually take the form of
user interactions with the GUI.
The writer of a callback has no control over the sequence of events that leads
to its execution or, when the callback does execute, what other callbacks might
be running simultaneously.
Vista de pagina 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 ... 329 330

Comentarios a estos manuales

Sin comentarios