Mercurial > octave-antonio
annotate scripts/gui/private/__uiputfile_fltk__.m @ 19833:9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Try to trim long lines to < 80 chars.
Use '##' for single line comments.
Use '(...)' around tests for if/elseif/switch/while.
Abut cell indexing operator '{' next to variable.
Abut array indexing operator '(' next to variable.
Use space between negation operator '!' and following expression.
Use two newlines between endfunction and start of %!test or %!demo code.
Remove unnecessary parens grouping between short-circuit operators.
Remove stray extra spaces (typos) between variables and assignment operators.
Remove stray extra spaces from ends of lines.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 23 Feb 2015 14:54:39 -0800 |
parents | 4197fc428c7d |
children |
rev | line source |
---|---|
19697
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
1 ## Copyright (C) 2012-2015 Michael Goffioul |
13697
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
2 ## |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
3 ## This file is part of Octave. |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
4 ## |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
5 ## Octave is free software; you can redistribute it and/or modify it |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
6 ## under the terms of the GNU General Public License as published by |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
8 ## your option) any later version. |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
9 ## |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
10 ## Octave is distributed in the hope that it will be useful, but |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
13 ## General Public License for more details. |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
14 ## |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
15 ## You should have received a copy of the GNU General Public License |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
16 ## along with Octave; see the file COPYING. If not, see |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
17 ## <http://www.gnu.org/licenses/>. |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
18 |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
19 ## -*- texinfo -*- |
13929
9cae456085c2
Grammarcheck of documentation before 3.6.0 release.
Rik <octave@nomad.inbox5.com>
parents:
13697
diff
changeset
|
20 ## @deftypefn {Function File} {[@var{fname}, @var{fpath}, @var{fltidx}] =} __uiputfile_fltk__ () |
13697
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
21 ## Undocumented internal function. |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
22 ## @end deftypefn |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
23 |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
24 ## Author: Michael Goffioul |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
25 |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
26 function [retval, retpath, retindex] = __uiputfile_fltk__ (filters, title, defval, position, tag, defdir) |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
27 |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
28 if (exist ("__fltk_uigetfile__") != 3) |
13697
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
29 error ("uiputfile: fltk graphics toolkit required"); |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
30 endif |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
31 |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
32 filters = __fltk_file_filter__ (filters); |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
33 if (length (defdir) > 0) |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
34 defval = fullfile (defdir, defval); |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
35 endif |
19833
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
36 [retval, retpath, retindex] = ... |
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
37 __fltk_uigetfile__ (filters, title, defval, position, tag); |
13697
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
38 |
0f8ff98929b2
Allow a toolkit to provide its own version of UI dialogs.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
39 endfunction |
17338
1c89599167a6
maint: End m-files with 1 blank line.
Rik <rik@octave.org>
parents:
14868
diff
changeset
|
40 |