1 ## Copyright (C) 2006 Søren Hauberg
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2 of the License, or
6 ## (at your option) any later version.
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program; If not, see <http://www.gnu.org/licenses/>.
17 ## @deftypefn {Function File} @var{s} = zenity_text_info(@var{title}, @var{text}, @var{editable})
18 ## Display a large amount of text in a graphical display.
19 ## The title of the display window is set with the variable @var{title},
20 ## and the actual text ti display is set with the variable @var{text}.
21 ## If the optional argument @var{editable} is given the displayed text
22 ## is editable. In this case the altered text is returned from the function.
24 ## @seealso{zenity_calendar, zenity_list, zenity_progress, zenity_entry, zenity_message,
25 ## zenity_file_selection, zenity_notification}
28 function s = zenity_text_info(title, text, editable)
29 if (nargin < 2 || !ischar(title) || !ischar(text))
34 editable = "--editable";
40 fid = fopen(filename, "w");
41 fprintf(fid, "%s", text);
44 cmd = sprintf('zenity --text-info --title="%s" --filename="%s" %s', title, filename, editable);
45 [status, output] = system(cmd);
52 error("zenity_text_info: %s", output);