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
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) INRIA - Djalel Abdemouche
*
* 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="set" 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>set</refname>
<refpurpose>Ajusta um valor de propriedade de uma objeto entidade grfica
ou de um objeto Interface do Usurio (User Interface)</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Seqncia de Chamamento</title>
<synopsis>set(prop,val)
set(h,prop)
set(h,prop,val)
h.prop=val</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parmetros</title>
<variablelist>
<varlistentry>
<term>h</term>
<listitem>
<para>manipulador da entidade da qual a propriedade nomeada se
deseja ajustar, <literal>h</literal> pode ser um vetor de
manipuladores, em tal caso, sero ajustados valores de propriedades
para todos os objetos identificados por h</para>
</listitem>
</varlistentry>
<varlistentry>
<term>prop</term>
<listitem>
<para>string, nome da propriedade a ser ajustada. </para>
</listitem>
</varlistentry>
<varlistentry>
<term>val</term>
<listitem>
<para>valor a ser dado 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>set(h,"background",5)</literal> equivalente a
<literal>h.background = 5</literal>.</para>
<para>Nomes de propriedades so strings. O tipo do valor ajustado dependo
do tipo do manipulador e da propriedade.</para>
<para>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>set</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><literal>set('current_entity',h)</literal> ou
<literal>set('hdl',h)</literal> ajusta uma nova entidade como a
corrente. Neste caso, o valor deve ser um manipulador
grfico.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>current_figure</term>
<listitem>
<para><literal>set('current_figure',fig)</literal> ajusta uma nova
figura como a corrente. equivalente a <link
linkend="scf">scf</link>. Neste caso, o valor deve ser um
manipulador FIgure.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>current_axes</term>
<listitem>
<para><literal>set('current_axes',axes)</literal> ajusta novos
eixos como os correntes. equivalente a <link
linkend="sca">sca</link>. Neste caso, o valor deve ser um
manipulador Axes.</para>
</listitem>
</varlistentry>
</variablelist>
<para><literal>set</literal> tambm pode ser chamado com manipuladores
grficos e com propriedades como argumentos. O manipulador deve ser de uma
figura padro ou de eixos padres. A propriedade deve ser
<literal>"default_values"</literal>. Neste caso, a entidade padro
reajustada para os valores que possua na inicializao do Scilab.
<literal>set("default_values",h)</literal> equivale a <link
linkend="sda">sda</link> ou <link linkend="sdf">sdf</link>.</para>
</refsection>
<refsection>
<title>Exemplos</title>
<programlisting role="example"><![CDATA[
clf()
set("auto_clear","off") ;
// Exemple of a Plot 2D
x=[-.2:0.1:2*%pi]';
plot2d(x-.3,[sin(x-1) cos(2*x)],[1 2] );
a=get("current_axes");
p1=a.children.children(1);
p2=a.children.children(2);
// ajustando as propriedades nomeadas para os valores especificados nos objetos
set(p2,"foreground",13);
set(p2,"polyline_style",2);
set(a,'tight_limits',"on");
set(a,"box","off");
set(a,"sub_tics",[ 7 0 ]);
set(a,"y_location","middle")
set(p2,'thickness',2);
set(p1,'mark_mode',"on");
set(p1,'mark_style',3);
plot2d(x-2,x.^2/20);
p3= a.children(1).children;
set([a p1 p2 p3],"foreground",5)
]]></programlisting>
</refsection>
<refsection>
<title>Ver Tambm </title>
<simplelist type="inline">
<member><link linkend="get">get</link></member>
<member><link linkend="delete">delete</link></member>
<member><link linkend="copy">copy</link></member>
<member><link linkend="move">move</link></member>
<member><link
linkend="graphics_entities">graphics_entities</link></member>
<member><link linkend="uicontrol">uicontrol</link></member>
</simplelist>
</refsection>
<refsection>
<title>Autor</title>
<para>Djalel ABDEMOUCHE</para>
</refsection>
</refentry>
|