]> Creatis software - bbtk.git/blobdiff - packages/wx/src/bbwxOutputText.xml
*** empty log message ***
[bbtk.git] / packages / wx / src / bbwxOutputText.xml
diff --git a/packages/wx/src/bbwxOutputText.xml b/packages/wx/src/bbwxOutputText.xml
new file mode 100644 (file)
index 0000000..7b8af12
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<blackbox name="OutputText" widget>
+
+  <author>laurent.guigues at creatis.insa-lyon.fr</author>
+  <description>Text zone to be inserted into a window (wxStaticText)</description>
+  <category></category>
+
+  <input name="Title" type="std::string" description="Title prepended to the text"/>
+  <input name="In" type="std::string" description="Text"/>
+
+  <createwidget><PRE>
+   bbSetOutputWidget( new wxStaticText ( bbGetWxParent() , -1 , _T("") ) );
+   Process();
+  </PRE></createwidget>
+  <process><PRE>
+   std::string msg;
+    if (bbGetInputTitle()!="")
+      {
+       msg = bbGetInputTitle()+": " + bbGetInputIn();
+      }  
+    else 
+      {
+       msg = bbGetInputIn();
+      }
+   ((wxStaticText*)bbGetOutputWidget())->SetLabel( bbtk::std2wx( msg ) ); 
+  </PRE></process>
+  
+  <constructor><PRE> 
+    bbSetInputIn("");
+    bbSetInputTitle("");
+  </PRE></constructor>    
+
+
+</blackbox>
+