![]() 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.20
GESTION
DES FENETRES 4.20 MANAGING WINDOWS |
Version 4.0.19 du 23 Décembre 2005 / Version 4.0.19, December 23th 2005 |
Scilab 3.1 - Scilab 4.0 / Windows - Linux |
ALLER A
L'INDEX GENERAL / GO TO
THE GENERAL INDEX |
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE |
4.21 LE HANDLE FIGURE / THE HANDLE FIGURE |
4.20.01
Principe / Principle |
4.20.10 Création d'une fenetre / Creating a window |
4.20.11 Création d'une fenetre par
figure / Creating a window by figure |
figure objfigure |
// Program Spas42011A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.11A"); hf = figure (1); |
4.20.12 Création d'une fenetre par
scf / Creating a window by scf |
Creating a
graphic window (scf) Création d'une fenetre graphique (scf) scf Scilab Graphic |
// Program Spas42012A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.12A"); hf = scf (1); hf.figure_name = "4.20.12A"; |
4.20.13 Création d'une fenetre par
set / Creating a window by set |
Creating a
graphic window (set) Création d'une fenetre graphique (set) figure_style (set) get ("hdl") hdl (get) set (figure_style) |
// Program Spas42013A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.13A"); set ("figure_style","new"); ha = get ("hdl"); ha.parent.figure_name = "4.20.13A"; |
4.20.14 Création d'une fenetre par
defaut / Creating a window by default |
gce get ("hdl") hdl (get) |
// Program Spas42014A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.14A"); xrect (0, 1, 1, 1); hr = get ("hdl"); hr.parent.parent.figure_name = "4.20.14A"; |
// Program Spas42014B
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.14B"); xrect (0, 1, 1, 1); hr = gce (); hr.parent.parent.figure_name = "4.20.14B"; |
4.20.20
Fermeture d'une
fenetre / Closing a window |
Close a
graphic window delete (Fenetre graphique, Graphic window) Fermer une fenetre graphique |
// Program Spas42020A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.20A"); hf = scf (1); hf.figure_name = "4.20.20A"; xpause (5000000); delete (hf); |
4.20.21
Fermeture d'une
fenetre / Closing a window |
xdel |
// Program Spas42021A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.21A"); hf = scf (1); hf.figure_name = "4.20.21A"; xpause (5000000); xdel (1); |
// Program Spas42021B
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.21B"); hf1 = scf (1); hf1.figure_name = "4.20.21B1"; hf2 = scf (2); hf2.figure_name = "4.20.21B2"; hf3 = scf (3); hf3.figure_name = "4.20.21B3"; xpause (5000000); xdel ([1, 3]); xpause (5000000); xdel (2); |
4.20.30
Modifications
externes / External modifications |
4.20.31
Modifications
internes / Internal modifications |
4.20.32 Nettoyer la fenetre / Cleaning the window |
Cleaning
the window clf Nettoyer la fenetre xbasc xclear |
// Program Spas42032A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.32A"); hf = scf (1); hf.figure_name = "4.20.32A Fenetre 1"; hf.background = 3; ha= gca (); ha.axes_visible = "on"; xfrect (0.4, 0.6, 0.2, 0.2); hr1 = gce (), hr1.background = 5; hr1.fill_mode = "on"; xfrect (0.45, 0.55, 0.1, 0.1); hr2 = gce (); hr2.background = 2; hr2.fill_mode = "on"; xpause (5000000); clf (); hf.figure_name = "4.20.32A Fenetre 2"; |
// Program Spas42032B
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.32B"); hf = scf (1); hf.figure_name = "4.20.32B Fenetre 1"; hf.background = 3; ha= gca (); ha.axes_visible = "on"; xfrect (0.4, 0.6, 0.2, 0.2); hr1 = gce (); hr1.background = 5; hr1.fill_mode = "on"; xfrect (0.45, 0.55, 0.1, 0.1); hr2 = gce (); hr2.background = 2; hr2.fill_mode = "on"; xpause (5000000); clf (1); hf.figure_name = "4.20.32B Fenetre 2"; xpause (5000000); delete (hf); |
// Program Spas42032C
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.32C"); hf = scf (1); hf.figure_name = "4.20.32C Fenetre 1"; hf.background = 3; ha= gca (); ha.axes_visible = "on"; xfrect (0.4, 0.6, 0.2, 0.2); hr1 = gce (); hr1.background = 5; hr1.fill_mode = "on"; xfrect (0.45, 0.55, 0.1, 0.1); hr2 = gce (); hr2.background = 2; hr2.fill_mode = "on"; xpause (5000000); clf (hf); hf.figure_name = "4.20.32C Fenetre 2"; xpause (5000000); delete (hf); |
4.20.33 Message d'information / Information message |
xinfo |
// Program Spas42033A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.33A"); hf = scf (1); hf.figure_name = "4.20.33A"; xinfo ("Message d''information / Information message"); xpause (5000000); delete (hf); |
4.20.40 Gérer plusieurs fenetres / Managing several windows |
Gérer
plusieurs fenetres graphiques Managing several graphic windows |
// Program Spas42040A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.40A"); hf1 = scf (1); hf1.figure_name = "4.20.40A1"; hf1.figure_position = [0, 0]; hf1.background = 3; ha1= gca (); ha1.axes_visible = "on"; xfrect (0.0, 1.0, 0.1, 0.1); hr1 = gce (); hr1.background = 5; hr1.fill_mode = "on"; hf2 = scf (2); hf2.figure_name = "4.20.40A2"; hf2.figure_position = [100, 100]; hf2.background = 4; ha2= gca (); ha2.axes_visible = "on"; xfrect (0.0, 1.0, 0.2, 0.2); hr2 = gce (); hr2.background = 6; hr2.fill_mode = "on"; hf3 = scf (3); hf3.figure_name = "4.20.40A3"; hf3.figure_position = [200, 200]; hf3.background = 5; ha3= gca (); ha3.axes_visible = "on"; xfrect (0.0, 1.0, 0.3, 0.3); hr3 = gce (); hr3.background = 7; hr3.fill_mode = "on"; xpause (5000000); delete (hf1); delete (hf2); delete (hf3); |
// Program Spas42040B
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.40B"); hf1 = scf (1); hf1.figure_name = "4.20.40B1"; hf1.figure_position = [0, 0]; hf1.background = 3; ha1= gca (); ha1.axes_visible = "on"; xfrect (0.0, 1.0, 0.1, 0.1); hr1 = gce (); hr1.background = 5; hr1.fill_mode = "on"; hf2 = scf (2); hf2.figure_name = "4.20.40B2"; hf2.figure_position = [100, 100]; hf2.background = 4; ha2= gca (); ha2.axes_visible = "on"; xfrect (0.0, 1.0, 0.2, 0.2); hr2 = gce (); hr2.background = 6; hr2.fill_mode = "on"; hf3 = scf (3); hf3.figure_name = "4.20.40B3"; hf3.figure_position = [200, 200]; hf3.background = 5; ha3= gca (); ha3.axes_visible = "on"; xfrect (0.0, 1.0, 0.3, 0.3); hr3 = gce (); hr3.background = 7; hr3.fill_mode = "on"; xpause (5000000); delete ([hf1,hf2,hf3]); |
4.20.41 La fenetre courante / The current windows |
Current
graphic window Defining the active window Defining the current window Définir la fenetre courante Fenetre graphique courante scf (Fenetre courante, Current window) |
// Program Spas42041A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.41A"); hf1 = scf (1); hf1.figure_name = "4.20.41A1"; hf1.figure_position = [0, 0]; hf1.background = 3; ha1= gca (); ha1.axes_visible = "on"; xfrect (0.0, 1.0, 0.1, 0.1); hr1 = gce (); hr1.background = 5; hr1.fill_mode = "on"; hf2 = scf (2); hf2.figure_name = "4.20.41A2"; hf2.figure_position = [100, 100]; hf2.background = 4; ha2= gca (); ha2.axes_visible = "on"; xfrect (0.8, 0.2, 0.2, 0.2); hr2 = gce (); hr2.background = 6; hr2.fill_mode = "on"; xpause (5000000); delete (hf1); delete (hf2); |
// Program Spas42041B
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.41B"); hf1 = scf (1); hf1.figure_name = "4.20.41B1"; hf1.figure_position = [0, 0]; hf1.background = 3; ha1= gca (); ha1.axes_visible = "on"; xfrect (0.0, 1.0, 0.1, 0.1); hr1 = gce (); hr1.background = 5; hr1.fill_mode = "on"; hf2 = scf (2); hf2.figure_name = "4.20.41B2"; hf2.figure_position = [0, 500]; hf2.background = 4; ha2= gca (); ha2.axes_visible = "on"; scf (hf1); xfrect (0.8, 0.2, 0.2, 0.2); hr2 = gce (); hr2.background = 6; hr2.fill_mode = "on"; xpause (5000000); delete (hf1); delete (hf2); |
4.20.42
La fenetre active / The active windows |
Active
window (xselect) Fenetre active (xselect) xselect |
// Program Spas42042A
// Designed for Scilab 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.42A"); hf1 = scf (1); hf1.figure_name = "4.20.42A1"; hf1.figure_position = [0, 0]; hf1.background = 3; ha1 = gca (); ha1.axes_visible = "on"; xfrect (0.0, 1.0, 0.1, 0.1); hr1 = gce (); hr1.background = 5; hr1.fill_mode = "on"; hf2 = scf (2); hf2.figure_name = "4.20.42A2"; hf2.figure_position = [100, 100]; hf2.background = 4; ha2 = gca (); ha2.axes_visible = "on"; scf (hf1); xselect (); xfrect (0.8, 0.2, 0.2, 0.2); hr2 = gce (); hr2.background = 6; hr2.fill_mode = "on"; xpause (5000000); delete (hf1); delete (hf2); |
4.20.50
La liste des
fenetres / The list of windows |
winsid |
// Program Spas42050A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.50A"); hf1 = scf (1); hf1.figure_name = "4.20.50A / 1"; hf1.figure_position = [0, 0]; hf1.background = 3; hf2 = scf (2); hf2.figure_name = "4.20.50A / 2"; hf2.figure_position = [100, 100]; hf2.background = 4; hf4 = scf (4); hf4.figure_name = "4.20.50A / 4"; hf4.figure_position = [200, 200]; hf4.background = 5; x = winsid (), xpause (5000000); delete (hf1); delete (hf2); delete (hf4); |
4.20.51
Suppression
sélective des fenetres /
Selective delete of windows |
delete (Fenetres, Windows) xdel |
// Program Spas42051A
// Designed for Scilab 3.1 & 4.0 // Copyright Jacques-Deric Rouault, CNRS, INRIA disp ("4.20.51A"); hf1 = scf (1); hf1.figure_name = "4.20.51A / 1"; hf1.figure_position = [0, 0]; hf1.background = 3; hf2 = scf (2); hf2.figure_name = "4.20.51A / 2"; hf2.figure_position = [100, 100]; hf2.background = 4; hf4 = scf (4); hf4.figure_name = "4.20.51A / 4"; hf4.figure_position = [200, 200]; hf4.background = 5; x = winsid (), xpause (1000000); delete (hf1); x = winsid (), delete (hf2); x = winsid (), delete (hf4); |
ALLER A
L'INDEX GENERAL / GO TO
THE GENERAL INDEX |
ALLER A LA TABLE GENERALE / GO TO THE GENERAL TABLE |
4.21 LE HANDLE FIGURE / THE HANDLE FIGURE |