BIOSCILAB
SCILAB 4.0 PAS-A-PAS
SCILAB 4.0 STEP-BY-STEP

Jacques-Deric Rouault

CNRS / INRIA

Volume 4   LE GRAPHISME
Volume 4   GRAPHISM
4.13 ORGANISATION DES HANDLES
4.13 ORGANIZATION OF HANDLES
Version 4.0.22 du 6 Janvier 2006 / Version 4.0.22, January 6th 2006
Scilab 3.1 - Scilab 4.0 /  Windows - Linux

4.12       DECLARATION DES HANDLES  / DECLARING HANDLES
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.14       VALEURS PAR DEFAUT  / DEFAULT VALUES

4.13.01   Organisation  / Organisation
4.13.02   Catégories  / Categories
4.13.10   Organisation interne  / Internal organization
4.13.11   Affectation  / Affectation
4.13.20   Organisation hiérarchique  / Hierarchical organisation
4.13.21   Les champs parent et children  / The fields parent and children
4.13.22   L'adressage des enfants  / Addressing children

4.13.01   Organisation  / Organisation

handle (Organisation, Organization)

Les handles sont des types de Scilab structurés avec une organisation interne et une organisation externe hiérarchique.
The handles are Scilab types structured with an internal organization and external hierarchical organization.

4.13.02   Catégories  / Categories

Catégorie de handle
Category of handle
handle (Catégories, Categories)

Un handle Scilab correspond à une des 21 catégories suivantes : 
A Scilab handle corresponds to one of the 21 following categories:

01 Arc 4.43
02 Axes 4.23
03 Axis 4.44
04 Champ 4.52
05 Compound 4.30
06 Fac3d 4.81
07 Fec 4.53
08 Figure 4.21
09 Grayplot 4.50
10 Label 4.24
11 Legend 4.31
12 Matplot 4.51
13 Param3d 4.71
14 Patch
15 Plot3d 4.80
16 Polyline 4.42
17 Rectangle 4.40
18 Segs 4.41
19 Text 4.46
20 Title
21 Uimenu

Les handles de chaque catégorie sont déclarés indirectement par des fonctions ou des procédures spécifiques.
The handlesof each category are indirectly declared by specific functions or procedures.

Le texte de la fonction Scilab %h_p contenu dans le fichier /macros/percent/%h_p.sci  du sous-répertoire de Scilab-4.0 contient la liste des catégories de handles.
The text of the scilab function %h_p in the file /macros/percent/%h_p.sci  of the subdirectory of Scilab-4.0 contains the list of the categories of handles.

4.13.10   Organisation interne  / Internal organization

handle (Organisation interne, Internal organization)

Les handles Scilab sont tous de même type et ont la même organisation interne en 108 champs.
The Scilab handles have the same type and the same internal organization in 108 fields.

Selon les catégories, les champs du handle auront ou n'auront pas de sens et seront ou ne seront pas accessibles.
According to the categories, the fields of the handle will have or not a sense, and be be or not accessible.

