]> Creatis software - bbtk.git/blob - kernel/doc/bbtkUsersGuide/bbtkUsersGuide.tex
796f86c8e0fa22a3b0284297f9bb2307049e343d
[bbtk.git] / kernel / doc / bbtkUsersGuide / bbtkUsersGuide.tex
1 % ==========================================
2 \documentclass[11pt,final,a4paper]{article}
3 \input{config.tex}
4
5
6
7 \begin{document}
8 \begin{center}
9
10 {\Large \BBTK}
11 \vspace{1cm}
12
13 {\Huge User's Guide}
14 \vspace{1cm}
15
16 \bbtk version \bbtkVersion
17 \vspace{0.5cm}
18
19
20 Last modified on : October 12, 2008 \\
21 Generated on : \today 
22 \vspace{0.5cm}
23
24 Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
25
26 Creatis CNRS 5220, INSERM U620
27 \end{center}
28
29 % ==========================================
30 \tableofcontents
31 % ==========================================
32
33 \listoftables
34
35 \listoffigures
36
37
38
39 % ==========================================
40 %\section*{Abstract}
41 % ==========================================
42 \newpage
43 % ==========================================
44 \hrule
45 \section{What is bbtk ?}
46 % ==========================================
47 \BBTK(\bbtkns) is a set of tools 
48 (\CPP libraries and executables) 
49 providing a \CPP framework for the definition 
50 of elementary processing \emph{units}, called {\bf black boxes}, 
51 and the definition and execution of processing \emph{chains} 
52 made up of these black boxes. \\
53 It's a part of the \texttt{Creatools suite} composed mainly of :
54 \begin{verbatim}
55  bbtk
56  creaContours
57  creaImageIO
58  creaLib
59  
60 \end{verbatim}
61 which depend on the OpenSource libraries: 
62 \begin{verbatim}
63  gdcm 
64  itk
65  vtk
66  wxWidgets
67 \end{verbatim}
68
69 % ==========================================
70 \subsection{The black box philosophy}
71 % ==========================================
72
73 \href{http://www.answers.com/topic/black-box-theater}{The Answers Dictionary} defines a {\bf black box} as 
74 \emph{``A device or theoretical construct with known or specified performance characteristics 
75 but unknown or unspecified constituents and means of operation''} \\
76 \href{http://en.wikipedia.org/wiki/Black_box_\%28disambiguation\%29}{Wikipedia}
77 defines a {\bf black box} as 
78 \emph{``any component in a system in which only the input and output 
79 characteristics are of interest, without regard to its internal mechanism 
80 or structure''}. \\
81 We should merge theese definitions. : 
82 not only the inputs and outputs are of interest but also 
83 \emph{what the box does} !
84 Hence, I would say that a black box is any \emph{\bf documented} 
85 component of a system, letting the user know  
86 \emph{\bf what} the box is supposed to do and 
87 \emph{\bf how to use it}
88 but not \emph{\bf how it does it}. \\
89
90 \BBTK provides a systematic framework 
91 to encapsulate (or ``wrap'') any 
92 existing \texttt{C} or \CPP processing code into an object 
93 (a black box) having a {\bf generic symbolic interface}, where 
94
95 \begin{itemize}
96 \item{\bf generic} means that the interface is \emph{the same} 
97 for all boxes. Hence one does not need to know which particular 
98 method allows, say, to set a particular input or 
99 get a particular output of the box. 
100 One can use a black box in a purely abstract way. 
101 \item{\bf symbolic} means that a particular 
102 input or output is referenced by a 'name', that is by a symbol 
103 which identifies the input or output. 
104 It also means that symbolic information (text) is 
105 attached to a box: description of the box, author, 
106 description of its inputs and outputs, etc.
107 \end{itemize}
108
109 (Actually, genericity is achieved because the interface is symbolic. 
110 We let you think about this\dots)
111
112 Of course, symbolic data attached to a box may be 
113 {\bf queried} : what are the inputs/outputs of the box ? 
114 what are their type ? their description ? etc.
115 This allows {\bf automatic documentation} of boxes. 
116
117 The abstract definition of black boxes is the most basic 
118 aspect of \BBTK architecture. 
119 Another key aspect is the groupement of black boxes into 
120 so called {\bf packages}, 
121 which are \emph{dynamic libraries} which can also 
122 be queried, in particular about the boxes they provide. 
123 The package structure then offers a mechanism which 
124 is like a \emph{'plug-in'} mechanism.
125 \BBTK provides the methods to load a package at run-time, 
126 and create instances of the boxes it contains. 
127
128 These two mechanisms (black boxes and packages) 
129 then gives the way to:
130
131 \begin{itemize}
132 \item The definition of an {\bf interpreted script language}, 
133 which allows to manipulate packages and boxes very easily in symbolic way. 
134 \BBTK provides one : \bbi (the Black Box Interpreter). 
135 \item {\bf Automatic documentation} of existing packages. 
136 \texttt{html} documentation of packages is proposed by 
137 \bbStudions.
138 \end{itemize}
139
140 Finally, these different components allow {\bf efficient} :
141
142 \begin{itemize}
143 \item {\bf capitalization and reuse} of existing processing units, 
144 including {\bf documentation} 
145 \item {\bf testing, prototyping} in a very simple script language
146 \item {\bf inter-operability} between atomic processings which 
147 have been written by different persons, using different libraries, etc. 
148 \end{itemize}
149
150 % ==========================================
151 \subsection{\bbtk components}
152 % ==========================================
153 \BBTK includes :
154 \begin{itemize}
155   \item A \CPP {\bf\emph{library}} - called \bbtk - which defines a framework 
156     (abstract classes) to develop black boxes and store them into 
157     dynamic libraries, called black box \emph{packages}.
158   \item Different {\bf\emph{black box packages}} :
159     \begin{itemize}
160       \item {\bf\emph{std}} : the 'standard' package including basic useful boxes.
161       \item {\bf\emph{wx}} : basic graphical interface elements (widgets : sliders, buttons, etc. based on the \texttt{wxWidgets} library).  
162       \item {\bf\emph{itk}} : the basic image processing package, based on the \itk library.
163       \item {\bf\emph{vtk}} : the basic images and surfaces processing and visualization package, based on the \vtk library.
164       \item {\bf\emph{wxvtk}} : widget boxes based on the \vtk library (2D and 3D vizualization and
165       interaction).
166       %\item {\bf\emph{creaImageIO}} : Provides hight level widgets to read images, including DICOM.
167       \item {\bf\emph{toolsbbtk}} : Tools for bbtk administration and package development..      
168     \end{itemize}
169   \item A {\bf\emph{Developement environment}}, called \bbStudio, which provides
170     \begin{itemize}
171       \item An online {\bf\emph{script editor and interpretor}}
172       \item A powerful html {\bf\emph{Help environment}}, integrating :       
173         \begin{itemize}
174           \item Online documentation scaning
175           \item Retreiving boxes on various criterions
176           \item Checking Demo and examples
177         \end{itemize}
178       \end{itemize}
179       \item An standalone {\bf\emph{interpreter}}, called \bbins, which allows to 
180           load black box packages and to define and execute 
181           processing chains by connecting various black boxes.
182       \item {\bf\emph{Various Development Utilities}} :
183          \begin{itemize}
184             \item \bbfy generates the \CPP code of a black box from a 
185                description file written in \texttt{xml}.
186                 %\item \bbdoc generates the html documentation of a black box package 
187                 %(author, description, description of its black boxes : 
188                 %author, description, inputs, outputs, and so on).
189             \item \bbCreatePackage allows to create the basic file architecture 
190                to start the development of a new black box package.
191             \item \text{bbCreateBlackbox} allows to create the basic file architecture 
192                to start the development of a new black box, that will be included in an already existing package.              
193             \item \texttt{bbs2cpp} translates a \texttt{.bbs} script into a \CPP file.
194             \item \texttt{bbc} that interprets (i.e. : executes) a \texttt{.bbs} script.                  
195          \end{itemize}
196       \item A full {\bf\emph{documentation}} printable (pdf), browsable (html),
197       queryable throught keywords.        
198 \end{itemize}
199
200 The general architecture of \BBTK 
201 is shown in figure \ref{bb-architecture}.
202
203 \begin{figure}[!ht]
204 \caption{\label{bb-architecture}\BBTK architecture}
205 \begin{center}
206 \includegraphics[width=0.6\textwidth]{bb-architecture.png}
207 \end{center}
208 \end{figure}
209
210 \newpage
211
212 % ==========================================
213 \section{Getting started with bbStudio}
214 % ==========================================
215
216 % ==========================================
217 % ==========================================
218 % ==========================================
219 % ==========================================
220 % ==========================================
221 % ==========================================
222
223 % ==========================================
224 \subsection{The interface}
225 % ==========================================
226
227
228 %\vspace{0.5cm}\hrule
229 %\section{The Development environment (bbStudio)}
230 %\label{bbStudio}
231
232 Just run it, typing in a console \bbStudio 
233 or clicking on its icon or its menu entry.
234 At start, \bbStudio opens with a very minimal 'How to use' in the middle. \\
235 Don't forget to read it : it will vanish at the first mouse click. \\
236 \begin{verbatim}
237 1) Click on the 'Demo' or 'Examples' link.
238 2) Select a Demo or an Example
239 3) Click on the [Source] link : the source file is loaded in bbStudio
240 4) Click on the 'Run button' (the down arrow at the bottom right
241    of the source file).
242 \end{verbatim}
243
244 You'll get something like in figure 
245 \ref{bbi-fig-bbStudio-gui-start}
246 (the exact appearance of \bbStudio is Operating System and \bbtk version dependent)
247
248 \newpage
249
250
251 \begin{figure}[!ht]
252 \caption{\label{bbi-fig-bbStudio-gui-start}The bbStudio Development environment interface at start time}
253 \begin{center}
254 \includegraphics[width=0.7\textwidth]{bbStudioMainPageStart.png}
255 \end{center}
256 \end{figure}
257
258
259 Feel free to resize any part you want.
260 Your preferences will be kept next time you run again \bbStudio. \\
261
262 Let's have a look at the resized window :
263
264 \begin{figure}[!ht]
265 \caption{\label{bbi-fig-bbStudio-gui}The bbStudio Development environment interface}
266 \begin{center}
267 \includegraphics[width=0.7\textwidth]{bbStudioMainPage.png}
268 \end{center}
269 \end{figure}
270
271 You can see four parts : \texttt{Files}, \texttt{Messages},
272  \texttt{Command}, \texttt{Help}.\\
273
274 The stuff is written using the Advanced User Interface library of wxWidgets
275 (a.k.a. AUI),
276 whose 'docking manager' allows windows and toolbars to be floated/docked 
277 onto a frame.\\
278 Please don't use this feature at learning time (the snapshots of this document
279  wouldn't match with your screen ...)
280
281 \subsubsection{'Files' part}
282 \label{bbi-FilesPart}
283
284 It's the .bbs script editor.\\
285 If you load a file holding a script, it will be displayed here, and you'll be
286 able to modify it, to save it, to save-as it, to run it, using the
287 lower toolbar (see figure : \ref{lowertoolbar})
288
289 \begin{figure}[!ht]
290 \caption{\label{lowertoolbar}The lower tool bar}
291 \begin{center}
292 \includegraphics[width=0.7\textwidth]{lowertoolbar2.png}
293 \end{center}
294 \end{figure}
295
296
297 % \begin{itemize}
298 %   \item {\bf\emph{New file}} : Create a new file to hold a script
299 %   \item {\bf\emph{Open file}} : Open an already existing file holding a script 
300 %   \item {\bf\emph{Close file}} : Close a file holding a script
301 %   \item {\bf\emph{Save file}} : Save he current file (if modified)
302 %   \item {\bf\emph{Save file as}} : Save he current file under a different name
303 %   \item {\bf\emph{Run file}} : Execute the script you just loaded/modified/written
304 %   \item {\bf\emph{cursor position}} : column number : line number   
305 % \end{itemize}
306
307
308 \subsubsection{'Messages' part}
309 \label{bbi-MessagesPart}
310
311 Two kinds of messages will be output here:\\
312 System messages : produced by the kernel, in case of a user mistyping, or an execution error\\
313 Script messages : produced by the \bbtk equivalent of \texttt{printf} 
314 or \texttt{std::cout} in user programs
315
316 \subsubsection{'Command' part}
317 \label{bbi-CommandPart}
318
319 This is where user will type his requirements.
320
321 \subsubsection{'Help Contents' part}
322 \label{bbi-HelpContentsPart}
323
324 The 'Help Contents' part of \bbStudio is used to browse the html help of \BBTK.
325 All the entries of the starting page are self-explanatory :
326  \begin{itemize}
327    \item {\bf\emph{Help Contents}}
328    \begin{itemize}
329      %\item {\bf\emph{Wiki}} : Direct link to the bbtk Wiki (intranet only, right now, www
330      %later).
331      \item {\bf\emph{Demo}} : Link to some 'sophisticated' demonstrations.
332      \item {\bf\emph{Examples}} : Link to some detailed 'How to use' examples
333    \end{itemize}
334    
335    \item {\bf\emph{Guides}}   
336    \begin{itemize}      
337      \item {\bf\emph{User's Guide}} : Step to step How-to for user who wants to create his own
338      application, just using already existing boxes.
339      \item {\bf\emph{Package Developper's Guide}} : Step to step How-to for user who wants to create his own
340      black boxes.
341      \item {\bf\emph{Developper's Guide}} : For bbtk kernel developpers. .
342      \item {\bf\emph{Reference Manual}} : 
343      \item {\bf\emph{Booklet}} : Vade mecum.    
344      \item {\bf\emph{Doxygen Documentation}} : Doxygen source browser.
345    \end{itemize}
346         
347    \item {\bf\emph{Boxes}} : Box retrieving on various criterions :
348    \begin{itemize} 
349     \item {\bf\emph{ \texttt{By name}}} (Alphabetical list), 
350     \item {\bf\emph{    \texttt{By package}}}, 
351      \item {\bf\emph{   \texttt{By category}}}.
352    \end{itemize} 
353    
354         A special hidden Box category, called \texttt{{Adaptors}} exists. \\ 
355         They are used internaly to perform type conversions. Thought there are not end user intended, you may query them.     
356
357       
358  \end{itemize}
359
360
361 % ==========================================
362
363
364
365
366 % ==========================================
367 % ==========================================
368 % ==========================================
369 % ==========================================
370 % ==========================================
371
372
373
374
375 % ==========================================
376
377 \newpage
378
379 % ==============================================
380 \subsection{Running Demo and Examples}
381 % ==============================================
382
383 Run \bbStudio the way you need. \\
384 In the part 'Help contents' (See figure \ref{HelpContents}), select \texttt{Examples} link.
385
386 \begin{figure}[!ht]
387 \caption{\label{HelpContents}Help Contents}
388 \begin{center}
389 \includegraphics[width=0.7\textwidth]{HelpContents.png}
390 \end{center}
391 \end{figure}
392
393 \newpage
394
395 You will be asked to select a Box category (See figure \ref{BoxCategories}); \\ 
396 Select \texttt{example}.
397
398
399 \begin{figure}[!ht]
400 \caption{\label{BoxCategories}Box Categories}
401 \begin{center}
402 \includegraphics[width=0.7\textwidth]{BoxCategories.png}
403 \end{center}
404 \end{figure} 
405
406 You will be asked to choose a script (See figure \ref{example}).
407
408 \begin{figure}[!ht]
409 \caption{\label{example}example list}
410 \begin{center}
411 \includegraphics[width=0.7\textwidth]{example.png}
412 \end{center}
413 \end{figure}
414
415
416
417 Select \texttt{wx::exampleSlider} (See figure \ref{exampleSlider});
418  
419 \begin{figure}[!ht]
420 \caption{\label{exampleSlider}example 'exampleSlider'}
421 \begin{center}
422 \includegraphics[width=0.7\textwidth]{exampleSlider.png}
423 \end{center}
424 \end{figure}
425
426 You can see the graphical summary representation of the current script (the elementary boxes that compose it, and their
427 connections) \\
428 Click on \texttt{source}, and you'll be able to see the (very simple) script, 
429 in the 'Files' part, within the script editor (See figure \ref{exampleSliderSource});
430
431 \begin{figure}[!ht]
432 \caption{\label{exampleSliderSource}source code of 'exampleSlider'}
433 \begin{center}
434 \includegraphics[width=0.7\textwidth]{exampleSliderSource.png}
435 \end{center}
436 \end{figure}
437
438 Run it, using the lower toolbar  (see figure : \ref{lowertoolbar})
439
440 You'll get something like in figure \ref{execSliderSource}.
441
442 \begin{figure}[!ht]
443 \caption{\label{execSliderSource}execution of 'exampleSlider'}
444 \begin{center}
445 \includegraphics[width=0.7\textwidth]{execSliderSource.png}
446 \end{center}
447 \end{figure}
448
449 Feel free to move the slider, to check it actually works...
450
451 \newpage
452
453 Just a few words on what you saw :
454 \begin{itemize}
455 \item{in the File part} \\
456 The source code of the script
457 \begin{verbatim}
458    new Slider     slider
459      set slider.ReactiveOnTrack 1
460 \end{verbatim}
461 We create a \texttt{Slider} called \emph{slider}\\
462 We tell it to inform anybody that's interested in, that the cursor moved, each time it moved. \\
463 The standard behaviour is to inform, only when cursor is released.
464 \begin{verbatim}
465    new OutputText text
466 \end{verbatim}
467 We create a \texttt{OutputText} called \emph{text} 
468 (in which slider value will be displayed)
469
470 \begin{verbatim}
471 new LayoutLine layout
472 \end{verbatim}
473 We create a \texttt{LayoutLine} called \emph{layout},
474 a \emph{container} widget, designed to embed other wigets (say, a main window)
475 \begin{verbatim}
476 connect slider.Widget    layout.Widget1
477 connect text.Widget      layout.Widget2
478 \end{verbatim}
479 We embed \emph{slider} and \emph{text} into  \emph{layout}.
480 \begin{verbatim}
481 connect slider.BoxChange text.BoxExecute
482 connect slider.Out       text.In
483 \end{verbatim}
484 We tell  \emph{slider} to inform \emph{text} every time it's modified.\\
485 We tell  \emph{slider} to pass its output value (\texttt{Out} to \emph{text}  input value (\texttt{In})
486 \begin{verbatim}
487 exec layout
488 \end{verbatim}
489 We tell \emph{layout} to process itself (it will do it only if it's warned 
490 that one of its entries was modified since its (own) last processing.
491
492 \item{in the Help part}
493
494 You can see the graphical representation of the script, as in figure \ref{SmallGraph}.
495
496
497 \begin{figure}[!ht]
498 \caption{\label{SmallGraph}Graphical representation of a script}
499 \begin{center}
500 \includegraphics[width=0.7\textwidth]{SmallGraph.png}
501 \end{center}
502 \end{figure}
503
504 Both graphical pipe line (\emph{slider} and \emph{text} are embedded into \emph{layout})
505  and processing pipe line (\emph{slider} warns \emph{text} immedialtely when it's modified, \emph{slider} passed \emph{text} its new value).\\
506  Yes, we know : all the arrows (pipe line arrows and processing arrows) are blue; we are sorry about that...\\
507  
508  You could get a much more detailled graph, just clicking on the button \\ \texttt{graph (detailled)} in the toolbar of the \texttt{Command} part, like in
509  figure  \ref{LargeGraph}.
510  
511 \begin{figure}[!ht]
512 \caption{\label{LargeGraph}Detailled graphical representation of a script}
513 \begin{center}
514 \includegraphics[width=0.75\textwidth]{LargeGraph.png}
515 \end{center}
516 \end{figure} 
517
518 \end{itemize}
519 \newpage
520
521 % ==============================================
522 \subsection{Online Help}
523 % ==============================================
524
525 Various levels or help are suplied by \bbStudions.
526
527 % ==========================================
528 \subsubsection{Command line help}
529 % ==========================================
530
531
532 The 'working' area (the left one, as opposed to the 'help' area, on the right side) is composed of : 
533 one single line area (\texttt{Command}), at the bottom in which you can enter your commands and 
534 a multiple line zone in which the Command interpreter prints out the result of your commands.
535 The upper part contains the script editor; we shall not use it right now, you may reduce it
536
537 Try typing in the \texttt{Command} area (in this manual, 
538 the commands entered by the user will be preceded by a prompt \textgreater) :
539 \begin{verbatim}
540 > help 
541 \end{verbatim}
542
543 you get the list of the commands of the interpreter :
544 \begin{verbatim}
545 Available commands :
546  author
547  category
548  config
549  connect
550  debug
551  define
552  delete
553  description
554  endefine
555  endpackage
556  exec
557  graph
558  help
559  include
560  index
561  input
562  kind
563  load
564  message
565  new
566  newgui
567  output
568  package
569  print
570  quit
571  reset
572  set
573  unload
574 \end{verbatim}
575
576 To get help on a particular command type \texttt{help <command-name>},
577 for example :
578 \begin{verbatim}
579 > help author
580 \end{verbatim}
581
582 gives :
583 \begin{verbatim}
584  usage : author <string>
585   Adds the string <string> to the author information of the black box being defined
586 \end{verbatim}
587
588 The \texttt{help} command has multiple usages. 
589 It is used to get help about almost anything in the interpretor!
590 Type \texttt{'help help'} to get help on the \texttt{help} command itself :
591 \begin{verbatim}
592 > help help
593  usage : 
594          (1) help 
595          (2) help <command name> 
596          (3) help packages [all]
597          (4) help <package name> [all]
598          (5) help <black box type> 
599          (6) help <black box name>
600   Effect :
601          (1) Lists all available commands;
602          (2) Prints help on a particular command; 
603          (3) Lists the packages loaded and their black boxes.
604              Add 'all' to list adaptors; 
605          (4) Prints short help on the black boxes of a package.
606              Add 'all' to include adaptors; 
607          (5) Prints full help on a black box type; 
608          (6) Prints information on the inputs, outputs and connectionns
609              of a black box instance.
610 \end{verbatim}
611
612 At start the interpretor does not know any black box. 
613 If you type \texttt{'help packages'}, which is 
614 the third form of the \texttt{help} command, you get :
615 \begin{verbatim}
616 > help packages
617 user
618   workspace
619 \end{verbatim}
620
621 which means that the interpretor only knows one package 
622 (library of black boxes) called \texttt{user}
623 and which contains a black box called \texttt{workspace}.
624 The \texttt{user} package is an internal package of the interpreter, 
625 which stores user-defined black box types. 
626 At start, it already contains 
627 one box, called \texttt{workspace}.
628 \texttt{workspace} is a special type of black box, 
629 called complex black box, whose purpose is 
630 to store other black boxes. 
631 Any black box you create in \bbStudio is stored 
632 in \texttt{workspace}  
633 (this will be explained in details in sections 
634 \ref{bbi-writing-scripts} and 
635 \ref{bbi-more-on-complex-black-boxes}). 
636
637 If you type \texttt{'help workspace'}, you get :
638 \begin{verbatim}
639 > help workspace
640  Complex Black Box <user::workspace>
641   User's workspace
642   By : bbtk
643   Category(s) : complex box;
644   * No inputs
645   * No outputs
646   * No boxes
647 \end{verbatim}
648
649 In the text displayed, 
650 the \texttt{user::} prepended to the name \texttt{workspace} 
651 means that the box \texttt{workspace} 
652 belongs to the \texttt{user} package. 
653 Then comes a description and three lines which 
654 tell that \texttt{workspace} does not have any input 
655 nor output nor boxes yet.
656
657 In order to let the interpreter know of some black boxes, 
658 you must load another package. 
659 The \texttt{std} package is the ``standard'' package, 
660 which contains basic useful black boxes. 
661
662 To load it, type :
663 \begin{verbatim}
664 > include std
665 \end{verbatim}
666
667 Then if you type :
668 \begin{verbatim}
669 > help packages
670 \end{verbatim}
671
672 you get something like :
673
674 \begin{verbatim}
675
676  std
677    ASCII                   : ascii codes sequence to string - string to ascii...
678    Add                     : Adds its inputs
679    ConcatStrings           : String concatenation
680    Configuration           : Gets configuration informations
681    Div                     : Divides its inputs
682    ExecBbiCommand          : Executes bbi commands
683    ExecSystemCommand       : Executes system (O.S.) commands
684    GetVectorCharElement    : Gets the i-th element from the input vector (std...
685      ...
686    MagicBox                : Takes *any kind* of data and copies it to its ou...
687    MakeFileName            : Makes a kosher file name
688    Mul                     : Multiplies its inputs
689    MultipleInputs          : This box has multiple Void inputs and one Void o...
690    StringRelay             : Just copies the value of its input to its output...
691    StringSelect            : Outputs the string set to the ith input Ini (In0...
692  user
693    workspace 
694 \end{verbatim}
695
696 Now the interpreter knows the package \texttt{std} and the black boxes it provides,
697 such as the \texttt{'Add'} box, the \texttt{'ConcatStrings'} box, and so on. Remark that the 
698 content of \texttt{std} may vary from one version to another 
699 as new black boxes might be added to it. 
700 If you type :  
701 \begin{verbatim}
702 > help Add
703 \end{verbatim}
704
705 You'll get a text help, in the 'Message' part :
706 \begin{verbatim}
707 Black Box <std::Add>S
708   Adds its inputs
709   By : laurent.guigues@creatis.insa-lyon.fr
710   Categories : atomic box;math;
711   * Inputs : 
712      'BoxExecute'     <bbtk::Void> [signal] : Any signal received by this input 
713                                               executes the box
714      'BoxProcessMode' <String>     []       : Sets the processing mode of the box 
715                                               (Pipeline | Always | Reactive)
716      'In1'            <Double>     []       : First number to add
717      'In2'            <Double>     []       : Second number to add
718   * Outputs : 
719      'BoxChange'      <bbtk::VoidS> [signal] : Signals modifications of the box
720      'Out'            <Double>     []       : Result
721 \end{verbatim}
722
723 More information about what is a 'box' will be given in the 'Scripting' part of this manual.
724
725 % ==========================================
726 \subsubsection{Guides}
727 % ==========================================
728
729 An html version of all the guides is browsable in the \texttt{Help} part of \bbStudions.
730  \begin{itemize}      
731      \item {\bf\emph{User's Guide}} : Step to step How-to for user who wants to create his own
732      application, just using already existing boxes.
733      \item {\bf\emph{Package Developper's Guide}} : Step to step How-to for programmer who wants to create his own
734      black boxes/packages.
735      \item {\bf\emph{Developper's Guide}} : For bbtk kernel developpers only. (This one is probabely not very much
736      up-to-date, since we spend more time in developping than writing documentation that's not of user concern).
737      \item {\bf\emph{Reference Manual}} : Contains a exaustive description of all the features for all the commands.
738      \item {\bf\emph{Booklet}} : Vade mecum.     
739      \item {\bf\emph{Doxygen Documentation}} : Doxygen source browser.\\ Automatically generated from source file
740      headers. Should concern only the kernel developpers (i.e. : us).
741    \end{itemize}
742         
743
744    
745 % ==========================================
746 \subsubsection{Boxes Help}
747 % ==========================================
748  Box retrieving on various criteria :
749    \begin{itemize} 
750     \item {\bf\emph{Alphabetical list}} \\ This is the 'zero-level' of retrieving.
751     \item {\bf\emph{List by package}} \\ Several packages are supplied with bbtk :
752     \begin{itemize}
753       \item {\bf\emph{std}} : the 'standard' package including basic useful boxes.
754       \item {\bf\emph{wx}} : basic graphical interface elements (widgets : sliders, buttons, etc. based on the \texttt{wxWidgets} library).  
755       \item {\bf\emph{itk}} : the basic image processing package, based on the \itk library.
756       \item {\bf\emph{vtk}} : the basic images and surfaces processing and vizualization package, based on the \vtk library.
757       \item {\bf\emph{wxvtk}} : widget boxes based on the \vtk library (2D and 3D vizualization and
758       interaction).
759       %\item {\bf\emph{creaImageIO}} : Provides hight level widgets to read images, including DICOM.
760       \item {\bf\emph{toolsbbtk}} : Tools for bbtk administration and package development, such as :
761          \begin{itemize}
762          \item{\texttt{GUICreateBlackBox}} For creating the XML or C++ code for a new black box 
763          \item{\texttt{GUICreatePackage}} For creating a new bbtk package file structure on disk (Graphical user interface for the shell script bbCreatePackage)
764          \item{\texttt{MakePackageDoc}} For creating the html documentation of a package. The doc is generated at the 'canonical' location. Works both for a build tree or an installed toolkit.         
765          \end{itemize}               
766     \end{itemize}
767     \item {\bf\emph{List by category}}.
768     
769     
770     A given box may belong to more than one \texttt{category}.\\
771     You have to consider categories like keywords to index black boxes.\\
772     Some of them are mutually exclusive.
773     A black box may be :
774     \begin {itemize}
775        \item{atomic box / complex box}\\
776        Whether it's written is C++ or it's an assembly of several black boxes (atomic or complex).\\
777        Any box is either atomic ou complex.
778        \item{example / demo / application}\\
779            These ones are always complex black boxes. 
780           \begin {itemize}
781              \item{example}\\
782              It's just a (simple) example, for programmers, on how to use a given feature.
783              \item{demo}\\
784              It can be a 'good looking' (a.k.a 'sexy') example on some sophisticated work.       
785              \item{application}\\
786              It's a Final application, end user intended (e.g. Subscale a huge volume, Crop a DICOM image, etc)  
787           \end {itemize}
788         \item{widget}\\
789         Piece of graphical interface (based on \texttt{wxWidgets})
790         \item{Dicom}\\
791         Dicom medical image related box.
792         \item{viewer}\\
793         \item{read/write}
794         \item{mesh}
795         \item{3D Object creator}
796         \item{math}
797         \item{misc}              
798     \end {itemize}
799   \end {itemize}
800   
801 % ==========================================      
802 \subsubsection{The Package Browser}
803 \label{Package_Browser}
804 % ==========================================
805
806
807 You can run it using the tool bar of the 'Command' part. See figure \ref{imPackage_Browser}.
808
809 \begin{figure}[!ht]
810 \caption{\label{imPackage_Browser}The Package Browser}
811 \begin{center}
812 \includegraphics[width=0.6\textwidth]{Package_Browser.png}
813 \end{center}
814 \end{figure}
815
816 It allows you to query informations about what you can find in the packages (boxes and applications), using several criterions
817 (warning : it's case sensitive, i.e '\texttt{Button}' will give different results than '\texttt{button}' ...)
818 \begin {itemize}
819 \item Packages :\\
820 All the boxes and applications held in a given package (e.g. \texttt{wxvtk}, \texttt{std}, ...)
821 \item Name :\\
822 You can query on a subpart of the name of a box or an application (e.g. \texttt{DICOM})
823 \item Description :\\
824 You can query on a substring of the description of a box or an application (e.g. \texttt{utton} : user wants to get all
825 the\texttt{Button} as well as the \texttt{button} )
826 \item Category :\\
827 You can query on a sub part of the category name of a box or an application (e.g. \texttt{3D})
828 \item Input Type :\\
829 You can query all the boxes or applications that have at least one Input entry of the given type (e.g. \texttt{int})
830 \item Output Type :\\
831 You can query all the boxes or applications that have at least one Output entry of the given type (e.g. \texttt{int})
832 \item Input Nature :\\
833 You can query all the boxes or applications that have at least one Input entry of the given nature (e.g. \texttt{signal})
834 \item Output Nature :\\
835 You can query all the boxes or applications that have at least one Output entry of the given nature (e.g.
836 \texttt{signal},\texttt{file name})
837 \end {itemize}
838
839
840 All these criterions are \emph{AND}ed while the query process.\\
841 You can get the whole description of a given box or application clicking on its name.
842
843 \newpage 
844
845 % ==============================================
846 \subsection{The Menu}
847 % ==============================================
848
849 At last, let's have a look at \bbStudio menu.(See figure \ref{themenu})
850
851 \begin{figure}[!ht]
852 \caption{\label{themenu}The bbStudio menu}
853 \begin{center}
854 \includegraphics[width=0.7\textwidth]{themenu.png}
855 \end{center}
856 \end{figure}
857
858 \begin {itemize}
859   \item{File}
860      \begin {itemize}
861         \item{Open the bbtk configuration file}
862         \item{Quit}
863      \end {itemize}       
864   \item{Tools}
865      \begin {itemize}
866         \item{Create package} :
867         Provides a graphical interface to help Package developper to create a new empty package.
868         \item{Create black box}
869         Provides a graphical interface to help Package developper to create a new empty black box, and add it to an already existing package.   
870         \item{Show last image graph}
871         \item{Regenerate package doc} :
872         if user was supplied new black boxes, and added them to an already existing package, he can update the package documentation, in order to benefit all the features of the Help mechanisms.      
873         \item{Regenerate boxes list} :
874         if user wants to update only boxes list (quicker)
875         \item{Regenerate all}
876         User wants to rebuild the whole documentation.     
877      \end {itemize}     
878   \item{Options}
879      \begin {itemize}
880         \item{Reset before running} Before running, all the already boxes are destroyed, all the already loaded packages are unloaded (this is the recomended option).   
881      \end {itemize}     
882   \item{Windows}
883   User may decide, for any reason of his own, to hide one or more pannels:
884      \begin {itemize}
885         \item{Show 'Files' panel}
886         \item{Show 'Help' panel}
887         \item{Show 'Command' panel}
888         \item{Show 'Messages' panel}
889         \item{Launch Package browser} The package browser is a stand alone application. This can be achieved, too, using the lower tool bar, button 'Start Package Browser'     
890         \item{}     
891      \end {itemize}     
892   \item{About}
893      \begin {itemize}
894         \item{About} Info about \texttt{bbStudio}.       
895      \end {itemize}     
896 \end {itemize}
897 % ==========================================
898 \section{bbs scripting}
899 % ==========================================
900
901 % ==========================================
902 \subsection{Using an already existing script}
903 % ==========================================
904
905 Using the lower toolbar (see figure : \ref{lowertoolbarsmall}), open the file
906 holding the script.
907
908 \begin{figure}[!ht]
909 \caption{\label{lowertoolbarsmall}The lower tool bar}
910 \begin{center}
911 \includegraphics[width=0.7\textwidth]{lowertoolbar.png}
912 \end{center}
913 \end{figure}
914
915  You'll see it, in the '\texttt{Files}' part.\\ \\
916  You may run it, using the lower toolbar. \\ 
917  \texttt{WARNING :} if the script contains one or more \texttt{LayoutSplit}
918  object, you will have to resize the sub windows. \\ \\
919  You may modify, save or save-as the current script, using the lower toolbar.\\ \\
920  You may have a look at the graphical representation of the pipeline (sorry,
921  right now, to modify the pipeline, you have to modify the script; 
922  you cannot modify grapically the pipeline; Work in progress...)
923   
924
925 % ==========================================
926 \subsection{Inside black boxes}
927 % ==========================================
928
929 After loading the package it belongs to, you can You can create an \emph{instance} of an \texttt{Add} box by 
930 the command \texttt{new} :
931
932 \begin{verbatim}
933 > new Add a
934 \end{verbatim}
935
936 The \texttt{'a'} at the end is the \emph{name} of the instance, 
937 which will be used to reference it later. 
938 It is important to distinguish a box \emph{type} 
939 and an \emph{instance} of a box type. 
940 The \texttt{Add} box of the package \texttt{std} is actually 
941 a \emph{box type} , like \texttt{int} is a data type 
942 in \texttt{C} langage. The \texttt{new} command allows to create 
943 an instance of a box type, exactly like \texttt{int i;} in 
944 a \texttt{C} code, it declares a variable of type \texttt{int} whose 
945 name is \texttt{i}. 
946 Of course, like in \texttt{C} Language, you can declare multiple boxes of the 
947 same type in \bbi. \\
948
949 You can ask information about a given black box :\\
950 In the \texttt{Command part}, type \texttt{help} + black box name, e.g. \\
951
952 \begin{verbatim}
953 > help Add a
954 \end{verbatim}
955 Have a look to the 'Help' Part (see figure : \ref{HelpAdd}) :
956
957 \begin{figure}[!ht]
958 \caption{\label{HelpAdd}The html Help}
959 \begin{center}
960 \includegraphics[width=0.7\textwidth]{HelpAdd.png}
961 \end{center}
962 \end{figure}
963
964 The \texttt{std::} prepended to the name \texttt{Add} 
965 means that the box \texttt{Add} 
966 belongs to the \texttt{std} package. 
967 Then comes a description 
968 (the one which was provided by the author of the box), 
969 the author(s) of the box (usually e-mail adress(es)) and 
970 the categories to which the box belongs. 
971 Finally comes the lists of inputs and outputs of the box.
972 For each input or output, \bbi provides 
973 its \emph{name} (between quotes, e.g. \texttt{'ProcessMode'}), 
974 its \emph{type} (between \texttt{<} and  \texttt{>}, e.g. \texttt{<Int>})
975 and a description.    
976 Remark that the box \texttt{Add} is not a 'complex' black box 
977 but an 'atomic' box, hence its help does not 
978 mention any information concerning possible internal boxes. 
979
980 After the creation of the box \texttt{a}, type :
981 \begin{verbatim}
982 > help workspace
983 \end{verbatim}
984
985 you get :
986 \begin{verbatim}
987 Complex Black Box <user::workspace>
988  User's workspace
989  By : bbtk
990  Category(s) : complex box;
991  * No inputs
992  * No outputs
993  * Boxes : 
994     'a' <std::Add>
995 \end{verbatim}
996
997 which means that \bbi workspace now contains a black box named \texttt{a},
998 of type \texttt{std::Add}.
999
1000 Now look back at the help on \texttt{Add} boxes : 
1001 you can see that this type of box has two inputs, 
1002 with name \texttt{In1} and \texttt{In2},
1003 and an output, with name \texttt{Out}.
1004
1005 You can set the input \texttt{In1} 
1006 of the \texttt{Add} box \texttt{a} to the value $1$ 
1007 by the command :
1008 \begin{verbatim}
1009 > set a.In1 1 
1010 \end{verbatim}
1011
1012 Similarly, setting the input \texttt{In2} of \texttt{a} to the value $2$
1013 is done with :
1014 \begin{verbatim}
1015 > set a.In2 2
1016 \end{verbatim}
1017  
1018 And you print the output \texttt{Out} of the box \texttt{a} with :
1019 \begin{verbatim}
1020 > print "result=$a.Out$"
1021 result=3
1022 \end{verbatim}
1023
1024 In the string passed to the \texttt{print} command, 
1025 each substring enclosed between a couple of \$ is considered 
1026 as the name of an output of a box. 
1027 To process this special substrings, the interpretor :
1028 \begin{enumerate}
1029 \item Processes the box if needed (see below)
1030 \item Converts the output of the box to a string if possible 
1031 (see below)
1032 \item Substitutes the result in the string to print
1033 \item Postpones an implicit 'new line' character to the string
1034 \end{enumerate}
1035
1036 %\paragraph
1037
1038 Box processing is needed if :
1039
1040 \begin{itemize}
1041 \item either at least input has changed since last processing 
1042 \item or the input \texttt{'BoxProcessMode'} of the box is set to 
1043 \texttt{'Always'}, which forces box reprocessing. 
1044 \end{itemize}
1045
1046 Note that all boxes have an input named \texttt{'BoxProcessMode'}.
1047
1048 Another way to process the box \texttt{a} is to issue the command :
1049 \begin{verbatim}
1050 > exec a
1051 \end{verbatim}
1052
1053 however this command does not display anything (except if the 
1054 box itself displays something in its processing).
1055 It just processes the box if needed. 
1056 This command is used to execute boxes that do not have any output,  
1057 such as boxes that write something to a file or, display a 
1058 graphical interface, and so on. 
1059
1060 %To exit \bbi, type :
1061 %\begin{verbatim}
1062 %> quit
1063 %Good bye !
1064 %\end{verbatim}
1065
1066 % ==========================================
1067 \hrule
1068
1069 \paragraph{Summary}
1070 %\hrule
1071 \begin{itemize}
1072 \item The \texttt{include} command allows to load a package, and the complex black boxes that come with it..
1073 \item \texttt{help} gives help on :
1074 \begin{itemize} 
1075 \item Available commands if you just type \texttt{help}.
1076 \item A particular command if you type \texttt{help <command-name>}.
1077 \item All available packages and their boxes (without description) if you type \texttt{help packages}.
1078 \item A particular package and its boxes (with brief description) if you type \texttt{help <package-name>}.
1079 \item A particular black box type (with full description) if you type \texttt{help <box-type-name>}. In particular, \texttt{help workspace} displays information on the content of the \texttt{'workspace'} black box, which stores the boxes created by the user (by \texttt{new}).
1080 \end{itemize}
1081 %\item \texttt{list} displays the list of black box instances created so far (by \texttt{new}).
1082 \item \texttt{new} : creates an instance of a black box. 
1083 \item \texttt{set} : sets the value of an input of a black box. 
1084 \item Under any component of  \bbStudions, to reference the input called \texttt{i} 
1085 of a black box called \texttt{b} you must type \texttt{'b.i'}. 
1086 The same syntax holds for outputs.
1087 \item \texttt{print} : prints a string, substituting each substring of the form \$b.o\$ by the value of the output \texttt{o} of the black box \texttt{b}. Note that an
1088 implicit trailing 'new line character' is added at the final string.
1089 \item \texttt{exec} : runs, if needed, the process of a box. 
1090 %\item \texttt{quit} : quits \bbi.
1091 \end{itemize}
1092 \hrule
1093
1094 %\paragraph{Note :}
1095 %A more 'modern' way to proceed is to run \texttt{bbStudio}, drag and drop the  \texttt{Command} bookmark to the lower \texttt{Welcome to bbStudio!} bar.
1096 %Wou'll get something like in figure \ref{bbCommandPlusHelp} :
1097
1098 %\begin{figure}[!ht]
1099 %\caption{\label{bbCommandPlusHelp}
1100 %An other way to run the command interpreter}
1101 %\begin{center}
1102 %\includegraphics[width=0.5\textwidth]{bbCommandPlusHelp.png}
1103 %\end{center}
1104 %\end{figure}
1105
1106 % ==========================================
1107
1108 % ==========================================
1109 \subsubsection{Connecting black boxes}
1110 \label{bbi-connecting-black-boxes}
1111 % ==========================================
1112
1113 \BBTK allows to create 
1114 and execute processing chains, 
1115 also called \emph{pipelines}, 
1116 by connecting black boxes.
1117 This section explains how to do it with examples. 
1118 Read section \ref{bbi-more-on-pipeline-processing} to get 
1119 more information on pipeline processing.
1120
1121 First start \bbStudio and load the package \texttt{std}, typing :
1122 \begin{verbatim}
1123 > include std
1124 \end{verbatim}
1125 in the 'Command' part.
1126
1127 Assume you want to compute $1+2+3$. You can do it by 
1128 chaining two \texttt{Add} boxes, as shown in figure 
1129 \ref{bbi-fig-connecting-black-boxes-1}. 
1130
1131 \begin{figure}[!ht]
1132 \caption{\label{bbi-fig-connecting-black-boxes-1} A simple pipeline which adds 3 numbers}
1133 \begin{center}
1134 \includegraphics[width=0.5\textwidth]{1plus2plus3.png}
1135 \end{center}
1136 \end{figure}
1137
1138
1139 The \bbi instructions to create and execute this pipeline are :
1140 \begin{verbatim}
1141 > new Add a
1142 > new Add b
1143 > connect a.Out b.In1
1144 > set a.In1 1
1145 > set a.In2 2
1146 > set b.In2 3
1147 > print $b.Out$
1148 \end{verbatim}
1149
1150 You will see the (very expected) result :
1151 \begin{verbatim}
1152 6
1153 \end{verbatim}
1154
1155 The first three commands build the pipeline, 
1156 the next three set \texttt{a} and \texttt{b} black boxes inputs and the last one 
1157 prints \texttt{b} black box output (the pipeline is executed before printing, because the interpretor 'knows' the box  \texttt{b}, 
1158 whose output is requested, is not up to date.
1159  
1160 The command \texttt{'connect a.Out b.In1'} ``plugs'' the output 
1161 \texttt{Out} of the box \texttt{a} into the input \texttt{In1} of the 
1162 box \texttt{b}. 
1163 Once the boxes are connected, the processing of the two boxes are chained :
1164 getting the output of \texttt{b} requires getting its inputs, 
1165 hence getting the output of \texttt{a} which is connected to it. 
1166 This pipeline mechanism can recurse into arbitrary long 
1167 chains of boxes (see \ref{bbi-more-on-pipeline-processing} 
1168 for details).
1169
1170
1171 Lets' consider an other, more image oriented, example :
1172
1173 \begin{verbatim}
1174 > include vtk
1175 > include wx
1176 > include itk
1177 > include wxvtk
1178
1179 > new FileSelector fileDialog
1180 > new ImageReader  reader 
1181 > new Slider       slider
1182 > new Viewer2D     viewer
1183
1184 > connect fileDialog.Out   reader.In 
1185 > connect reader.Out       viewer.In
1186 > connect slider.Out       viewer.Slice
1187 > connect slider.BoxChange viewer.BoxExecute
1188
1189 > exec viewer
1190 \end{verbatim}
1191
1192 Some explainations : the \texttt{include} instructions load the necessary packages. \\
1193
1194 \texttt{new FileSelector} will pop a File Selector, at run time, that will out the user chosen file name. \\
1195 \texttt{new Slider} will pop a Slider, at run time, that will out an integer, used later as a slice number.\\ 
1196 \texttt{new ImageReader} will read any itk readable file, whose name is passed as a std::string, and return a itk::ImagePointer.\\
1197 \texttt{new Viewer2D} display a plane, whose number id specified by an integer.\\
1198 \\
1199 \texttt{connect fileDialog.Out   reader.In} plugs the output of the File Selector (a std::string) to the input of the reader (a std::string, too).\\
1200 \texttt{connect reader.Out       viewer.In} plugs the output of the reader (an itk::ImagePointer) to the input of the Viewer (a vtkImageData *)\\
1201 \texttt{connect slider.Out       viewer.Slice} plugs the output of the slider (an int) to an other output (named Slide) of the viewer.\\
1202 \texttt{connect slider.BoxChange viewer.BoxExecute} says the viewer that it must re process itself any time the slider is modified.\\
1203 \\
1204 \texttt{exec viewer} processes the viewer.
1205
1206
1207 This would correspond to the graph in figure \ref{bbi-simplegraph}
1208
1209
1210 \begin{figure}[!ht]
1211 \caption{\label{bbi-simplegraph}(Very) simple Graph of a (very) simple pipeline}
1212 \begin{center}
1213 \includegraphics[width=0.8\textwidth]{bbi-simplegraph.png}
1214 \end{center}
1215 \end{figure}
1216    
1217 Of course, to be able to connect two boxes, 
1218 the output and the input must be compatibles. 
1219 You can always connect an output to an input of the \emph{same} type, 
1220 but you can do more, thanks to particular (hidden) black boxes called {\bf adaptors}.
1221
1222 An adaptor is a black box which has at least one input, called \texttt{In}, 
1223 and at least one ouput called \texttt{Out} and whose role is to convert 
1224 a data of the type of \texttt{In} 
1225 into a data of the type of \texttt{Out} (other inputs or outputs may serve 
1226 to parameter the adaptor or retreive other useful information).
1227
1228 Under \bbStudions, if you type :
1229 \begin{verbatim}
1230 > load std
1231 > help std all
1232 \end{verbatim}
1233 you get :
1234 \begin{verbatim}
1235  Package std v1.0.0 - laurent.guigues@creatis.insa-lyon.fr
1236  Basic useful black boxes
1237  Black boxes : 
1238       ...
1239    BoolToString        [DA]  : Converts a Bool (bool) into a string
1240    CastBoolToChar      [DA]  : Static cast from Bool (bool) to Char (signed c...
1241    CastBoolToDouble    [DA]  : Static cast from Bool (bool) to Double (double...
1242       ...
1243    CastBoolToUChar     [DA]  : Static cast from Bool (bool) to UChar (unsigne...
1244    CastBoolToUInt      [DA]  : Static cast from Bool (bool) to UInt (unsigned...
1245       ...
1246    CastUIntToBool      [DA]  : Static cast from UInt (unsigned int) to Bool (...
1247    CastUIntToChar      [DA]  : Static cast from UInt (unsigned int) to Char (...
1248    CastUIntToDouble    [DA]  : Static cast from UInt (unsigned int) to Double...
1249       ...      
1250
1251 \end{verbatim}
1252
1253 \texttt{[DA]}  stands for \emph{default adaptor}.
1254
1255 Once you have loaded the package \texttt{std}, you can 
1256 plug an output of type \texttt{char} into an input of type \texttt{double}. 
1257 When the interpreter encounters the \texttt{connect} command, 
1258 it looks for an adequate \emph{adaptor} in the  loaded packages. 
1259 In our case, as the package \texttt{std} provides the 
1260 \texttt{CastUCharToDouble} adaptor, the interpreter automatically creates an 
1261 instance of this adaptor and place it \emph{between} 
1262 the output and the input you want to connect 
1263 (however this adaptor is hidden to you, 
1264 it is embedded into the created connection and does not appear 
1265 as an existing black box). 
1266 When the pipeline is processed the 
1267 adaptor converts the output data into the required input type, 
1268 in a totally transparent way.
1269 In our example, the \texttt{CastUCharToDouble} adaptor 
1270 would simply cast the value of the \texttt{char} into a \texttt{double}, 
1271 however arbitrarily complex type conversion may be done.\\
1272 \texttt{WARNING} : these adaptors are \texttt{C++ static cast}, i.e., there is, right now',
1273  no 'intelligent' conversion (only truncation) e.g. think to \texttt{CastDoubleToUChar}!
1274
1275 %\begin{verbatim}
1276 %Question (for info-dev): 
1277 %if two adaptors with the same input and output types exist 
1278 %in two different packages, currenly loaded, 
1279 %which one is chosen by the interpreter at connection time?
1280 %A feature is missing to specify explicitely which one user wants to choose 
1281 %(use a namespace notation ?)
1282
1283 %-> Role of default adaptors
1284 %\end{verbatim}
1285
1286 Note that the \texttt{set} and \texttt{print} commands of interpreter 
1287 work with adaptors from \texttt{string} to the type of the input to set 
1288 or from the type of the output to print to \texttt{string}. 
1289 Hence in order to \texttt{set} or \texttt{print} values the adequate 
1290 adaptors must be available in the packages currently loaded. \\
1291
1292
1293 % ==========================================
1294 \hrule
1295 \paragraph{Summary}
1296 %\hrule
1297 \begin{itemize}
1298 \item The \texttt{connect} command allows to connect two black boxes
1299 \item You can connect two black boxes if (and only if) : 
1300 \begin{itemize}
1301 \item The output and the input are of the same type, or
1302 \item There is an adaptor black box in the packages loaded which 
1303 converts data of the output type into data of the input type
1304 \end{itemize}
1305 \item \texttt{help <package name>} does not display the adaptors of the package. To see them use : \texttt{help <package name> all}.
1306 including adaptors
1307 \end{itemize}
1308 \hrule
1309 % ==========================================
1310
1311 % ==========================================
1312 \subsubsection{Creating complex black boxes}
1313 \label{bbi-complex-black-boxes}
1314 % ==========================================
1315
1316 Remember the pipeline of figure 
1317 \ref{bbi-fig-connecting-black-boxes-1}, which 
1318 computed the sum of three doubles.
1319 You can consider it as a whole and define 
1320 a new black box type, which will be a \emph{complex black box}, 
1321 having three inputs and one output, 
1322 as shown in figure \ref{bbi-fig-complex-black-box-1}.
1323
1324 \begin{figure}[!ht]
1325 \caption{\label{bbi-fig-complex-black-box-1} Creating the complex black box \texttt{Add3}}
1326 \begin{center}
1327 \includegraphics[width=0.5\textwidth]{Add3.png}
1328 \end{center}
1329 \end{figure}
1330
1331 The \bbi commands to define this complex black box are 
1332 the following :
1333
1334 \begin{verbatim}
1335 > load std
1336 >
1337 > define Add3
1338 >
1339 > new Add a
1340 > new Add b
1341 > connect a.Out b.In1
1342 >
1343 > author "myself"
1344 > description "adds 3 doubles"
1345 > input x a.In1 "first double to add"
1346 > input y a.In2 "second double to add"
1347 > input z b.In2 "third double to add"
1348 > output result b.Out "output"
1349 >
1350 > endefine
1351 \end{verbatim}
1352
1353 Explainations :
1354
1355 As we will use \texttt{Add} boxes, we need to load the package \texttt{std}, which is done in first line.
1356
1357 The command \texttt{define} then starts the definition 
1358 of the complex box type, which will be called \texttt{Add3}. 
1359
1360 The next three lines define the pipeline, 
1361 exactly in the same way than outside a complex box definition. 
1362
1363 The commands \texttt{author}, \texttt{description}, \texttt{input} 
1364 and \texttt{output} are commands specific to complex boxes definition :
1365
1366 \texttt{author} and \texttt{description} are used for the documentation 
1367 of the new box. You can provide multiple \texttt{author} or 
1368 \texttt{description} commands, the arguments of the commands will 
1369 be concatenated to produce the final author and description strings.
1370
1371 \texttt{input} and \texttt{output} are used to define the inputs and outputs 
1372 of the new complex box. 
1373 Their syntax is the same : for each new input/output you need to say 
1374 to which internal input/output it corresponds and to provide 
1375 a help string documenting the input/output.
1376 In our example, we define that the box \texttt{Add3} has 
1377 three inputs : \texttt{x}, \texttt{y} and \texttt{z}. 
1378 The input \texttt{x} corresponds to the input \texttt{In1} of the 
1379 internal box \texttt{a}. 
1380 In the same way, the external input \texttt{y} 
1381 corresponds to the internal input \texttt{a.In2}, and 
1382 the external input \texttt{In3} to \texttt{b.In2}. 
1383 The only output of the new box is called \texttt{result}
1384 and corresponds to \texttt{b.Out}. 
1385 The figure \ref{bbi-fig-complex-black-box-1} 
1386 illustrates the external to internal 
1387 input/output correspondence.
1388
1389 Finally, the \texttt{endefine} command ends the definition of the 
1390 new box type.
1391
1392 After this definition, if you ask for help 
1393 on packages, you get :
1394 \begin{verbatim}
1395 > help packages
1396 std
1397   Add
1398   ...
1399 user
1400   Add3
1401   workspace
1402 \end{verbatim}
1403
1404 The \texttt{user} package now contains a new black box type, called 
1405 \texttt{Add3}. If you ask for help on this type of box, you get :
1406 \begin{verbatim}
1407 > help Add3
1408 Complex Black Box <user::Add3>
1409  adds 3 doubles
1410  By : myself
1411  * Inputs : 
1412     'x'      <double> : first double to add
1413     'y'      <double> : second double to add
1414     'z'      <double> : third double to add
1415  * Outputs : 
1416     'result' <double> : output
1417  * Boxes : 
1418     'a' <std::Add>
1419     'b' <std::Add>
1420 \end{verbatim}
1421
1422 and you can use it like any other box, for example type :
1423
1424 \begin{verbatim}
1425 > new Add3 a
1426 > set a.x 1
1427 > set a.y 2
1428 > set a.z 3
1429 > print $a.result$
1430 6
1431 \end{verbatim}
1432
1433
1434 As a side note, we can say that, for consistency reasons, it would have been better to name  
1435 \texttt{In1}, \texttt{In2} and \texttt{In3} the inputs of the black box \texttt{Add3}, 
1436 since all the 'natural entry' of a box is named \texttt{In}, or \texttt{In}\emph{x} if there are more than one  'natural
1437 entry'.
1438
1439 % ==========================================
1440 \hrule
1441 \paragraph{Summary}
1442 %\hrule
1443 \begin{itemize}
1444 \item The \texttt{define/endefine} commands allows to define complex black box types, i.e. types of black boxes made up of other black boxes. 
1445 Inside a \texttt{define/endefine} block :
1446 \begin{itemize}
1447 \item The \texttt{author} and \texttt{description} commands allow to document the new type of box
1448 \item The \texttt{input} and \texttt{output} commands allow to define the inputs and outputs of the new type of box, that is to which inputs and outputs 
1449 of internal boxes they correspond.  
1450 \end{itemize}
1451 \end{itemize}
1452 \hrule
1453 % ==========================================
1454
1455 % ==========================================
1456 \subsubsection{Writing scripts}
1457 \label{bbi-writing-scripts}
1458 % ==========================================
1459
1460 Once you have defined a new type of complex box, you 
1461 may like to reuse it. To do this, you can simply 
1462 write the \bbi commands defining the new box 
1463 into a text file and afterwards include that file in \bbins. 
1464 Doing this, you start writing \bbi scripts.
1465 The conventionnal (and mandatory) extension for such scripts is \texttt{bbs} 
1466 (black box script).
1467 For consistency reasons, you are requested to prepend \texttt{bb} to the name.
1468
1469 For example, the \texttt{Add3} complex box we previously worked on 
1470 can be defined in the \texttt{bbAdd3.bbs} file :
1471
1472 \begin{file}{bbAdd3.bbs}
1473 \begin{verbatim}
1474 # Defines the Add3 black box which adds 3 doubles 
1475 load std
1476
1477 define Add3
1478   # I am the author 
1479   author "myself"
1480   description "adds 3 doubles"
1481   # Pipeline creation
1482   new Add a
1483   new Add b
1484   connect a.Out b.In1
1485   # Inputs definition
1486   input x a.In1 "first double to add
1487   input y a.In2 "second double to add
1488   input z b.In2 "third double to add"
1489   # Output definition
1490   output result b.Out "output"
1491 endefine
1492 \end{verbatim}
1493 \end{file}
1494
1495 Lines starting with a \texttt{\#} character or a \texttt{\//\//} character are ignored, they 
1496 are considered as comments by the interpreter.
1497 To use this file in \bbStudions, click on the \texttt{include} button, and browse your filestore to find the file.
1498
1499 \begin{verbatim}
1500 > include bbAdd3.bbs
1501 > help Add3
1502 Complex Black Box <user::Add3>
1503  adds 3 doubles
1504  By : myself
1505  * Inputs : 
1506     'x'      <double> : first double to add
1507     'y'      <double> : second double to add
1508     'z'      <double> : third double to add
1509  * Outputs : 
1510     'result' <double> : output
1511  * Boxes : 
1512     'a' <std::Add>
1513     'b' <std::Add>
1514 >
1515 and so on ...
1516 \end{verbatim}
1517
1518 If the file has the \texttt{bbs} extension, you can ommit it and just type :
1519 \begin{verbatim}
1520 > include Add3
1521 \end{verbatim}
1522
1523 \subsubsection{Creating complex black boxes that use complex black boxes}
1524 \label{bbi-complex-complex-black-boxes}
1525
1526
1527 Of course, you can include script files in other script files, 
1528 like in the following example :
1529
1530 \begin{file}{bbAdd4.bbs}
1531 \begin{verbatim}
1532 # Defines the Add4 black box which adds 4 doubles 
1533 include Add3
1534
1535 define Add4
1536   author "myself"
1537   description "adds 4 doubles"
1538   new Add3 a
1539   new Add b
1540   connect a.Out b.In1
1541   input In1 a.In1 "first double to add
1542   input In2 a.In2 "second double to add
1543   input In3 a.In3 "third double to add"
1544   input In4 b.In2 "fourth double to add"
1545   output Out b.Out "output"
1546 endefine
1547 \end{verbatim}
1548 \end{file}
1549
1550
1551
1552 \subsubsection{Naming Conventions}
1553 \label{bbi-Naming Conventions}
1554
1555
1556 % ==========================================
1557 %\hrule
1558 %\paragraph{Naming Conventions}
1559 %\hrule
1560
1561 %\hrule
1562 % ==========================================
1563 \begin{itemize}
1564 \item
1565 File names : 
1566 For consistency reasons, you are requested to prepend \texttt{bb}, and postpone an extention \texttt{.bbs},
1567 to the names of the files that hold a \texttt{complex black box} definition.
1568
1569 For example, the \texttt{Add3} complex box we previously worked on 
1570 can be defined in the \texttt{bbAdd3.bbs} file.
1571 \item
1572 Search Paths :
1573 For consistency reasons, the names of dynamic libraries holding the packages must start by \texttt{libbb}.
1574 For instance, the package \texttt{wx} will be in the library \texttt{libbbwx.dll} (Windows) or \texttt{libbbwx.so}
1575 (Linux).
1576
1577
1578 \end{itemize}
1579 % ==========================================
1580 \hrule
1581
1582 \paragraph{Summary}
1583 %\hrule
1584 \begin{itemize}
1585 \item The \texttt{include} command tells the interpreter to include a script file.
1586 \item Lines starting with a \texttt{\#} or with a \texttt{\//\//} are considered as comments by the interpreter.
1587 \item Lines between a line starting with a \texttt{\//*} an a line starting with a \texttt{*\//} are considered as comments by the interpreter.
1588 \end{itemize}
1589
1590 \hrule
1591 % ==========================================
1592
1593 % ==========================================
1594 \subsubsection{Creating command line applications}
1595 \label{bbi-command-line-app}
1596 % ==========================================
1597
1598 Now that you know how to create complex black boxes 
1599 (with \texttt{define/endefine}), think 
1600 back to the \texttt{workspace} object. 
1601 Remember that it is also 
1602 a \texttt{complex black box}. 
1603 Actually, when you type interpreter commands 
1604 outside a \texttt{define/endefine} block, 
1605 you progressively define the \texttt{workspace} 
1606 complex black box.
1607 You can think of it like if at start the interpreter
1608 was issuing a command \texttt{'define workspace'} 
1609 and then letting you define the interior of the box 
1610 \texttt{workspace}.
1611
1612 Remember that the command \texttt{inputs} 
1613 allows to define an input of a complex box. 
1614 Now, if you use the command \texttt{input} 
1615 outside a \texttt{define/endefine} block then 
1616 it defines an input of the \texttt{workspace} box, 
1617 that is an input of the \emph{main program}. 
1618 This input will then be connected to the 
1619 parameters that the user passes to the command line.
1620
1621 For example, consider the script : 
1622
1623 \begin{file}{add.bbs}
1624 \begin{verbatim}
1625 load std
1626 new Add a
1627 input x a.In1 "first number to add"
1628 input y a.In2 "second number to add"
1629 print "x+y=$a.Out$"
1630 \end{verbatim}
1631 \end{file}
1632
1633 The third and fourth lines define two inputs \texttt{x} 
1634 and \texttt{y}. When you execute this script, 
1635 you can pass these two arguments on the command line, 
1636 like this :
1637
1638 \begin{verbatim}
1639 > bbi add x=1 y=1
1640 x+y=2
1641 \end{verbatim}
1642
1643 You can also invoke \bbi the option \texttt{-h}, 
1644 which gives help on the \texttt{workspace} box :
1645
1646 \begin{verbatim}
1647 > bbi add -h
1648  User's workspace
1649  By : bbi (internal)
1650  * Inputs : 
1651     'x' <double> : first number to add
1652     'y' <double> : second number to add
1653 \end{verbatim}
1654
1655 To get a better help, use the \texttt{description} 
1656 and \texttt{author} commands :
1657
1658 \begin{file}{add.bbs}
1659 \begin{verbatim}
1660 description "Adds two numbers"
1661 author "foo@bar.com"
1662 load std
1663 new Add a
1664 input x a.In1 "first number to add"
1665 input y a.In2 "second number to add"
1666 print "x+y=$a.Out$"
1667 \end{verbatim}
1668 \end{file}
1669
1670 Now if you ask for help on the \texttt{add} script, you get :
1671
1672 \begin{verbatim}
1673 > bbi add -h
1674  Adds two numbers
1675  By : foo@bar.com
1676  * Inputs : 
1677     'x' <double> : first number to add
1678     'y' <double> : second number to add
1679 \end{verbatim}
1680
1681 Rather than getting the inputs of a script 
1682 from the command line, you can ask \bbi to 
1683 prompt the user for the values, using the \texttt{-t}
1684 commutator :
1685
1686 \begin{verbatim}
1687 > bbi add -t
1688 x=[the program waits for user answer]2
1689 y=[the program waits for user answer]5
1690 x+y=7
1691 \end{verbatim}
1692
1693 \bbStudio is always compiled in graphical mode (with \wx), therefore
1694 you can also use the \texttt{-g} commutator. 
1695 \bbi then prompts the user in graphical mode, 
1696 displaying a dialog box for each input,
1697 like in fig. \ref{bb-input-dialog-box}.
1698
1699 \begin{figure}[!ht]
1700 \caption{\label{bb-input-dialog-box}Input dialog box}
1701 \begin{center}
1702 \includegraphics[width=0.6\textwidth]{enter-the-value-of-x.png}
1703 \end{center}
1704 \end{figure}
1705
1706 % ==========================================
1707 \hrule
1708 \paragraph{Summary}
1709 %\hrule
1710 \begin{itemize}
1711 \item The \texttt{input}, \texttt{description} and \texttt{author} commands,
1712 when they are used outside a \texttt{define/endefine} block allow 
1713 to define the inputs, description and author of the main program.
1714 \item Inputs of the main program can be passed on the command line 
1715 using the syntax \texttt{<input-name>=<value>}. 
1716 No white space is allowed, if the value or the input name 
1717 contains white spaces, enclose them 
1718 between double quotes, e.g. \texttt{"parameter with white spaces = gnu's not unix"}.
1719 \item The \texttt{-h} option of \bbi prints help on the main program.
1720 \item The \texttt{-t} option of \bbi orders the program to prompt for its inputs in text mode.
1721 \item The \texttt{-g} option of \bbi orders the program to prompt for its inputs in graphical mode.
1722 \end{itemize}
1723 \hrule
1724 % ==========================================
1725
1726 % ==========================================
1727 \subsubsection{Using graphical interface boxes (widget boxes)}
1728 \label{bbi-widget}
1729 % ==========================================
1730
1731 % ==========================================
1732 \subsubsection{Overwiew}
1733 \label{bbi-overview}
1734 % ==========================================
1735
1736 \bbStudio is always compiled in graphical mode 
1737 (option \texttt{BUILD\_bbi\_GRAPHICAL} of \cmakens, requires \wxns),
1738 then you can use special black boxes which are 
1739 graphical interface components (widgets). 
1740 Basic components are provided in the package \texttt{wx}, 
1741 such as buttons, sliders, file open/save dialogs, etc.
1742
1743 As first example, type the following commands in \bbi :
1744 \begin{verbatim}
1745 > load wx 
1746 > new InputText t
1747 > print $t.Out$\n
1748 \end{verbatim}
1749
1750 When you type \texttt{enter} after the last line, 
1751 a window pops up in which you can entrer a text.
1752 When you close the window, the text you entered is printed by 
1753 the \texttt{print} command.
1754
1755 Type \texttt{help wx}, you get something like :
1756 \begin{verbatim}
1757  Package wx v1.0.0- info-dev@creatis.insa-lyon.fr
1758  Basic graphical interface elements (sliders, buttons ...) based on wxWidgets
1759  Black boxes : 
1760    ColourSelector        : Colour Selector dialog (bbfication of wxColourSele...
1761    ColourSelectorButton  : A button which displays a colour picker dialog whe...
1762    CommandButton         : Button which executes bbi commands
1763    DirectorySelector     : Pops up a directory selection dialog (wxDirDialog)
1764    FileSelector          : Pops up a file selection dialog for reading or sav...
1765    InputText             : A zone in which the user can enter a text (wxTextC...
1766    LayoutLine            : LayoutLine widget (wxBoxSizer)
1767    LayoutSplit           : Widget which splits a window in two fixed size par...
1768    LayoutTab             : LayoutTab widget (wxNotebook)
1769    OutputText            : Text zone to be inserted into a window (wxStaticTe...
1770    RadioButton           : RadioButton group widget 0-9 entries
1771    Slider                : Slider widget (wxSlider)
1772 \end{verbatim}
1773
1774 You can reproduce the same experiment as above using a 
1775 \texttt{Slider} or a \texttt{FileDialog} rather than a \texttt{InputText}.
1776 See the files \texttt{test*.bbs} in the \texttt{scripts/test} directory.
1777
1778
1779 %There are two kinds of widgets : ``terminal'' widgets and ``container'' widgets.
1780 %The \texttt{InputText}, \texttt{FileDialog} or \texttt{Slider} widgets 
1781 %are ``terminal'' widgets. 
1782 %``container'' widgets are of another kind : they are 
1783 There is a special kind of widget, called '\texttt{Layout}', designed to  
1784 contain other widgets in order to build larger dialog boxes. 
1785 For example, the \texttt{LayoutSplit} widget is a container which 
1786 ``splits'' horizontally a window into two parts, 
1787 each part including another widget. 
1788 The size of the two parts can be adjusted by the user thanks 
1789 to a ``handle''.
1790
1791 The script \texttt{scripts/test/testSplit.bbs} demonstrate its use. 
1792 Run it : it displays a window with two sliders. 
1793 Move the sliders and close the window. 
1794 The final positions of the sliders are printed out. 
1795 Now edit the file to see how this is done :
1796
1797 \begin{file}{scripts/test/testSplit.bbs}
1798 \begin{verbatim}
1799 load std
1800 load wx
1801
1802 new Slider s1
1803 new Slider s2
1804
1805 new LayoutSplit s
1806 connect  s1.Widget s.Widget1
1807 connect  s2.Widget s.Widget2
1808
1809 print s1=$s1.Out$\\n
1810 print s2=$s2.Out$\\n
1811 \end{verbatim}
1812 \end{file}
1813
1814 First, the two sliders \texttt{s1} and \texttt{s2} are created.
1815 A \texttt{LayoutSplit} box \texttt{s} is also created. 
1816 The \texttt{connect} commands then ``includes'' the sliders in the 
1817 split ``container''. 
1818 The input \texttt{Widget} is common to all widget boxes : 
1819 every widget can be inserted into another widget. 
1820 The outputs \texttt{Widget1},\texttt{Widget2}  are specific of \emph{container} 
1821 widgets 
1822 (in \bbi type \texttt{help Slider} : 
1823 you will see the output \texttt{Widget}; 
1824 type \texttt{help LayoutSplit} : 
1825 you will see the inputs \texttt{Widget1} and \texttt{Widget2} 
1826 and the output \texttt{Widget}). 
1827 When you connect the \texttt{Widget} output of a container 
1828 to the \texttt{Widget}i input of a widget, 
1829 you order to include the widget in the container.
1830 Of course, the order of connection is important. 
1831 In our case, the slider \texttt{s1} is included first, 
1832 then the slider \texttt{s2} : \texttt{s1} will be placed 
1833 on top of \texttt{s2} (the \texttt{LayoutSplit} box is 
1834 implemented that way, but this is arbitrary choice).
1835
1836 Right now, there are only \emph{three} container widgets in the \texttt{wx} package : 
1837 \begin{itemize} 
1838 \item {the \texttt{LayoutSplit} widget} we just described, the \texttt{LayoutLine} , and the \texttt{LayoutTab}
1839 widget. 
1840
1841 \item {the \texttt{LayoutLine} widget} can have multiple children and 
1842 divides its window into as much parts as children, 
1843 each part of equal size. 
1844 The orientation of the \texttt{LayoutSplit} or of the \texttt{LayoutLine}  can be changed by the input \texttt{Orientation}.
1845 See the example \texttt{test/testSizer.bbs}.
1846 With only those two containers you can already create 
1847 complex dialog boxes (of course containers can be nested, which leads to tree-like structures of widgets). \\
1848 See the script \texttt{bbtk/share/bbtk/bbs/wx/appli/ExampleLayoutSplit.bbs} for an example.
1849
1850 \item {The \texttt{LayoutTab}  widget} is based on the \texttt{wxNotebook.}\\
1851 The label of each 'note book' is the name of the object it contains.
1852 \end{itemize}
1853
1854
1855 %=====> TODO \\
1856
1857
1858 %One word about a special widget in the package \texttt{wx} : 
1859 %the \texttt{Button}... to be continued.
1860
1861 % ==========================================
1862 \subsubsection{Deeper in the boxes}
1863 \label{bbi-deep-box}
1864 % ==========================================
1865
1866 Any widget box has two mandatory Inputs :
1867 \begin{itemize}
1868   \item {\bf\emph{BoxExecute}}     : Any signal received by this input executes the box
1869   \item {\bf\emph{BoxProcessMode}} : Sets the processing mode of the box :
1870   \begin{itemize}
1871     \item {\bf\emph{Pipeline}} : bbBackwardUpdate() calls Process() only if Status == MODIFIED \\
1872                                  The box executes itself only when an entry was changed (normal pipeline processing).
1873     \item {\bf\emph{Reactive}} : bbSetModifiedStatus() calls bbUpdate() \\
1874                                  Warning : Re-processed immediately when \emph{any entry} changed.\\
1875                                  To be more selective, better use \texttt{connect A.BoxChange \emph{currentBox}.BoxExecute}.    
1876     \item {\bf\emph{Always}}   : bbUpdate() always calls Process. \\
1877                                  Usefull for 'sources', that must be processed, even when no entry changed (e.g. : FileSelector, ColorSelector)\\
1878                                  This one is not end user intended (for Package developer only)
1879   \end{itemize}   
1880 \end{itemize}
1881
1882 Any widget box has five Inputs, that will be dealt with only if the box is not connected to the \emph{Widget}i of any \emph{Layout box} :  
1883 \begin{itemize}
1884   \item {\bf\emph{WinHeight}} : Height of the window 
1885   \item {\bf\emph{WinWidth}}  : Width of the window  
1886   \item {\bf\emph{WinTitle}}  : Title of the window
1887   \item {\bf\emph{WinClose}}  : Any received signal closes the window
1888   \item {\bf\emph{WinHide}}   : Any received signal hides the window
1889   \item {\bf\emph{WinDialog}} : When set to 'true', creates a \emph{dialog window}, that blocks the pipeline until it is closed (\emph{modal})   
1890 \end{itemize}
1891
1892
1893 Any \emph{Layout box} (i.e. \emph{LayoutLine}, \emph{LayoutSplit} or \emph{LayoutTab}) has at one or more mandatory Inputs :
1894 \begin{itemize}
1895   \item {\bf\emph{Widget}}\texttt{i} : e.g. a \emph{LayoutSplit} box (Widget which splits a window in two resizeable parts) 
1896        has two Input parameters \emph{Widget1} and \emph{Widget2}, used to embed the child windows.\\
1897        e.g. a  \emph{LayoutLine} divides the window in up to 9 (depending on the number of inputs \emph{Widget}i) fixed size parts.  
1898 \end{itemize} 
1899
1900
1901 Any widget box has two mandatory Outputs  :
1902
1903 \begin{itemize}
1904   \item {\bf\emph{Widget}} : that is the \texttt{wxWindow} itself. If it's not connected to the \texttt{Widget}\emph{i} of any \emph{Layout box}, it
1905      will popup. If it's connected to the \texttt{Widget}\texttt{\emph{i}} of any \texttt{Layout box}, it will be embedded in its parent window.
1906   \item {\bf\emph{Boxchange}}  : Signals any modification of the box. This output may be connect if necessary to the \emph{BoxExecute} entry of an other box,
1907    further within the execution pipeline.
1908 \end{itemize}    
1909
1910
1911
1912 % ==========================================
1913 \subsection{More on ...}
1914 \label{bbi-more-on}
1915 % ==========================================
1916
1917 % ==========================================
1918 %\subsubsection{Black box packages}
1919 %\label{bbi-more-on-packages}
1920 % ==========================================
1921 %There are various others user-intended packages :
1922
1923 %\begin{verbatim}
1924 %---> Were moved in a 'Reference Manual' ?\\
1925 %---> Any suggestion welcome!
1926 %\end{verbatim}
1927
1928 %\begin{itemize}
1929 %\item{vtk} \\
1930 %\item{itk} \\
1931 %\item{...} \\
1932 %\end{itemize}
1933 % ==========================================
1934 \subsubsection{Pipeline processing}
1935 \label{bbi-more-on-pipeline-processing}
1936 % ==========================================
1937 \begin{itemize}
1938 \item the ``control'' mechanism in bbi.
1939
1940 When a box is requested to update itself, it asks (recursively) each one of its inputs if it was modified.\\
1941 In normal pipe-line mode, it will be re-processed if at least one of its imputs was actually modified, as the output of a previous box.
1942
1943 (switch exec commands, e.g. Button)
1944 \item the role of ProcessMode to update widgets.
1945 \end{itemize}
1946 % ==========================================
1947 \subsubsection{Complex black boxes}
1948 \label{bbi-more-on-complex-black-boxes}
1949 Creation of complex widgets (containers, contained...)
1950
1951 You can include script files in other script files, 
1952 like in the following example :
1953
1954
1955 \begin{verbatim}
1956 # Defines the Add4 black box which adds 4 doubles 
1957 include Add3
1958 define Add4
1959   author "myself"
1960   description "adds 4 doubles"
1961   new Add3 a
1962   new Add b
1963   connect a.Out b.In1
1964   input In1 a.In1 "first double to add"
1965   input In2 a.In2 "second double to add"
1966   input In3 a.In3 "third double to add"
1967   input In4 b.In2 "fourth double to add"
1968   output Out b.Out "output"
1969 endefine
1970 \end{verbatim}
1971
1972 The inner boxes have they own entries (In1, In2, In3 for box a, In1, In2 for box b )\\
1973 Only the inputs In1, In2, In3 of box a and the input In2 of box b is of interest for the end user, but he dosn't want to have to
1974 care neither about the inner boxes name, nor about the names of their Inputs.\\
1975 The writer of the complex box has the ability to give these inputs a meaningfull name !
1976 \begin{verbatim}
1977   input In3 a.In3 "third double to add"
1978   input In4 b.In2 "fourth double to add"
1979 \end{verbatim}
1980
1981 %\subsubsection{Advanced issues}
1982 %\paragraph{Reducing the number of inputs of a box}
1983
1984 % ==========================================
1985 %\subsubsection{Errors}
1986 %\label{bbi-more-on-errors}
1987
1988 % ==========================================
1989 \subsubsection{Creating and using your own uninstalled version of bbStudio}
1990 \label{bbi-more-on-your_own_version}
1991
1992 Suppose you want to run your own uninstalled version (say : you downloaded and compiled the
1993 cvs version in order to use a recently commited patch, but you want to be able
1994 to still use the standard version).
1995  
1996 You have to :
1997 \begin{itemize} 
1998 \item cvs checkout the sources :
1999 \begin{verbatim}
2000 cvs checkout bbtk
2001 \end{verbatim}
2002 \item 
2003 create a build directory
2004 \begin{verbatim}
2005 mkdir buildBBTK
2006 \end{verbatim}
2007 \item cd in the build directory:
2008 \begin{verbatim}
2009 cd buildBBTK
2010 \end{verbatim}
2011 \item run ccmake.
2012 \begin{verbatim}
2013 ccmake ../bbtk
2014 \end{verbatim}
2015
2016 Don't forget to switch ON the flag \texttt{BBTK\_COMPILE\_DEBUG\_MESSAGE} \\
2017 (see figure : \ref{bb-ccmake})
2018
2019 \begin{figure}[!ht]
2020 \caption{\label{bb-ccmake}Running ccmake}
2021 \begin{center}
2022 \includegraphics[width=0.6\textwidth]{ccmake.png}
2023 \end{center}
2024 \end{figure}
2025
2026 \item As usual, type \texttt{c} until there is no longer any area quoted with a * (or highlighted in red)\\
2027 Ask for generation (type \texttt{g} -once is always enough-)
2028
2029 \item Ask for compilation and link.
2030 \begin{verbatim}
2031 make
2032 \end{verbatim}
2033
2034
2035 The dynamic libraries (\texttt{.dll} or \texttt{.so} and the executable programs will be created in the \texttt{bin}
2036 directory of the built tree.
2037
2038 \item choose to install or not your own version.
2039 \begin{verbatim}
2040 make install
2041 \end{verbatim}
2042 Linux users : Don't forget to \texttt{sudo} before.
2043 \end{itemize}
2044 % ==========================================
2045 \subsubsection{\bbtk configuration file and search paths}
2046 \label{bbi-more-on-configuration}
2047
2048 At start, \bbi tries to open an \texttt{xml} 
2049 configuration file named \texttt{bbtk\_config.xml}. 
2050 The search order is 
2051 \begin{enumerate}
2052 \item The current directory
2053 \item The subdir \texttt{.bbtk} of the user's home directory. 
2054 \begin{itemize} 
2055 \item On \texttt{Unix}, the home directory is the
2056 one stored by the environnement variable \texttt{HOME}, 
2057 typically \texttt{/home/username}.
2058 \item On \texttt{Windows}, the home directory is 
2059 the user's profile directory stored by the environnement 
2060 variable \texttt{USERPROFILE}, 
2061 typically \texttt{C:\\...}.
2062 \end{itemize}
2063 \item If none of these two paths contains the file then it creates 
2064 a new one in the \texttt{.bbtk} directory. 
2065 \end{enumerate}
2066
2067 Once created, you can edit the \texttt{bbtk\_config.xml} file located 
2068 in your \texttt{.bbtk} directory. It contains :
2069
2070 \begin{file}{bbtk\_config.xml}
2071 \begin{verbatim}
2072 <?xml version="1.0" encoding="iso-8859-1"?>
2073 <config>
2074    <description>  </description>
2075    <bbs_path>     </bbs_path>
2076    <package_path> 
2077       /usr/local/lib
2078    </package_path>
2079    <data_path> </data_path>
2080    <default_temp_dir>$</default_temp_dir>
2081 </config>
2082 \end{verbatim}
2083 \end{file}
2084
2085 You can add pathes to 
2086 \begin{itemize}
2087 \item A custom folder in which to search for \texttt{.bbs} scripts (\texttt{include} command of \bbi) by adding an \texttt{xml} tag : 
2088 \texttt{<bbs\_path>complete\_path\_to\_folder<\/bbs\_path>}.
2089 \item A custom folder in which to search for packages (\texttt{load} command of \bbi) by adding an \texttt{xml} tag : 
2090 \texttt{<package\_path>complete\_path\_to\_folder<\/package\_path>}.
2091 \end{itemize}
2092
2093
2094 \newpage
2095
2096 % ==========================================
2097 \subsection{Language reference}
2098 \label{bbi-reference}
2099 % ==========================================
2100
2101
2102 % ==========================================
2103 \subsubsection{Pipeline creation and execution related commands}
2104 \label{bbi-reference-creation-execution}
2105 % ==========================================
2106  See table \ref{bbi-reference-box}
2107
2108 % ==========================================
2109 \begin{table}[!ht]
2110 \caption{\label{bbi-reference-box} \bbi pipeline creation and execution related commands.}
2111 \small
2112 \begin{tabular}{|lcm{6cm}|}
2113 \hline
2114 Command & Parameters & Effect \\ \hline
2115
2116 \texttt{new} & \texttt{<boxtype>} \texttt{<box-name>}& 
2117 Creates a box of type \texttt{boxtype} and name  
2118 \texttt{box-name}.\\ \hline
2119
2120 \texttt{delete} & \texttt{<box-name>} & 
2121 Destroys the box named \texttt{box-name}.\\ \hline 
2122
2123 \texttt{connect} & \texttt{<box1.output>} \texttt{<box2.input>} & 
2124 Connects the output 
2125 \texttt{output} of the box named \texttt{box1} 
2126 to the input \texttt{input} of the box named \texttt{box2} \\ \hline 
2127
2128 \texttt{set} & \texttt{<box.input>} \texttt{<value>} &
2129 Sets the input \texttt{input} of 
2130 the box named \texttt{box} to the value \texttt{value}.
2131 An \texttt{adaptor} must exist
2132 in the packages loaded which converts a \texttt{std::string} 
2133 to the type of the input \texttt{input}. \\ \hline 
2134
2135 \texttt{print} & \texttt{<string>} & 
2136 Prints the string after substituting each token of the form \texttt{\$box.output\$} by the adaptation to string of the value of the 
2137 output \texttt{output} of the box named \texttt{box}. 
2138 An \texttt{adaptor} must exist
2139 in the packages loaded which converts 
2140 the type of the output \texttt{output}
2141 to a \texttt{std::string}.
2142 \\ \hline 
2143
2144 \texttt{exec} & \texttt{<box-name>} & 
2145 Executes the box named \texttt{box-name}.
2146 If needed the boxes 
2147 connected to its inputs 
2148 are also processed recursively (pipeline processing).\\ \hline 
2149 \texttt{exec} & \texttt{freeze} & 
2150  Allows to block execution commands while keeping definition commands active.(This one is not for end user)\\ \hline 
2151 \texttt{exec} & \texttt{unfreeze} & 
2152  Turns back to 'normal' mode (This one is not for end user).\\ \hline 
2153 \end{tabular}
2154 \end{table}
2155 % ==========================================
2156
2157 \newpage
2158
2159 % ==========================================
2160 \subsubsection{Interpreter related commands}
2161 \label{bbi-reference-interpreter}
2162 % ==========================================
2163 See table \ref{tabbbi-reference-interpreter_1} and \ref{tabbbi-reference-interpreter_2}
2164 % ==========================================
2165 \begin{table}[!ht]
2166 \caption{\label{tabbbi-reference-interpreter_1}\bbi intepreter related commands (part 1).}
2167 \small
2168 \begin{tabular}{|lcm{6cm}|}
2169 \hline
2170 Command & Parameters & Effect \\ \hline
2171
2172 \texttt{author} &  \texttt{<author-name>} & 
2173 Adds the string \texttt{<author-name>} to the author information of the black box being defined \\ \hline 
2174
2175 \texttt{category} & \texttt{<category-name>} & 
2176   Adds the string \texttt{<category-name>} to the category information of the black box being defined \\ \hline 
2177
2178 \texttt{help} & - & 
2179 Prints help on available commands \\ \hline 
2180
2181 & \texttt{<command-name>} & 
2182 Prints help on the command \texttt{command-name} \\ \hline 
2183
2184 & \texttt{packages} & 
2185 Prints help on available packages and their box types 
2186 (without description)\\ \hline 
2187
2188 & \texttt{<package-name>} & 
2189 Prints help on the package \texttt{package-name} and its boxes 
2190 (with brief description). 
2191 The package must have been previously loaded \\ \hline 
2192
2193 & \texttt{<box-type>} & 
2194 Prints help (with full description) on the type of box 
2195 \texttt{box-type}. 
2196 The box type must belong to a package which has been previously loaded \\ \hline 
2197
2198 & \texttt{<debug-directive>} & 
2199 [expr|-C|-D] 
2200   Prints debug info on living bbtk objects containing the string \texttt{expr} (default expr=''). 
2201          \texttt{-C} checks the factory integrity.
2202          \texttt{-D} turns on objects debug info after main ends\\ \hline 
2203
2204 \texttt{include} & \texttt{<file-name>} & 
2205 Includes and executes the content of the file named \texttt{file-name} 
2206 exactly like if you were typing its content at the place were the 
2207 \texttt{include} command is. \\ \hline 
2208
2209 \texttt{load} & \texttt{<package-name>} & 
2210 Loads the package \texttt{package-name} (use it only if you know that you won't work with complex black boxes) \\ \hline 
2211
2212 \texttt{include} & \texttt{<package-name>} & 
2213 Loads the package \texttt{package-name} and includes all the complex black boxes that comes with it \\ \hline 
2214
2215 \texttt{kind} & \texttt{<box kind>} & 
2216 Specifies the \texttt{kind} of the complex black boxes you are describing \\ \hline 
2217 \end{tabular}
2218 \end{table}
2219
2220 %
2221 % This arbitrary part1/part2 is to avoid to have all the tables at the end of the docoment ...
2222 %
2223
2224 \begin{table}[!ht]
2225 \caption{\label{tabbbi-reference-interpreter_2}\bbi intepreter related commands (part 2).}
2226 \small
2227 \begin{tabular}{|lcm{6cm}|}
2228 \hline
2229 Command & Parameters & Effect \\ \hline
2230 \texttt{unload} & \texttt{<package-name>}& 
2231 Unloads the package \texttt{package-name}. 
2232 The package must have been previously loaded. 
2233 No box of a type defined in this package must still exist.\\ \hline 
2234
2235 \texttt{message} & \texttt{<category>} \texttt{<level>} & 
2236 Sets the level of verbosity of \bbi for the category of messages 
2237 \texttt{category} to \texttt{level}.\\ \hline 
2238 %See \ref{verbosity}.
2239
2240 \texttt{config} & - & Displays the Configuration parameters\\ \hline 
2241
2242 \texttt{reset} & - & Deletes all boxes and unloads all packages so 
2243 that \bbi gets back to its initial state \\ \hline 
2244
2245 \texttt{quit} & - & Exits the interpreter (Don't use it under \bbStudions)\\ \hline 
2246
2247 \end{tabular}
2248 \end{table}
2249 % ==========================================
2250
2251 \newpage
2252
2253 % ==========================================
2254 \subsubsection{Complex black box definition related commands}
2255 \label{bbi-reference-black-box-definition}
2256 % ==========================================
2257
2258 See table \ref{bbi-reference-complex-box} 
2259 % ==========================================
2260 \begin{table}[!ht]
2261 \caption{\label{bbi-reference-complex-box} \bbi complex black box definition related commands.}
2262 \small
2263 \begin{tabular}{|lcm{6cm}|}
2264 \hline
2265 Command & Parameters & Effect \\ \hline
2266
2267
2268 \texttt{define} & \texttt{<box-type>} & 
2269 Starts the definition of a complex black box of type  
2270 \texttt{box-type}\\ \hline 
2271
2272 \texttt{endefine} & - & 
2273 Ends the definition of a complex black box type\\ \hline 
2274
2275 \texttt{author} & \texttt{<string>} & 
2276 Sets the author(s) of the complex black box currently being defined \\ \hline 
2277
2278 \texttt{description} & \texttt{<string>} & 
2279 Sets the description of the complex black box currently being defined \\ \hline 
2280
2281 \texttt{input} & \texttt{<name>} \texttt{<box.input>} \texttt{<help>} & 
2282 Defines a new input for the current complex black box, 
2283 named \texttt{name}. 
2284 It is defined as corresponding to 
2285 the input \texttt{input} of the box \texttt{box}.
2286  
2287 \texttt{<help>} is the help string for the new input.
2288 The box \texttt{box} must already have been created in the complex box 
2289 and of course have an input named \texttt{input}.\\ \hline 
2290
2291 \texttt{output} & \texttt{<name>} \texttt{<box.output>} \texttt{<help>} & 
2292 Defines a new output for the current complex black box, 
2293 named \texttt{name}. 
2294 It is defined as corresponding to 
2295 the output \texttt{output} of the box \texttt{box}. 
2296 \texttt{<help>} is the help string for the new output.
2297 The box \texttt{box} must already have been created in the complex box and of course have an output named \texttt{output}. \\ \hline 
2298
2299
2300 \end{tabular}
2301 \end{table}
2302 % ==========================================
2303
2304 \newpage
2305
2306 % ==========================================
2307 %\vspace{0.5cm}\hrule \\
2308
2309
2310
2311 % ==========================================
2312 %\vspace{0.5cm}\hrule \\
2313
2314 \section{Using third party Package}
2315 \label{Third_Party_Package}
2316 % ==========================================
2317
2318 % ==========================================
2319 \subsection{The configuration file}
2320 \label{The_configuration_file}
2321 % ==========================================
2322
2323 First, have a glance at the Configuration,  just clicking on \texttt{Config} button of the \texttt{Command} part toolbar.
2324
2325 You'll get something like :
2326
2327 \begin{verbatim}
2328 =============
2329  Configuration
2330  =============
2331  bbtk_config.xml    : [/home/jpr/Creatis/bbtk/binLIN/bin/bbtk_config.xml]
2332  Documentation Path : [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/doc]
2333  Data Path          : [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/data]
2334  Temp Directory     : [/home/jpr/Creatis/bbtk/binLIN]
2335  File Separator     : [/]
2336  BBS Paths   
2337  --- [.]
2338  --- [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/bbs]
2339  --- [/home/jpr/Creatis/bbtk/binLIN/share/bbtk/bbs]
2340  PACKAGE Paths : 
2341  --- [.]
2342  --- [/home/jpr/Creatis/bbtk/binLIN/bin]
2343  --- [/home/jpr/Creatis/bbtk/binLIN/bin/../lib]
2344  --- [/home/jpr/Creatis/bbtk/binLIN/bin]
2345  --- [/home/jpr/Creatis/bbtk/binLIN/bin\Debug]
2346  --- [/home/jpr/Creatis/bbtk/binLIN/bin\Release] 
2347 \end{verbatim}
2348
2349 (depending on who you are, and whether \texttt{bbStudio} is installed or not.)\\
2350
2351 Note the two main parts : \texttt{BBS Paths} and \texttt{PACKAGE Paths}
2352
2353 To use a third party Package, you will have to update the \emph{bbtk\_config.xml} file.\\
2354
2355 Just use the \texttt{Open bbtk Config file} option of the \texttt{Files} of the \bbStudio menu.
2356
2357 You will get something like :
2358 \begin{verbatim}
2359 <config>
2360   <description> Sets the search directories in the build tree </description>
2361   <url> </url>
2362   <bbs_path> /home/jpr/Creatis/bbtk/binLIN/share/bbtk/bbs </bbs_path>
2363   <package_path> /home/jpr/Creatis/bbtk/binLIN/bin </package_path> 
2364 # For windows
2365   <package_path> /home/jpr/Creatis/bbtk/binLIN/bin\Debug </package_path> 
2366   <package_path> /home/jpr/Creatis/bbtk/binLIN/bin\Release </package_path> 
2367 #
2368   <data_path> </data_path>
2369
2370   <default_temp_dir>  /home/jpr/Creatis/bbtk/binLIN </default_temp_dir>   
2371 </config>
2372 \end{verbatim}
2373
2374 %\begin{itemize}
2375 %\item {
2376 After the already existing tags 
2377 %bbs\_path
2378 \texttt{bbs\_path}
2379  (i.e. the lines begining by 
2380  \texttt{bbs\_path} 
2381  %bbs_path
2382 and ending by 
2383 \texttt{/bbs\_path})
2384
2385 %/bbs_path})
2386  add a new one with the name of the directory that contains the 
2387  \texttt{.bbs} scripts of the package you
2388 want to use.\\
2389 x
2390 %\item {
2391 After the already existing tags \texttt{package\_path} (i.e. the lines begining by \texttt{package\_path}
2392  and ending by \texttt{/package\_path})
2393  add a new one with the name of the directory that contains the the dynamic libraries
2394  (\texttt{.dll} or \texttt{.so}) of the package you want to use.
2395
2396 %\end{itemize}
2397 % ==========================================
2398 \subsection{Updating the documentation}
2399 \label{Updating_the_documentation}
2400 % ==========================================
2401 If you want (and sure you will) to be able to use the Help tools as well as the features provided by this package,
2402  you must use the
2403 option \texttt{Regenerate package doc}  in the menu \texttt{Tools} of \texttt{bbStudio}.\\
2404 You'll be prompted for the Package name. Avoid using the \texttt{-a} option (Regenerate all), since it's time consumming.
2405
2406 If you want (and sure you will) to benefit the features of Box indexing
2407  you must use the
2408 option \texttt{Regenerate Boxes Lists}  in the menu \texttt{Tools} of \texttt{bbStudio}.\\
2409
2410
2411 % ==========================================
2412 \subsection{Using the package}
2413 \label{Using_the_package}
2414 % ==========================================
2415
2416 The only thing you have to do is to \texttt{load} the package, within the script, or from the
2417 \texttt{Command} part, and enjoy the black boxes it contains.
2418   
2419 % ==========================================
2420 %\vspace{0.5cm}\hrule \\
2421 \section{Using black boxes in \CPP programs}
2422 \label{cpp}
2423 % ==========================================
2424
2425 A very useful feature is that you may use any black box within a \CPP program without worrying about \texttt{wxWigets} main window.\\
2426
2427 Let's look a the following bbs script :
2428
2429 \begin{verbatim}
2430 # Load the packages
2431 load std
2432 load wx
2433
2434 # Create the Objects
2435 new Slider     slider
2436 new OutputText text
2437 new LayoutLine layout
2438
2439 # Graphical pipeline
2440 connect slider.Widget    layout.Widget1
2441 connect text.Widget      layout.Widget2
2442
2443 # Execution pipeline
2444 connect slider.BoxChange text.BoxExecute
2445 connect slider.Out       text.In
2446
2447 # Go!
2448 exec layout
2449 \end{verbatim}
2450
2451 User wants to create a slider and an output text, within a LayoutLine, and display the slider value in the output text.\\ 
2452 Think about the (little!) nightmare to code the same, in 'raw C++', using wxWidgets.\\
2453
2454 Using the standalone application \text{bbc} you just 'convert' the script.
2455
2456 \begin{verbatim}
2457
2458 #include <bbwxSlider.h>
2459 #include <bbwxOutputText.h>
2460 #include <bbtkFactory.h>
2461 #include <bbwxLayoutLine.h>
2462
2463 int main(int argv, char* argc[])
2464 {
2465       // we need to intanciate a bbtk::Factory to be aware of the adaptors
2466       bbtk::Factory::Pointer factory = bbtk::Factory::New();
2467       
2468       // Load the packages
2469       // ----------------  
2470       factory->LoadPackage("std");
2471       factory->LoadPackage("wx");
2472       
2473       // Create the Objects
2474       // ------------------      
2475       bbwx::Slider::Pointer     slider   = bbwx::Slider::New("slider");
2476       bbwx::OutputText::Pointer text     = bbwx::OutputText::New("text");
2477       bbwx::LayoutLine::Pointer layout   = bbwx::LayoutLine::New("layout");
2478       
2479       // Graphical pipeline
2480       bbtk::Connection::Pointer c1       = bbtk::Connection::New(slider,"Widget",
2481                                                            layout,"Widget1");
2482                                                            
2483       bbtk::Connection::Pointer c2       = bbtk::Connection::New(text,"Widget",
2484                                                            layout,"Widget2");
2485                                                                                                                                                                            
2486       // Execution pipeline
2487       // ------------------
2488       
2489       // We have to pass the 'factory', in order to call automatically an adaptor,
2490       // if necessary.
2491       bbtk::Connection::Pointer s2t      = bbtk::Connection::New(slider,"Out",
2492                                                             text,"In",
2493                                                             factory);      
2494        bbtk::Connection::Pointer c3       = bbtk::Connection::New(slider,"BoxChange",
2495                                                             text,"BoxExecute");      
2496       layout->bbSetInputWinDialog(true);
2497       
2498       // Go!
2499       // ---     
2500       layout->bbExecute();
2501
2502     }
2503   catch (bbtk::Exception e)
2504     {
2505       bbtk::MessageManager::SetMessageLevel("Error",1);
2506       e.Print();
2507     }
2508 }
2509 \end{verbatim}
2510
2511 %\bibliography{all}
2512
2513 \section{Install and run time issues}
2514
2515 \begin {itemize}
2516 \item{make} \\
2517 For some strange reasons (?!?), you may be warned that an error occured while documentation generation.\\
2518 Take it easy, \texttt{make} again!\\
2519
2520 \item{\bbStudio} is written using the Advanced User Interface library of wxWidgets.
2521 If, after some hazardous floating/docking operations onto the frame, you feel
2522 very unhappy with the result, just remove from the hidden directory
2523 \texttt{.bbtk} the file named \texttt{bbStudio.aui}. \\ 
2524
2525
2526 \item{ \texttt{WARNING}} : if the script contains one or more \texttt{LayoutSplit}
2527  object, you will have to resize the subwindows. \\ 
2528  
2529 \end {itemize}
2530
2531 %\section{Conclusion}
2532
2533
2534 \end{document}
2535