PageRenderTime 42ms CodeModel.GetById 20ms app.highlight 18ms RepoModel.GetById 0ms app.codeStats 0ms

/Doc/file_dialogs.html

https://bitbucket.org/alsh/pygui-mirror
HTML | 105 lines | 89 code | 16 blank | 0 comment | 0 complexity | e41d5624f2f872fb3adaee9ac5b77ed1 MD5 | raw file
  1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  2<html><head><title>PyGUI - File Dialog Functions</title>
  3  
  4          <meta name="GENERATOR" content="Mozilla/3.01Gold (X11; I; SunOS 5.6 sun4u) [Netscape]"></head>
  5<body>
  6  <h1>File dialog functions</h1>
  7  <p>These functions present dialog boxes for requesting new and existing files and directories according
  8to platform conventions.<br>
  9</p>
 10<h2>Parameters</h2>
 11<p>The following parameters are used by these functions:<br>
 12</p>
 13<dl style="margin-left: 40px;">
 14  <dt style="font-family: monospace;">prompt</dt>
 15  <dd>A prompt string to be displayed. It is up to the platform exactly
 16where and how the prompt is shown, and it may not be shown at all in
 17some cases. If omitted, a suitable default is used depending on the
 18type of request.<br>
 19    <br>
 20  </dd>
 21  <dt style="font-family: monospace;">default_dir</dt>
 22  <dd>A <a href="FileRef.html">FileRef</a> or <a href="DirRef.html">DirRef</a>
 23specifying the initial directory to be browsed. If omitted, a
 24platform-dependent default is used (usually the last directory visited
 25in the application by a file dialog).<br>
 26    <br>
 27  </dd>
 28  <dt style="font-family: monospace;">default_name</dt>
 29  <dd>For functions that request a new object name, the initial value
 30entered into the name area of the dialog. If omitted, the name area is
 31initially empty.<br>
 32    <br>
 33  </dd>
 34  <dt><span style="font-family: monospace;">file_type, file_types</span></dt>
 35  <dd>A <a href="FileRef.html">FileRef</a> or list of <a href="FileRef.html">FileRef</a>s specifying acceptable file types.</dd>
 36</dl>
 37<h2>Functions</h2>
 38
 39  
 40<dl style="margin-left: 40px;">
 41
 42
 43    <dt><tt><a name="request_old_file"></a>request_old_file(</tt><tt>prompt</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>,</tt> <tt>default_dir</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>,</tt> <tt>file_types</tt> <tt>=</tt> <tt>None<span style="font-family: monospace;">)</span><br>
 44    <br>
 45    </tt></dt>
 46
 47    <dd>Prompts the user to select an existing file. If any <span style="font-style: italic;">file_types</span> are supplied, the user is only allowed to select a file matching one of the specified types.</dd><dd><br>
 48  </dd>
 49  <dd>Returns a <a href="FileRef.html">FileRef</a>, or <tt>None</tt> if the user cancelled.</dd>
 50
 51  
 52</dl>
 53
 54
 55  <dl style="margin-left: 40px;">
 56  </dl>
 57<dl style="margin-left: 40px;">
 58<dt><tt>request_old_files(</tt><tt>prompt</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>,</tt> <tt>default_dir</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>,</tt> <tt>file_types</tt> <tt>=</tt> <tt>None</tt><tt>)<br>
 59    <br>
 60    </tt></dt><dd>Prompts the user to select a set of existing files. If any <span style="font-style: italic;">file_types</span> are supplied, the user is only allowed to select files matching one of the specified types.</dd><dd><br>
 61  </dd><dd>Returns a list of <a href="FileRef.html">FileRef</a>s, or <tt>None</tt> if the user cancelled.</dd>
 62</dl>
 63<dl style="margin-left: 40px;">
 64<dt><a name="request_new_file"></a><tt>request_new_file(</tt><tt>prompt</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>,</tt> <tt>default_dir</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>,</tt> <tt>default_name</tt> <tt>=</tt> <tt style="font-family: monospace;">None,</tt> <tt>file_type</tt> <tt>=</tt> <tt>None<span style="font-family: monospace;">)</span><br>
 65    <br>
 66</tt></dt>
 67  <dd>Prompts the user to supply a name and location for a new file. If <span style="font-style: italic;">file_type</span>
 68is specified, it should represent the type if file which is to be
 69created; some platforms use this to restrict the list of existing files
 70displayed, and to determine the suffix of the returned filename.<br>
 71</dd><dd><br>
 72  </dd>
 73  <dd>Returns a <a href="FileRef.html">FileRef</a>, or <tt>None</tt> if the user cancelled.</dd>
 74
 75<dl>
 76    
 77    
 78  </dl>
 79</dl>
 80
 81  
 82<dl style="margin-left: 40px;">
 83<dt><tt>request_old_directory(</tt><tt>prompt</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>,</tt> <tt>default_dir</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>)</tt></dt><dd><br>
 84Prompts the user to select an existing directory.</dd><dd><br>
 85</dd><dd>Returns a <a href="FileRef.html">FileRef</a>, or <tt>None</tt> if the user cancelled.</dd>
 86</dl>
 87<dl style="margin-left: 40px;">
 88<dt><dt><tt>request_old_directories(</tt><tt>prompt</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>,</tt> <tt>default_dir</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>)</tt></dt>
 89</dt><dd><br>
 90Prompts the user to select a set of existing directories.</dd>
 91  <dd><br>
 92  </dd>
 93  <dd>Returns a list of <a href="FileRef.html">FileRef</a>s, or <tt>None</tt> if the user cancelled.</dd>
 94</dl>
 95<dl style="margin-left: 40px;">
 96  <dt><tt>request_new_directory(</tt><tt>prompt</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>,</tt> <tt>default_dir</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt>,</tt> <tt>default_name</tt> <tt>=</tt> <span style="font-family: monospace;">None</span><tt><span style="font-family: monospace;">)</span><br>
 97  <br>
 98</tt></dt>
 99<dd>Prompts the user to supply a name and location for a new directory.<br>
100</dd><dd><br>
101</dd><dd>Returns a <a href="FileRef.html">FileRef</a>, or <tt>None</tt> if the user cancelled.</dd>
102</dl>
103
104---<br>
105</body></html>