]> Creatis software - bbtk.git/blob - packages/wx/src/bbwxOutputText.xml
7b8af12284d199f7f3abafcf190ec442021f6eb3
[bbtk.git] / packages / wx / src / bbwxOutputText.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2
3 <blackbox name="OutputText" widget>
4
5   <author>laurent.guigues at creatis.insa-lyon.fr</author>
6   <description>Text zone to be inserted into a window (wxStaticText)</description>
7   <category></category>
8
9   <input name="Title" type="std::string" description="Title prepended to the text"/>
10   <input name="In" type="std::string" description="Text"/>
11
12   <createwidget><PRE>
13    bbSetOutputWidget( new wxStaticText ( bbGetWxParent() , -1 , _T("") ) );
14    Process();
15   </PRE></createwidget>
16  
17   <process><PRE>
18    std::string msg;
19     if (bbGetInputTitle()!="")
20       {
21         msg = bbGetInputTitle()+": " + bbGetInputIn();
22       }  
23     else 
24       {
25         msg = bbGetInputIn();
26       }
27    ((wxStaticText*)bbGetOutputWidget())->SetLabel( bbtk::std2wx( msg ) ); 
28   </PRE></process>
29   
30   <constructor><PRE> 
31     bbSetInputIn("");
32     bbSetInputTitle("");
33   </PRE></constructor>    
34
35
36 </blackbox>
37