Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > b38d2da330d1936e5ab1307c039c4941 > files > 298

octave-doc-3.6.4-3.mga4.noarch.rpm

<html lang="en">
<head>
<title>I/O Dialogs - GNU Octave</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Octave">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="GUI-Development.html#GUI-Development" title="GUI Development">
<link rel="next" href="Progress-Bar.html#Progress-Bar" title="Progress Bar">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="I%2fO-Dialogs"></a>
<a name="I_002fO-Dialogs"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Progress-Bar.html#Progress-Bar">Progress Bar</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="GUI-Development.html#GUI-Development">GUI Development</a>
<hr>
</div>

<h3 class="section">35.1 I/O Dialogs</h3>

<p>Simple dialog menus are available for choosing directories or files.  They
return a string variable which can then be used with any command requiring
a file name.

<!-- uigetdir scripts/plot/uigetdir.m -->
   <p><a name="doc_002duigetdir"></a>

<div class="defun">
&mdash; Function File: <var>dirname</var> = <b>uigetdir</b> ()<var><a name="index-uigetdir-3064"></a></var><br>
&mdash; Function File: <var>dirname</var> = <b>uigetdir</b> (<var>init_path</var>)<var><a name="index-uigetdir-3065"></a></var><br>
&mdash; Function File: <var>dirname</var> = <b>uigetdir</b> (<var>init_path, dialog_name</var>)<var><a name="index-uigetdir-3066"></a></var><br>
<blockquote><p>Open a GUI dialog for selecting a directory.  If <var>init_path</var> is not
given the current working directory is used.  <var>dialog_name</var> may be
used to customize the dialog title. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002duigetfile.html#doc_002duigetfile">uigetfile</a>. 
</p></blockquote></div>

<!-- uigetfile scripts/plot/uigetfile.m -->
   <p><a name="doc_002duigetfile"></a>

<div class="defun">
&mdash; Function File: [<var>fname</var>, <var>fpath</var>, <var>fltidx</var>] = <b>uigetfile</b> ()<var><a name="index-uigetfile-3067"></a></var><br>
&mdash; Function File: [<small class="dots">...</small>] = <b>uigetfile</b> (<var>flt</var>)<var><a name="index-uigetfile-3068"></a></var><br>
&mdash; Function File: [<small class="dots">...</small>] = <b>uigetfile</b> (<var>flt, dialog_name</var>)<var><a name="index-uigetfile-3069"></a></var><br>
&mdash; Function File: [<small class="dots">...</small>] = <b>uigetfile</b> (<var>flt, dialog_name, default_file</var>)<var><a name="index-uigetfile-3070"></a></var><br>
&mdash; Function File: [<small class="dots">...</small>] = <b>uigetfile</b> (<var><small class="dots">...</small>, "Position", </var>[<var>px py</var>])<var><a name="index-uigetfile-3071"></a></var><br>
&mdash; Function File: [<small class="dots">...</small>] = <b>uigetfile</b> (<var><small class="dots">...</small>, "MultiSelect", mode</var>)<var><a name="index-uigetfile-3072"></a></var><br>
<blockquote>
        <p>Open a GUI dialog for selecting a file.  It returns the filename <var>fname</var>,
the path to this file <var>fpath</var>, and the filter index <var>fltidx</var>. 
<var>flt</var> contains a (list of) file filter string(s) in one of the following
formats:

          <dl>
<dt>"/path/to/filename.ext"<dd>If a filename is given then the file extension is extracted and used as
filter.  In addition, the path is selected as current path and the filename
is selected as default file.  Example: <code>uigetfile ("myfun.m")</code>

          <br><dt>A single file extension "*.ext"<dd>Example: <code>uigetfile ("*.ext")</code>

          <br><dt>A 2-column cell array<dd>containing a file extension in the first column and a brief description
in the second column. 
Example: <code>uigetfile ({"*.ext", "My Description";"*.xyz",
"XYZ-Format"})</code>

          <p>The filter string can also contain a semicolon separated list of filter
extensions. 
Example: <code>uigetfile ({"*.gif;*.png;*.jpg", "Supported Picture
Formats"})</code>
</dl>

        <p><var>dialog_name</var> can be used to customize the dialog title. 
If <var>default_file</var> is given then it will be selected in the GUI dialog. 
If, in addition, a path is given it is also used as current path.

        <p>The screen position of the GUI dialog can be set using the "Position" key
and a 2-element vector containing the pixel coordinates. 
Two or more files can be selected when setting the "MultiSelect" key to "on". 
In that case <var>fname</var> is a cell array containing the files. 
</p></blockquote></div>

<!-- uiputfile scripts/plot/uiputfile.m -->
   <p><a name="doc_002duiputfile"></a>

<div class="defun">
&mdash; Function File: [<var>fname</var>, <var>fpath</var>, <var>fltidx</var>] = <b>uiputfile</b> ()<var><a name="index-uiputfile-3073"></a></var><br>
&mdash; Function File: [<var>fname</var>, <var>fpath</var>, <var>fltidx</var>] = <b>uiputfile</b> (<var>flt</var>)<var><a name="index-uiputfile-3074"></a></var><br>
&mdash; Function File: [<var>fname</var>, <var>fpath</var>, <var>fltidx</var>] = <b>uiputfile</b> (<var>flt, dialog_name</var>)<var><a name="index-uiputfile-3075"></a></var><br>
&mdash; Function File: [<var>fname</var>, <var>fpath</var>, <var>fltidx</var>] = <b>uiputfile</b> (<var>flt, dialog_name, default_file</var>)<var><a name="index-uiputfile-3076"></a></var><br>
<blockquote><p>Open a GUI dialog for selecting a file.  <var>flt</var> contains a (list of) file
filter string(s) in one of the following formats:

          <dl>
<dt><code>"/path/to/filename.ext"</code><dd>If a filename is given the file extension is
extracted and used as filter. 
In addition the path is selected as current path and the filename is selected
as default file. 
Example: uiputfile("myfun.m");

          <br><dt><code>"*.ext"</code><dd>A single file extension. 
Example: uiputfile("*.ext");

          <br><dt><code>{"*.ext","My Description"}</code><dd>A 2-column cell array containing the file extension in the 1st column and
a brief description in the 2nd column. 
Example: uiputfile({"*.ext","My Description";"*.xyz","XYZ-Format"});
</dl>

        <p>The filter string can also contain a semicolon separated list of filter
extensions. 
Example: uiputfile({"*.gif;*.png;*.jpg", "Supported Picture Formats"});

        <p><var>dialog_name</var> can be used to customize the dialog title. 
If <var>default_file</var> is given it is preselected in the GUI dialog. 
If, in addition, a path is given it is also used as current path. 
</p></blockquote></div>

   </body></html>