1
function %pt=do_help(%pt)
5
[btn,xc,yc,cwin,Cmenu]=cosclick(0)
10
elseif cwin==curwin then
11
k=getobj(scs_m,[xc;yc])
18
elseif or(windows(find(windows(:,1)<0),2)==cwin) then
19
kwin=find(windows(:,2)==cwin)
20
pal=palettes(-windows(kwin,1))
32
// unix_s('$SCI/bin/scilab -help ""'+name+'"" | $SCI/bin/xless &')
36
// Misc menu---------------------------------------------------------
38
mess=[' In the active editor Scicos window, clicking on the ';
39
' Window menu item invokes a dialog box that allows you to change ';
40
' window dimensions'];
41
case 'Background color' then
42
mess=[' This menu allows to change the background and defaukt foreground'
44
case 'Default link colors' then
45
mess=[' This menu allows to change the default color for regular '
48
mess=[' This menu allows to change the font used to write the block'
49
' identifications (see ""Set block ID"" menu)']
51
mess=[' This menu allows to select 3D shape for blocks and '
52
' associated parameters']
54
mess=[' This menu allows to add new color to the diagram private'
55
' color map. Added colors are stored in the diagram data structure']
57
mess=[' Focus menu allows to select a zone (click left, drag zone, click'
58
' to select) which is focused on';
59
' To change focus back use ""Zoom in"" menu']
61
mess=[' To shift the diagram to left, right, up or down,';
62
' select this menu item, then click on the point you want ';
63
' to appear in the middle of the graphics window. '];
65
mess=[' When you select this menu item the diagram is zoomed in '
68
mess=[' When you select this menu item the diagram is zoomed out '
71
mess=[' To get help on an object or menu buttons,';
72
' select first Help menu item and then on ';
73
' the selected object or menu item.']
75
mess=[' When you select this menu item you switch Scilab to ';
76
' the pause mode (see the help on pause).';
77
' In the Scilab main window and you may enter Scilab instructions';
78
' to compute whatever you want.';
79
' to go back to Scicos you need enter the ""return"" or';
80
' ""[...]=return(...)"" Scilab instruction.';
82
' If you use ""[...]=return(...)"" Scilab instruction take care';
83
' not to modify Scicos variables such as ""scs_m"",""scs_gc"",';
84
' ""menus"",""datam"",...';
86
' If you have modified scicos graphic window you may retore it ';
87
' using the Scicos ""Replot"" menu.']
89
// Edit menu---------------------------------------------------------
91
mess=[' Select the Palettes menu item to open a predefined palette.']
94
mess=[' When you select this menu item you get a dialogue to';
95
' enter scilab instructions for defining symbolic scicos parameters';
96
' used in block definitions or to do whatever you want';
98
' These instructions will be evaluated each time the diagram ';
101
' If you change the value of a symbolic scicos parameters in ';
102
' the contextyou can either click on the block(s) that use this';
103
' variable or on the Eval menu item to update actual block parameter';
106
case 'Smart Move' then
107
mess=[' To move a block in the active editor Scicos window';
108
' or in edited palette keeping horizontal and vertical'
109
' links, select first the ""Smart Move"" menu item, '
110
' then click on the selected block, link segment or link'
111
' corner, drag the mouse to the desired new position '
112
' and click left again to fix the position.'
114
' Right click cancel the move action']
117
mess=[' To move a block in the active editor Scicos window';
118
' or in edited palette,'
119
' select first the Move menu item, '
120
' then click on the selected block, link segment or link'
121
' corner, drag the mouse to the desired new block position '
122
' and click left again to fix the position.'
124
' Right click cancel the move action']
128
mess=['To copy a block in the active editor Scicos window';
129
' select first the Copy menu item, then'
130
' click (with left button) on the to-be-copied block'
131
' in Scicos windows or in a palette) , and'
132
' finally click left where you want the copy';
133
' be placed in the active editor Scicos window.';
135
' The lower left corner of the block is placed';
136
' at the selected point.';
137
' This menu remains active until user choose an other one';
139
' Right click cancel the copy action']
141
case 'Copy Region' then
142
mess=[ 'To copy a region in the active editor Scicos window';
143
' select first the Copy menu item, then'
144
' click (with right button) on a corner of the desired';
145
' region (in Scicos windows or in a palette), drag to '
146
' define the region, click to fix the region and'
147
' finally click left where you want the copy.'
148
' to be placed in the active editor Scicos window.';
149
' NOTE: If source diagram is big be patient, region selection '
152
' The lower left corner of the block is placed';
153
' at the selected point.';
155
' Right click cancel the copy action']
158
mess=[' To replace a block in the active editor Scicos window';
159
' select first the Replace menu item, then'
160
' select the replacement block (in Scicos window or in a'
161
' palette), and finally click on the to-be-replaced block']
166
mess=[' To obtain nice diagrams, you can align ports of';
167
' different blocks, vertically and horizontally.';
168
' Select first the Align menu item, then click on the first';
169
' port and finally on the second port.';
170
' The block corresponding to the second port is moved.';
172
' A connected block cannot be aligned.']
176
mess=[' To connect an output port to an input port,';
177
' select first the Link menu item, then click on the output';
178
' port, drag, click left on each intermediate points'
179
' and finally click left on the input port.';
181
' To split a link, select first the Link menu item,';
182
' then click left on the link where the split should be placed,';
183
' drag, click left on each intermediate points'
184
' and finally click left on the input port.'
186
' Right click cancel the link action'
188
' Only one link can go from and to a port.';
189
' Link color can be changed directly by clicking';
192
' This menu remains active until user choose an other one']
194
case 'Delete (d)' then
195
mess=['To delete blocks or a links, select first the Delete'
196
' menu item, then click successively on the selected objects'
197
'(with left button).';
199
' When you delete a block all links connected to it';
200
' are deleted as well.'
202
' This menu remains active until user choose an other one']
204
case 'Delete Region' then
205
mess=['To delete a blocks in a region, select first the Delete Region'
206
' menu item, then click on a corner of the ';
207
' desired region, drag to define the region, and click left to ';
208
' fix the region. All connected links will be destroyed as';
211
' Right click instead of left cancels the delete action']
213
case 'Add new block' then
214
mess=[' To add a newly defined block to the current palette or diagram';
215
' select first this menu item, A dialog box will popup ';
216
' asking for the name of the GUI function associated '
217
' with the block. If this function is not already loaded';
218
' it was search in the current directory. The user may then'
219
' click at the desired position of the block icon ']
222
mess=[' To reverse the positions of the (regular) inputs'
223
' and outputs of a block placed on its sides,';
224
' select the Flip menu item first and then click on the';
225
' selected block. This does not affect the order,';
226
' nor the position of the input and output event';
227
' ports which are numbered from left to right.'
229
' A connected block cannot be flipped.']
233
mess=[' Select the Undo menu item to undo the last edit operation.'
234
' It is not possible to undo more!']
237
// Simulate menu --------------------------------------------------
239
mess=[' In the main Scicos window, clicking on the Setup menu item';
240
' invokes a dialog box that allows you to change ';
241
' integration parameters: ';
242
' *final integration time';
243
' *absolute and relative error tolerances' ;
244
' *time tolerance (the smallest time interval for which ';
245
' the ode solver is used to update continuous states)';
246
' *deltat : the maximum time increase realized by a single';
247
' call to the ode solver'];
250
mess=[' select the Compile menu item to compile the block diagram.';
251
' This menu item need never be used since compilation is';
252
' performed automatically, if necessary, before';
253
' the beginning of every simulation (Run menu item).';
255
' Normally, a new compilation is not needed if only';
256
' system parameters and internal states are modified.';
257
' In some cases however these modifications are not';
258
' correctly updated and a manual compilation may be';
259
' needed before a Restart or a Continue.';
260
' Please report if you encounter such a case.']
263
mess=[' All dialogs user answers may be scilab instructions';
264
' they are evaluated immediatly and stored as character strings.'
265
' select this menu item to have them re-evaluated according to';
266
' new values of underlying scilab variables. '
268
' These underlying scilab variables may be user global variables'
269
' defined before scicos was launch, They may also be defined in'
270
' by the scicos context (see Context menu item)']
273
mess=[' select the Run menu item to start the simulation.';
274
' If the system has already been simulated, a';
275
' dialog box appears where you can choose to Continue,'
276
' Restart or End the simulation.'
278
' You may interrupt the simulation by clicking on the '
279
' ""stop"" button, change any of the block parameters'
280
' and continue the simulation with the new values.']
282
// Diagram menu ---------------------------------------------------
283
case 'Replot (r)' then
284
mess=[' Select the Replot menu item to replot the content of'
285
' the graphics window. Graphics window stores complete';
286
' history of the editing session in memory.';
288
' Replot is usefull for ''cleaning'' this memory.']
291
mess=[' Clicking on the New menu item loads an empty diagram in the';
292
' active editor Scicos window. If the previous content of the';
293
' window is not saved, it will be lost.']
294
case 'Region to Super Block' then
295
mess=[' This menu allows to transform a rectangular region of the'
296
' current diagram by a super block.'
297
' Click on a corner of the region , drag an click left to'
298
' fix the region (left click cancels selection)'
300
' Region is replaced by a super block ans links are redrawn']
302
mess=[' select the Purge menu item to get a clean data structure:';
303
' If diagram has been hugely modified many deleted blocks';
304
' may remain in the data structure. It may be usefull to';
305
' suppress then before saving.']
307
mess=[' This menu allows to change the diagram name. An editable'
308
' dialog box opens.']
311
mess=[' select the save menu item to save the block diagram';
312
' in a binary file already selected by a previous';
313
' select the Save As menu item. If you select this';
314
' menu item and you have never clicked on the Save As';
315
' menu item, the diagram is saved in the current directory';
316
' as <window_name>.cos where <window_name> is the name';
317
' of the window appearing on top of the window (usually';
318
' Untitled or Super Block).']
321
mess=[' select the Save As menu item to save the block diagram';
322
' or palette in a file. A dialog box allows choosing ';
323
' the file which must have a .cos or .cosf extension. The diagram';
324
' takes the name of the file (without the extension).'
326
' If extension is "".cosf"" an ascii formatted save is performed'
327
' instead of binary save. Formatted save is slower than regular ';
328
' save but has the advantage that the generated file is system ';
329
' independent (usefull for exchanging data on different computers)']
332
mess=[' select the Load menu item to load an ascii or binary file';
333
' containing a saved block diagram or palette.'
334
' A dialog box allows user choosing the file.']
336
case 'Load as Palette' then
337
mess=[' select the Load menu item to load an ascii or binary file';
338
' containing a saved block diagram as a palette.'
339
' A dialog box allows user choosing the file.']
342
case 'Save as Palette' then
343
mess=[' select the Save as Palette menu item to save the block diagram';
344
' as a palette in a file. A dialog box allows choosing ';
345
' the file which must have a .cos or .cosf extension. The palette';
346
' takes the name of the file (without the extension).';
348
' If extension is "".cosf"" an ascii formatted save is performed'
349
' instead of binary save. It may take a while'
351
' .scilab user file is updated if necessary']
354
case 'Save as Interf. Func.' then
355
mess=[' Select ""the Save as Interf. Func."" menu item to save the '
356
' diagram as a new Scicos block. A Scilab function is generated'
357
' and saved in a file with "".sci"" extension. File name and path'
358
' are to be set in a ""File menu"" dialog.']
360
case 'Set Diagram Info' then
361
mess=[' This menu allows to set users diagram informations'
362
' these infos are stored in the diagram data structure'
363
' and may be used as diagram user documentation'
365
' information format may be redefined by user ']
367
case 'Navigator' then
368
mess=[' This experimental menu opens a graphic window with a tree '
369
' representation of the super blocks hierarchy. Each node '
370
' represents a superblock.'
372
' Navigator window is usefull to open directly a super-block'
373
' every where in the hierarchy.']
376
mess=[' Click on the Exit menu item to close current diagram. '
377
' If current diagram is not a Super block Exit menu item '
378
' leave Scicos and return to Scilab session. Save your diagram ';
379
' or palette before leaving.'
381
' File/Close menu as the same effect']
383
//Object menu --------------------------------------------------------
384
case 'Open/Set (o)' then
385
mess=[' To change the parameters of a regular block or link, '
386
' to open a super block, select first ';
387
' this menu item, click next on the desired object.'
388
' A dialog or edition window appears';
389
' that allows you to modify object'
391
' It is also possible to select a super block to open clicking'
392
' on a node of the ""Navigator"" window'];
395
mess=[' To change the size of a block , select first this menu item,';
396
' click next on the desired block. A dialog appear that allows ';
397
' you to change the width and/or height of the block shape.'];
400
mess=[' To change the icon of a block, select first this menu item,';
401
' click next on the desired block. A dialog appear that allows ';
402
' you to enter scilab instructions used to draw the icon'
404
' You may use the icon_edit function to generate the scilab'
409
mess=[' To change the background color of an object, select first ';
410
' this menu item, click next on the desired object. A dialog appear';
411
' that allows you to choose the desired color'];
415
mess=[' To add a label to block, select first this menu item, click next';
416
' on the desired block. A dialog appear that allows you to enter ';
417
' the desired label.';
418
' labels are used to import data from a block in an other one'];
420
case 'Get Info (i)' then
421
mess=[' This menu allows to get information on an object and on '
422
' its connection with other diagram objects.'
424
' Select this menu and click on an object'
425
' This menu remains selected']
426
case 'Identification' then
427
mess=[' This menu allows to set an identificator to a link or a block '
428
' block identificators are drawn under the block icon. Super blocks'
429
' input/output ports identificators are replicated over the block'
430
' shape ports. Links identificators are not displayed'
432
' Selecting this menu and clicking on a block or links opens an'
433
' editable dialog box']
434
case 'Documentation' then
435
mess=[' This menu allows to set or get documentation for a block '
437
' Selecting this menu and clicking on a block opens an'
438
' editable dialog box']
441
if exists('mess')==0 then
442
mess='No help available on this topic. Sorry.';
7
[btn,%pt,cwin,Cmenu]=cosclick(0)
15
elseif cwin==curwin then
16
xc=%pt(1);yc=%pt(2);%pt=[]
17
k=getobj(scs_m,[xc;yc])
24
elseif or(windows(find(windows(:,1)<0),2)==cwin) then
25
kwin=find(windows(:,2)==cwin)
26
pal=palettes(-windows(kwin,1))
27
xc=%pt(1);yc=%pt(2);%pt=[]
45
if execstr('mess=%scicos_help(name)','errcatch') <>0 then
46
mess='No help available on this topic. Sorry.';