Mercurial > octave
annotate src/DLD-FUNCTIONS/__fltk_uigetfile__.cc @ 12183:b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
author | Kai Habel <kai.habel@gmx.de> |
---|---|
date | Thu, 27 Jan 2011 17:58:19 +0100 |
parents | |
children | 03c7fdee3d36 |
rev | line source |
---|---|
12183
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
1 /* |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
2 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
3 Copyright (C) 2010-2011 Kai Habel |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
4 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
5 This file is part of Octave. |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
6 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
7 Octave is free software; you can redistribute it and/or modify it |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
8 under the terms of the GNU General Public License as published by the |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
9 Free Software Foundation; either version 3 of the License, or (at your |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
10 option) any later version. |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
11 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
15 for more details. |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
16 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
17 You should have received a copy of the GNU General Public License |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
18 along with Octave; see the file COPYING. If not, see |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
19 <http://www.gnu.org/licenses/>. |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
20 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
21 */ |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
22 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
23 #ifdef HAVE_CONFIG_H |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
24 #include <config.h> |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
25 #endif |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
26 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
27 #if defined (HAVE_FLTK) |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
28 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
29 #include <FL/Fl.H> |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
30 #include <Fl/Fl_File_Chooser.H> |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
31 #include "defun-dld.h" |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
32 #include "file-ops.h" |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
33 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
34 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
35 DEFUN_DLD (__fltk_uigetfile__, args, , |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
36 "-*- texinfo -*-\n\ |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
37 @deftypefn {Built-in Function} {} __fltk_uigetfile__ (@dots{})\n\ |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
38 Undocumented internal function.\n\ |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
39 @end deftypefn") |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
40 { |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
41 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
42 // Expected argument list |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
43 // args(0) ... FileFilter in fltk format |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
44 // args(1) ... Title |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
45 // args(2) ... Default Filename |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
46 // args(3) ... PostionValue [x,y] |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
47 // args(4) ... SelectValue "on"/"off"/"dir"/"create" |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
48 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
49 octave_value_list fargs, retval; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
50 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
51 std::string file_filter = args(0).string_value(); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
52 std::string title = args(1).string_value(); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
53 std::string default_name = args(2).string_value(); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
54 Matrix pos = args(3).matrix_value(); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
55 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
56 int multi_type = Fl_File_Chooser::SINGLE; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
57 std::string flabel = "Filename:"; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
58 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
59 std::string multi = args(4).string_value(); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
60 if (multi == "on") |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
61 multi_type = Fl_File_Chooser::MULTI; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
62 else if (multi == "dir") |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
63 { |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
64 multi_type = Fl_File_Chooser::DIRECTORY; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
65 flabel = "Directory:"; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
66 } |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
67 else if (multi == "create") |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
68 multi_type = Fl_File_Chooser::CREATE; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
69 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
70 Fl_File_Chooser::filename_label = flabel.c_str (); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
71 Fl_File_Chooser *fc = new Fl_File_Chooser (default_name.c_str (), file_filter.c_str (), multi_type, title.c_str ()); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
72 fc->preview (0); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
73 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
74 if (multi_type == Fl_File_Chooser::CREATE) |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
75 fc->ok_label ("Save"); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
76 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
77 fc->show (); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
78 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
79 while (fc->shown ()) |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
80 Fl::wait (); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
81 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
82 retval(0) = octave_value(0); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
83 retval(1) = octave_value(0); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
84 retval(2) = octave_value(0); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
85 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
86 if (fc->value()) |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
87 { |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
88 int file_count = fc->count (); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
89 std::string fname; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
90 std::string sep = file_ops::dir_sep_str (); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
91 std::size_t idx; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
92 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
93 if (file_count == 1 && multi_type != Fl_File_Chooser::DIRECTORY) |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
94 { |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
95 fname = fc->value (); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
96 idx = fname.find_last_of (sep); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
97 retval(0) = fname.substr (idx + 1); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
98 } |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
99 else |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
100 { |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
101 Cell file_cell = Cell(file_count, 1); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
102 for (octave_idx_type n = 1; n <= file_count; n++) |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
103 { |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
104 fname = fc->value (n); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
105 idx = fname.find_last_of (sep); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
106 file_cell(n - 1) = fname.substr (idx + 1); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
107 } |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
108 retval(0) = file_cell; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
109 } |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
110 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
111 if (multi_type == Fl_File_Chooser::DIRECTORY) |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
112 retval(0) = std::string (fc->value ()); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
113 else |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
114 { |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
115 retval(1) = std::string (fc->directory ()) + sep; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
116 retval(2) = fc->filter_value (); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
117 } |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
118 } |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
119 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
120 fc->hide (); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
121 Fl::flush (); |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
122 delete fc; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
123 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
124 return retval; |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
125 } |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
126 |
b4d26c65e7e6
Allow ui file function to work if gnuplot is the selected toolkit and fltk is available
Kai Habel <kai.habel@gmx.de>
parents:
diff
changeset
|
127 #endif |