File: get.xml

package info (click to toggle)
scilab 5.2.2-9
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 334,832 kB
  • ctags: 52,586
  • sloc: xml: 526,945; ansic: 223,590; fortran: 163,080; java: 56,934; cpp: 33,840; tcl: 27,936; sh: 20,397; makefile: 9,908; ml: 9,451; perl: 1,323; cs: 614; lisp: 30
file content (219 lines) | stat: -rw-r--r-- 6,739 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) INRIA - Djalel Abdemouche
 * Copyright (C) Digiteo - 2009 - Jean-Baptiste Silvy
 * 
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at    
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 *
 -->
<refentry version="5.0-subset Scilab" xml:id="get" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns5="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook">
  <info>
    <pubdate>$LastChangedDate$</pubdate>
  </info>

  <refnamediv>
    <refname>get</refname>

    <refpurpose>Recupera um valor de propriedade de uma entidade de grficos
    ou um objeto Interface do Usurio.</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Seqncia de Chamamento</title>

    <synopsis>h=get(prop)
val=get(h,prop)
val=h.prop</synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Parmetros</title>

    <variablelist>
      <varlistentry>
        <term>h</term>

        <listitem>
          <para>manipulador da entidade da qual se deseja recuperar uma
          propriedade. <literal>h</literal> pode ser um vetor de manipuladores
          e, neste caso, get retorna os valores da propriedade definidos para
          todos os objetos identificados por h. <literal>h</literal> tambm
          pode ser <emphasis>0</emphasis> para se retornar as propriedades do
          objeto raiz.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>prop</term>

        <listitem>
          <para>string com o nome da propriedade. </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>val</term>

        <listitem>
          <para>objeto Scilab, o valor da propriedade.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>

  <refsection>
    <title>Descrio</title>

    <para>Esta rotina pode ser utilizada para se recuperar o valor de uma
    propriedade especificada de uma entidade de grficos ou objeto GUI. Neste
    caso,  equivalente a se usar o operador ponto ('.') em um manipulador.
    Por exemplo, <literal>get(h,"background")</literal>  equivalente a
    <literal>h.background</literal>.</para>

    <para>Nomes de propriedades so strings. Para obter a lista de todas as
    propriedade existentes ver <link
    linkend="graphics_entities">graphics_entities</link> ou <link
    linkend="uicontrol">uicontrol</link> para objetos de Interface do
    Usurio</para>

    <para><literal>get</literal> tambm pode ser chamado com apenas uma
    propriedade como argumento. Neste caso, a propriedade deve ser uma das
    seguintes: </para>
      <variablelist>
        <varlistentry>
          <term>current_entity or hdl</term>

          <listitem>
            <para>retorna o manipulador da ltima (e ainda existente) entidade
            criada. <literal>get('current_entity')</literal> e
            <literal>get('hdl')</literal> equivalem a <link
            linkend="gce">gce</link>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>current_figure</term>

          <listitem>
            <para>retorna o manipulador da figura (Figure) corrente.
            <literal>get('current_figure')</literal> equivale a <link
            linkend="gcf">gcf</link>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>current_axes</term>

          <listitem>
            <para>retorna o manipulador da entidade de eixos (Axes) corrente.
            <literal>get('current_axes')</literal> equivale a <link
            linkend="gca">gca</link>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>default_figure</term>

          <listitem>
            <para>retorna o manipulador da figura padro.
            <literal>get('default_figure')</literal> equivale a <link
            linkend="gdf">gdf</link>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>default_axes</term>

          <listitem>
            <para>retorna o manipulador dos eixos padres.
            <literal>get('default_axes')</literal>equivale a <link
            linkend="gda">gda</link>.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>figures_id</term>

          <listitem>
            <para>retorna um vetor contendo os ids de todas as figuras
            grficas abertas. <literal>get('figures_id')</literal> equivale a
            <link linkend="winsid">winsid</link>.</para>
          </listitem>
        </varlistentry>
      </variablelist>
  </refsection>

  <refsection>
    <title>Exemplos</title>

    <programlisting role="example"><![CDATA[ 
// para entidades grficas
clf()
    
// objetos grficos simples
subplot(121);
x=[-.2:0.1:2*%pi]';
plot2d(x-2,x.^2);
subplot(122);
xrect(.2,.7,.5,.2);     
xrect(.3,.8,.3,.2);
xfarc(.25,.55,.1,.15,0,64*360);
xfarc(.55,.55,.1,.15,0,64*360);
xstring(0.2,.9,"Exemplo &lt;&lt;UM CARRO&gt;&gt;");
 
h=get("current_entity") //obtendo o novo objeto criado
h.font_size=3;
 
f=get("current_figure") //obtendo a figura corrente 
f.figure_size
f.figure_size=[700 500];
f.children
f.children(2).type
f.children(2).children
f.children(2).children.children.thickness=4; 
 
a=get("current_axes") //obtendo os eixos correntes
a.children.type
a.children.foreground //obtendo a cor de primeiro plano de um conjunto de objetos grficos
a.children.foreground=9;

// para objetos de Interface do Usurio
h=uicontrol('string', 'Button'); // Abrindo uma janela com um boto.
p=get(h,'position'); // obtendo o aspecto geomtrico do boto
disp('Largura do boto: ' + string(p(3))); // imprimindo a largura do boto
close(); // fechando a figura
 ]]></programlisting>
  </refsection>

  <refsection>
    <title>Ver Tambm</title>

    <simplelist type="inline">
      <member><link linkend="uicontrol">uicontrol</link></member>

      <member><link linkend="root_properties">root_properties</link></member>

      <member><link
      linkend="graphics_entities">graphics_entities</link></member>

      <member><link linkend="set">set</link></member>
    </simplelist>
  </refsection>

  <refsection>
    <title>Autor</title>

    <para>Djalel ABDEMOUCHE</para>
  </refsection>
</refentry>