]> Creatis software - bbtk.git/blob - packages/wx/src/bbwxOutputText.xml
Merge branch 'vtk8itk5wx3-mingw64' of ssh://git.creatis.insa-lyon.fr/bbtk into vtk8it...
[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 ( parent, /*bbGetWxParent(),*/  -1 , _T("") ) );
14    Process();
15   </PRE></createwidget>
16  
17   <process><PRE>
18         wxStaticText* w = (wxStaticText*)bbGetOutputWidget();
19         if (w) 
20         {
21                 std::string msg;
22                 if (bbGetInputTitle()!="")
23                 {
24                         msg = bbGetInputTitle()+": " + bbGetInputIn();
25                 }  
26                 else 
27                 {
28                         msg = bbGetInputIn();
29                 }
30                 w->SetLabel( bbtk::std2wx( msg ) ); 
31         }
32   </PRE></process>
33   
34   <defaultValues><PRE> 
35     bbSetInputIn("");
36     bbSetInputTitle("");
37         bbSetOutputWidget(0);
38   </PRE></defaultValues>    
39
40
41 </blackbox>
42