Arcs Axes Axis Champ Compound Fac3d Fec Figure Grayplot Label Legend Matplot Param3d Patch Plot3d Polyline Rectangle Segs Text Title Uimenu
01 arrow_size V V
02 arrow_size_factor V
03 auto_clear V
04 auto_position V
05 auto_resize V
06 auto_rotation V
07 auto_scale V
08 auto_tics V
09 axes_bounds V
10 axes_reverse V
11 axes_size V
12 axes_visible V
13 auto_clear V
14 auto_scale V
15 auto_tics V
16 background V V V V V V V
17 bar_width V
18 box V V
19 callback V
20 callback_type V
21 cdata_mapping V
22 children R R R R R R R R R R R R R R R R R R R
23 clip_box V V V V V V V V V V
24 clip_state V V V V V V V V V V
25 closed V
26 color_flag V V
27 color_map V
28 color_mode V V V
29 colored V
30 cube_scaling V
31 data V V V V V V V V V V V V
32 data_bounds V
33 data_color O
34 data_mapping V
35 figure_id V
36 figure_name V
37 figure_position V
38 figure_size V
39 figure_style V
40 fill_mode V V V V V
41 font_angle V V V
42 font_color V
43 font_foreground V
44 font_size V V V V V
45 font_style V V V V V
46 foreground V V V V V V V V V V V V
47 grid V
48 handle_visible V
49 hiddencolor V V V
50 immediate_drawing V
51 interp_color_mode V
52 inter_color_vector V
53 isoview V
54 labels_font_color V
55 labels_font_style V
56 line_mode V V V V V V V V
57 line_style V V V V V V
58 log_flags V
59 margins V
60 mark_background V V V V V V V V
61 mark_foreground V V V V V V V V
62 mark_mode V V V V V V V V
63 mark_style V V V V V V V
64 mark_size V V V V V V V
65 mark_size_unit V V V V V V V
66 menu_eneable V
67 parent R R R R R R R R R R R R R R R R R R R R
68 pixel_drawing_mode V
69 pixmap V
70 polyline_style V
71 position V V
72 rotation_angles V
73 rotation_style V
74 segs_color V
75 sub_ticks V V
76 surface_color V
77 surface_mode V V
78 text V V V V V
79 text_box V
80 text_box_mode V
81 tics_color V
82 tics_direction V
83 tics_labels V
84 tics_segment V
85 tics_style V
86 thickness V V V V V V V V V
87 tight_limits V
88 title V
89 triangles V
90 type R R R R R R R R R R R R R R R R R R R R R
91 user_data V V V V V V V V V V V V V V V V
92 view V
93 visible V V V V V V V V V V V V V V V V V V V V V
94 x_label V
95 x_location V
96 x_shift V
97 x_ticks V
98 x_tics_coords V
99 y_label V
100 y_location V
101 y_shift V
102 y_ticks V
103 y_tics_coords V
104 z_bounds V
105 z_label V
106 z_shift V
107 z_ticks V
108 zoom_box V

O  Obsolete - Not used
R read only
V visible

Certains champs ne sont pas modifiables (R = read only).
Some fields cannot be modified (R = read only).

Certains champs sont structurés avec des sous-champs : 
Some fields are structured with subfields: data (subfields )

data (sous-champs subfields color, fx, fy, x, y, z)
x_tics (sous-champs subfields labels, locations)
y_tics (sous-champs subfields labels, locations)
z_tics (sous-champs subfields labels, locations)

Certains champs sont eux-même des handles : 
Some fields are themselves handles:

Handle.parent handle de catégorie handle of category 
Handle.children handle de catégorie handle of category 
Axes.title handle de catégorie handle of category label

Le texte de la fonction Scilab %h_p contenu dans le fichier /macros/percent/%h_p.sci  du sous-répertoire de Scilab-4.0 contient pour chaque catégorie de handle la liste de ses champs.
The text of the scilab function %h_p in the file /macros/percent/%h_p.sci  of the subdirectory of Scilab-4.0 contains the list of fields for each category of handle.

4.13.11   Affectation  / Affectation



Les champs des handles sont accessibles comme les variables Scilab.
The fields of handles are accessible as Scilab variables.

//  Program Spas41311A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.13.11A");
hf = scf (1);
hf.type,
hf.figure_name = "Hello";
hf.figure_name,
delete (hf);

Télécharger le fichier / Download the file Spas41311A.sce

4.13.20   Organisation hiérarchique  / Hierarchical organisation

handle (Organisation hiérarchique, Hierachical organization)

Les handles sont organisés hierarchiquement, avec des relations parent-enfant(s).
The handles are hierarchically organized, with relations parent-child(ren).

Le premier niveau hiérarchique est la fenetre (Figure en terminologie Scilab).
The first hierchical level is the window (Figure according to the Scilab terminology).

Le second niveau hiérarchique est consitué par le (ou les) repère(s) à deux ou trois dimensions représentés dans la fenetre (Axes en terminologie Scilab).
The second hierchical level is compound with the different 2- or 3-dimension system(s) of axes  (Axes according to the Scilab terminology).

