1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="loadGui" xml:lang="en">
4 <refname>loadGui</refname>
5 <refpurpose>Load a graphic user interface from a saved file</refpurpose>
8 <title>Calling Sequence</title>
9 <synopsis>loadGui(filename)</synopsis>
12 <title>Arguments</title>
17 <para>character string containing the path of the file</para>
23 <title>Description</title>
25 The <literal>loadGui</literal> function can be used to load in the
26 Scilab session a graphic user interface previously saved in a file with the
28 <link linkend="saveGui">saveGui</link>
33 <literal>loadGui(filename)</literal> loads an interface saved in file
34 given by its path <literal>filename</literal>.
38 <title>Examples</title>
39 <programlisting role="example"><![CDATA[
41 f = figure("background", -2);
42 h = uicontrol(f, "style", "text", ...
43 "string", "This is a figure", ...
44 "position", [210 180 300 100], ...
46 "backgroundcolor", [1 1 1]);
48 saveGui(f, fullfile(TMPDIR, "foo"))
50 loadGui(fullfile(TMPDIR, "foo"));
53 f = figure("default_axes", "off", ...
54 "dockable", "off", ...
55 "figure_name", "Sélection", ...
56 "axes_size", [200 200], ...
57 "infobar_visible", "off", ...
58 "menubar_visible", "off", ...
59 "toolbar", "none", ...
60 "toolbar_visible", "off", ...
63 h1 = uicontrol(f, "style", "text", ...
64 "string", "Following List :", ...
66 "constraints", createConstraints("gridbag", [1 1 2 1], [1 0], "both"));
68 h2 = uicontrol(f, "style", "popupmenu", ...
69 "string", ["item1"; "item2"; "item3"], ...
72 "constraints", createConstraints("gridbag", [1 2 2 1], [1 0], "both"), ...
75 h3 = uicontrol(f, "style", "pushbutton", ...
77 "callback", "obj = findobj(""tag"", ""selection""); mprintf(""La valeur sélectionnée est : %s.\n"", obj.string(obj.value)); close(gcf())", ...
79 "constraints", createConstraints("gridbag", [1 3 1 1], [1 0], "both", "left"));
81 h4 = uicontrol(f, "style", "pushbutton", ...
82 "string", "CANCEL", ...
83 "callback", "close(gcf())", ...
85 "constraints", createConstraints("gridbag", [2 3 1 1], [1 0], "both", "right"));
87 saveGui(f, "TMPDIR/foo2.xml");
89 loadGui("TMPDIR/foo2.xml")
94 <refsection role="see also">
95 <title>See Also</title>
96 <simplelist type="inline">
98 <link linkend="saveGui">saveGui</link>
101 <link linkend="load">load</link>
104 <link linkend="save">save</link>
109 <title>History</title>
112 <revnumber>5.5.0</revnumber>
114 Function <function>loadGui</function> introduced.