]> Creatis software - bbtk.git/blobdiff - kernel/appli/bbCreateBlackBox/xml-templates/widget-template.xml
Create Black Box bbs + .bat + Bug interface Windows
[bbtk.git] / kernel / appli / bbCreateBlackBox / xml-templates / widget-template.xml
diff --git a/kernel/appli/bbCreateBlackBox/xml-templates/widget-template.xml b/kernel/appli/bbCreateBlackBox/xml-templates/widget-template.xml
new file mode 100644 (file)
index 0000000..4e321db
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<blackbox name="__BLACKBOXNAME__" widget>
+
+  <author>__AUTHOR__</author>
+  <description>__DESCRIPTION__</description>
+  <category>__CategoryBlackBox__</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>
+