1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) INRIA - Djalel Abdemouche
5 * Copyright (C) Digiteo - 2009 - Jean-Baptiste Silvy
7 * This file must be used under the terms of the CeCILL.
8 * This source file is licensed as described in the file COPYING, which
9 * you should have received as part of this distribution. The terms
10 * are also available at
11 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
14 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="get">
16 <refname>get</refname>
17 <refpurpose>Retrieve a property value from a graphics
18 entity or an User Interface object.
22 <title>Calling Sequence</title>
29 <title>Arguments</title>
34 <para>handle, the handle of the entity to retrieve a property.
35 <literal>h</literal> can be a vector of handles, in which case get returns
36 the property value for all objects contained in h. <literal>h</literal> can also be <emphasis>0</emphasis> to get the root object properties.
43 <para>character string name of the property.</para>
49 <para>value of the property.</para>
55 <title>Description</title>
56 <para>This routine can be used to retrieve the value of a specified property from a
57 graphics entity or a GUI object. In this case it is equivalent to use the dot operator on a handle.
58 For exemple, <literal>get(h,"background")</literal> is equivalent to <literal>h.background</literal>.
60 <para>Property names are character strings. To get the list of all existing properties
61 see <link linkend="graphics_entities">graphics_entities</link> or <link linkend="uicontrol">uicontrol</link>
62 for User Interface objects.
65 <literal>get</literal> function can be also called with only a property as argument. In this case,
66 the property must be one of the following (called with other properties names, <literal>get</literal> will return <literal>[]</literal>):
70 <term>current_entity or hdl</term>
72 <para>returns a handle on the lastly created (and still
74 <literal>get('current_entity')</literal> and <literal>get('hdl')</literal> are equivalent to <link linkend="gce">gce</link>.
79 <term>current_figure</term>
81 <para>returns a handle on the current graphic figure.
82 <literal>get('current_figure')</literal> is equivalent to <link linkend="gcf">gcf</link>.
87 <term>current_axes</term>
89 <para>returns a handle on the current axes entity.
90 <literal>get('current_axes')</literal> is equivalent to <link linkend="gca">gca</link>.
95 <term>default_figure</term>
97 <para>returns a handle on the default figure entity.
98 <literal>get('default_figure')</literal> is equivalent to <link linkend="gdf">gdf</link>.
103 <term>default_axes</term>
105 <para>returns a handle on the default axes entity.
106 <literal>get('default_axes')</literal> is equivalent to <link linkend="gda">gda</link>.
111 <term>figures_id</term>
113 <para>returns a row vector containing ids of all opened graphic figures.
114 <literal>get('figures_id')</literal> is equivalent to <link linkend="winsid">winsid</link>.
121 <title>Examples</title>
122 <programlisting role="example"><![CDATA[
123 // for graphics entities
126 // simple graphics objects
133 xfarc(.25,.55,.1,.15,0,64*360);
134 xfarc(.55,.55,.1,.15,0,64*360);
135 xstring(0.2,.9,"Example <<A CAR>>");
137 h=get("current_entity") //get the newly object created
140 f=get("current_figure") //get the current figure
142 f.figure_size=[700 500];
145 f.children(2).children
146 f.children(2).children.children.thickness=4;
148 a=get("current_axes") //get the current axes
150 a.children.foreground //get the foreground color of a set of graphics objects
151 a.children.foreground=9;
153 // for User Interface objects
154 h=uicontrol('string', 'Button'); // Opens a window with a button.
155 p=get(h,'position'); // get the geometric aspect of the button
156 disp('Button width: ' + string(p(3))); // print the width of the button
157 close(); // close figure
160 <refsection role="see also">
161 <title>See Also</title>
162 <simplelist type="inline">
164 <link linkend="uicontrol">uicontrol</link>
167 <link linkend="root_properties">root_properties</link>
170 <link linkend="graphics_entities">graphics_entities</link>
173 <link linkend="set">set</link>