tbx_build_pal_loader created according to SEP #120
[scilab.git] / scilab / modules / modules_manager / help / en_US / tbx_build_pal_loader.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) - DIGITEO 
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
11  *
12  -->
13 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="tbx_build_pal_loader" xml:lang="en">
14     <refnamediv>
15         <refname>tbx_build_pal_loader</refname>
16         <refpurpose>Generate a loader_pal.sce script for loading Xcos palette module(toolbox compilation process)</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>
21             tbx_build_pal_loader(palette_name, block_names , module_path [, script_path])
22         </synopsis>
23     </refsynopsisdiv>
24     <refsection>
25         <title>Arguments</title>
26         <variablelist>
27             <varlistentry>
28                 <term>palette_name</term>
29                 <listitem>
30                     <para>a character string, the name of the palette.</para>
31                 </listitem>
32             </varlistentry>
33             <varlistentry>
34                 <term>block_names</term>
35                 <listitem>
36                     <para>Block interface function list (in a string vector) ; all name should have a corresponding interface function macro (on the macros subdirectory).</para>
37                 </listitem>
38             </varlistentry>
39             <varlistentry>
40                 <term>module_path</term>
41                 <listitem>
42                     <para>a character string, the path of the directory containing the module.</para>
43                 </listitem>
44             </varlistentry>
45             <varlistentry>
46                 <term>script_path</term>
47                 <listitem>
48                     <para>an optional character string that can be used
49                         to specify the location of the created
50                         loader_pal.sce script file. If not given the script
51                         file will be created in the module_path+"/macros"
52                         directory.
53                     </para>
54                     <para>Generaly the loader_pal.sce script file is
55                         created in the directory which contains the block
56                         interface functions files. The script_path argument
57                         can be used to handle modules that define several
58                         palettes.
59                     </para>
60                 </listitem>
61             </varlistentry>
62         </variablelist>
63     </refsection>
64     
65     <refsection>
66         <title>Examples</title>
67         <programlisting role="example"><![CDATA[ 
68 //The recommended buildmacros.sce file
69 function buildMacrosAndBlocks()
70   script_path = get_absolute_file_path("buildmacros.sce");
71   module_path = part(script_path,1:length(script_path)-length("macros"))
72   
73   tbx_build_macros(NAME,  script_path);
74   interface_functions = //to be defined
75   
76   tbx_build_blocks(module_path, interface_functions);
77   tbx_build_pal_loader(TITLE,interface_functions,module_path,script_path)
78 endfunction
79 buildMacrosAndBlocks()
80 clear buildMacrosAndBlocks; 
81  ]]></programlisting>
82         
83     </refsection>
84 </refentry>