]> Creatis software - bbtk.git/blob - kernel/appli/bbCreateBlackBox/xml-templates/widget-template.xml
*** empty log message ***
[bbtk.git] / kernel / appli / bbCreateBlackBox / xml-templates / widget-template.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!--==========================================================================
3    STARTS THE DESCRIPTION OF THE BLACK BOX -->
4 <blackbox name="__BLACKBOXNAME__" widget>
5  <!--========================================================================
6     THE BOX DOCUMENTATION -->
7   <author>__AUTHOR__</author>
8   <description>__DESCRIPTION__</description>
9   <category>__CategoryBlackBox__</category>
10
11 <!--========================================================================
12     #include directives to be put in the .h generated
13     There must be one tag per file to include -->
14
15  <!--========================================================================
16     INPUTS/OUTPUTS DECLARATION -->
17
18   <input name="Title" type="std::string" description="Title prepended to the text"/>
19   <input name="In" type="std::string" description="Text"/>
20
21   <createwidget><PRE>
22    bbSetOutputWidget( new wxStaticText ( parent , -1 , _T("") ) );
23   </PRE></createwidget>
24
25  <!--========================================================================
26     PROCESS section -->
27
28   <process><PRE>
29    std::string msg;
30     if (bbGetInputTitle()!="")
31       {
32         msg = bbGetInputTitle()+": " + bbGetInputIn();
33       }
34     else
35       {
36         msg = bbGetInputIn();
37       }
38    ((wxStaticText*)bbGetOutputWidget())->SetLabel( bbtk::std2wx( msg ) ); 
39   </PRE></process>
40
41  <!--======================================================================
42    CONSTRUCTORS / DESTRUCTORS (OPTIONAL) -->
43
44   <constructor><PRE> 
45     bbSetInputIn("");
46     bbSetInputTitle("");
47   </PRE>
48   </constructor>
49
50   <!-- THE COPY-CONSTRUCTION METHOD BODY :
51     Here does nothing 
52     But this is where you should allocate the output pointers if any
53     and copy the pointed values (to avoid bug caused by multiple references)-->
54   <copyconstructor>
55   <PRE>
56
57   </PRE>
58   </copyconstructor>
59
60   <!-- THE DESTRUCTION METHOD BODY :
61     Here does nothing 
62     but this is where you should desallocate the output pointers if any -->
63
64   <destructor>
65   <PRE>
66
67   </PRE>
68   </destructor>
69
70
71
72 </blackbox>
73