MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Betriebsanweisung Seite 737

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 759
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 736
Icon Editor
mIconWidth = 16; % Use input property ' iconwidth' to initialize
mIconHeight = 16; % Use input property 'ic onheight' to initialize
mIconFile = fullfile(matlabroot,'/toolbox/matlab/icons/');
The values of mIconWidth and mIconHeight are interpreted as pixels. The
fullfile function builds a full file name from parts.
Process the Input Arguments. The
processUserInputs helper function
processes the input property/value pairs.
iconEdit calls proc essUserInputs
after the layout is complete and just before it needs the inputs to initialize
the GUI.
% Process the command line inp ut arguments supplied when
% the GUI is invoked
processUserInputs();
1 processUserI nputs sequences through the inputs, if any, and tries
to match each property name to a string in the first column of the
mPropertyDefs cell array.
2 If it finds a match, processUserInputs assigns the value that was input
for the property to its variable in the third column of the
mPropertyDefs
cell array.
3 processUserI nputs then calls the helper function specified in the second
column of the
mPropertyDefs cellarraytovalidatethevaluethatwas
passed in for the property.
Retrieve Output on Return from a GUI
If you call iconEditor with an output argument, it returns a truecolor image
as an n-by-m-by-3 array.
The data definition section of the code creates a cell array to hold the output:
mOutputArgs = {}; % Variable for storing output when GUI returns
Following the call to uiwa it, w hich stops the sequential execution of the
code file, iconEdit assigns the constructed icon array,
mIconEdit,tothecell
array
mOutputArgs and then assigns mOutputArgs to varargout to return
the arguments.
15-73
Seitenansicht 736
1 2 ... 732 733 734 735 736 737 738 739 740 741 742 ... 758 759

Kommentare zu diesen Handbüchern

Keine Kommentare