Le troisième niveau hiérarchique est consitué par Compound (version 4 = ex-Agregation version 3), agrégats de figures de niveau 4 et/ou d'autres agrégats de niveau 3, plus Grayplot, Matplot, Label et Title.
The third hierchical level is compound with Compound (version 4 = ex-Agregation version 3), agregates of  figures of level 4 and/or other agregates of level 3, plus Grayplot, Matplot, Label and Title.

Le quatrième niveau hiérarchique est consitué par Legend, plus les différentes figures (Arc, Axis, Champ,  ...)   représentés dans un répère Axes ou un Agregation.
The fourth hierchical level is compound with Legend, plus the different figures (Arc, Axis, Champ, ...) designed in a system of axes Axes or an Agregation.



4.13.21   Les champs parent et children  / The fields parent and children

children (Handle)
Enfant (Handle)
Parent (Handle)
parent (Handle)


Les handles sont organisés hierarchiquement, avec des relations parent-enfant(s).
The handles are hierarchically organized, with relations parent-child(ren).

Depuis un niveau, on peut accéder au niveau supérieur par le champ parent et aux niveaux inférieurs par les champs enfant children éventuellement indexés par leur rang.
From a level, it is possible to access to the higher level with the field parent and to the lower levels with the fields children indexed by the rank if any.

Quand une variable fenetre graphique Figure est créée, une variable repère Axes est également crée comme enfant.
When a graphic window variable Figure is created, a system of axes Axes variable is also created as children.

//  Program Spas41321A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.13.21A");
hf = scf (1);
hf,
ha = hf.children,

Télécharger le fichier / Download the file Spas41321A.sce

Voici un premier programme, qui donne l'image suivante.
This is a first program, providing the following image.

//  Program Spas41321B
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.13.21B");
hf = scf (1);
hf.figure_name = "4.13.21B";
ha = gca (); 
ha.axes_visible = "on";
ha.box = "on";

Télécharger le fichier / Download the file Spas41321B.sce





Pour refermer la fenetre graphique, cliquer sur la croix dans le coin supérieur droit.
To close this window, click on the cross at the upper right corner.

Nous avons deux objets graphiques hf et ha : ha est l'enfant de hf (ha = hf.children) et hf est le père de ha (hf = ha.parent).
We have two graphic objects hf and ha: ha is the child of hf (ha = hf.children) and hf is the parent of ha (hf = ha.parent).

Le programme suivant est strictement équivalent.

Tthe following program is stuictly equivalent

//  Program Spas41321C
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.13.21C");
hf = scf (1);
ha = gca ();
ha.parent.figure_name = "4.13.21C";
hf.children.axes_visible = "on";
hf.children.box = "on";

Télécharger le fichier / Download the file Spas41321C.sce

4.13.22   L'adressage des enfants  / Addressing children



Un handle peut avoir plusieurs handles enfants qui sont notés Handle.children(1), Handle.children(2),  etc ...
A handle can have several handles children written Handle.children(1), Handle.children(2), etc ....

Handle.children désigne l'ensemble des handles enfants.
Handle.children names the set of the handles children.

Si un handle a un seul enfant, les notations Handle.children(1) et Handle.children sont alors équivallentes.
If a handle has only one child(ren), the names Handle.children(1) and Handle.children are then equivalent.

//  Program Spas41322A
//  Designed for Scilab 3.1 & 4.0
//  Copyright Jacques-Deric Rouault, CNRS, INRIA

disp ("4.13.22A");
hf = scf (1);
hf.figure_name = "4.13.22A1";
ha = gca ();
ha.axes_visible = "on";
ha.box = "on";
xfrect (0,0.5,0.5,0.5);
hr = gce();
hr.background = 5;
xfarc (0.5,1,0.5,0.5,0,23040);
hc = gce();
hc.background = 6;
xpause (5000000);

hf.figure_name = "4.13.22A2";
ha.children.background = 3;


Télécharger le fichier / Download the file Spas41322A.sce





4.12       DECLARATION DES HANDLES  / DECLARING HANDLES
ALLER A L'INDEX GENERAL / GO TO THE GENERAL INDEX
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE
4.14       VALEURS PAR DEFAUT  / DEFAULT VALUES