Index: /Interface_Web/trunk/pspaWT/History
===================================================================
--- /Interface_Web/trunk/pspaWT/History	(revision 410)
+++ /Interface_Web/trunk/pspaWT/History	(revision 411)
@@ -5,4 +5,10 @@
      PSPA - Plateforme de simulation en physique des accÃ©lÃ©rateurs
      =========================================================
+
+29 Mars : Laurent Garnier
+- Alignement au milieu de la ligne entre les elements
+- Ajout d'une marge autour des elements de la beamLine
+- Ajout d'une bordure autour des icones de gauche
+- GWt_console : Ajout d'une fonction de recherche
 
 28 Mars : Laurent Garnier
Index: /Interface_Web/trunk/pspaWT/htdocs/pspa.css
===================================================================
--- /Interface_Web/trunk/pspaWT/htdocs/pspa.css	(revision 410)
+++ /Interface_Web/trunk/pspaWT/htdocs/pspa.css	(revision 411)
@@ -17,4 +17,5 @@
   background-image : url("line.gif");
   background-repeat : repeat-x;
+  background-size : 100% 100%;
 }
 
@@ -64,6 +65,8 @@
   box-shadow: 0 1px 3px rgba(34, 25, 25, 0.4);
   padding: 8px 8px;
+  margin:4px 0px;
   position: absolute;
   border-radius: 5px;
+  text-align: center;
 }
 
@@ -199,8 +202,15 @@
 }
 
-.console {
+.scrollConsole {
     background-color: #EEEEEE;
-}
-
+    padding: 4px;
+}
+
+.draggableIcon {
+    border: 1px solid ;
+    border-radius: 0.3em 0.3em 0.3em 0.3em;
+    box-shadow: 0 1px rgba(255, 255, 255, 0.8), 0 1px rgba(255, 255, 255, 0.35) inset;
+    padding: 2px;
+}
 
 *|*:-moz-any-link:not(svg|a) {
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_console.h
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_console.h	(revision 410)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_console.h	(revision 411)
@@ -19,5 +19,8 @@
   void addConsoleMessage(WString msg);
 private:
-  WText* output_;
+  WText* outputCurrent_;
+  WString outputOriginal_;
+  void searchFilter();
+  WLineEdit* searchLineEdit_;
 };
 
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_console.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_console.cc	(revision 410)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_console.cc	(revision 411)
@@ -5,6 +5,11 @@
 #include <Wt/WBorder>
 #include <Wt/WLayout>
+#include <Wt/WVBoxLayout>
 #include <Wt/WPanel>
+#include <Wt/WLabel>
+#include <Wt/WLineEdit>
 #include <Wt/WScrollArea>
+#include <Wt/Utils>
+
 
 GWt_console::GWt_console()
@@ -13,20 +18,39 @@
     setObjectName("console");
 
+
+    // la ligne de search
+    Wt::WContainerWidget *searchContainer = new Wt::WContainerWidget();
+    
+    Wt::WLabel *label = new Wt::WLabel("Search ", searchContainer);
+    searchLineEdit_ = new Wt::WLineEdit("", searchContainer);
+    searchLineEdit_->setToolTip("clic here to search a string into the output");
+    
     // le panel
     WPanel *panelConsole = new WPanel(this);
-    WScrollArea* container = new  WScrollArea();
+    panelConsole->setTitle(" output");
+
+    WScrollArea* scrollContainer = new  WScrollArea();
     
-    panelConsole->setTitle(" output");
-    output_ = new WText(this);
-    output_->setTextFormat(PlainText);
-    output_->setInline(false);
 
-    container->setWidget(output_);
+    outputCurrent_ = new WText(this);
+    outputCurrent_->setTextFormat(Wt::XHTMLText);
+    outputCurrent_->setInline(false);
+    outputCurrent_->setMaximumSize(750,400);
 
-    panelConsole->setCentralWidget(container);
-    output_->setMinimumSize(300,100);
-    output_->setMaximumSize(400,400);
+    scrollContainer->setWidget(outputCurrent_);
+    scrollContainer->setStyleClass("scrollConsole");
 
-    container->setStyleClass("console");
+    Wt::WContainerWidget *panelContainer = new Wt::WContainerWidget();
+    Wt::WVBoxLayout* vContainerLayout = new Wt::WVBoxLayout();
+
+    vContainerLayout->addWidget(searchContainer);
+    vContainerLayout->addWidget(scrollContainer);
+
+
+    panelContainer->setLayout(vContainerLayout);
+    panelConsole->setCentralWidget(panelContainer);
+
+    // signals
+    searchLineEdit_->keyWentUp ().connect(this, &GWt_console::searchFilter);
 }
 
@@ -37,13 +61,87 @@
 
 
+void GWt_console::searchFilter() {
+
+    std::string br = "<br />";
+    
+    std::string txt = searchLineEdit_->text().toUTF8 ();
+    if (searchLineEdit_->text() == "") {
+        outputCurrent_->setText(outputOriginal_);
+        outputCurrent_->setTextFormat(Wt::XHTMLText);
+        return;
+    }
+    
+    std::string outputStr = outputOriginal_.toUTF8();
+    std::string outputFinal = "";
+    
+    // look for lines that contains the seacrh string
+    bool end = false;
+    int nextPos = 0;
+    int nextPosTxt = 0;
+    int lineNumber = 0;
+    std::string beginStr;
+    std::string endStr;
+    
+    // loop on all lines
+    while (end == false) {
+        lineNumber++;
+        
+        nextPos = outputStr.find(br);
+        
+        // if this line contains the token
+        if (nextPos != std::string::npos) {
+            beginStr = outputStr.substr(0,nextPos);
+            endStr = outputStr.substr(nextPos+br.size());
+            outputStr = endStr;
+
+
+            // colorize for all token
+            bool lineEnd = false;
+            std::string colorizeTxt = "";
+            while (lineEnd == false) {
+                nextPosTxt = beginStr.find(txt);
+                
+                if (nextPosTxt != std::string::npos) {
+                    colorizeTxt += beginStr.substr(0,nextPosTxt)+
+                    std::string("<b><font style='background-color:yellow;'>")+
+                    txt+
+                    std::string("</font></b>");
+                    beginStr = beginStr.substr(nextPosTxt+txt.size());
+                    
+                } else if (colorizeTxt != "") {
+                    colorizeTxt += beginStr;
+                    lineEnd = true;
+                } else {
+                    lineEnd = true;
+                }
+            }
+            if (colorizeTxt != "") {
+                std::stringstream ss;
+                ss << lineNumber;
+                outputFinal += std::string("<font color='gray'>line ")+ss.str()+" : </font>"+colorizeTxt+br;
+            }
+        } else {
+            end = true;
+        }
+    }
+    
+    outputCurrent_->setText(outputFinal);
+    outputCurrent_->setTextFormat(Wt::XHTMLText);
+
+}
+
+
 void GWt_console::addConsoleMessage(WString msg) {
     
-    output_->setText(output_->text()+msg);
-    
+    // changes specials caracters
+    outputOriginal_ += Wt::Utils::htmlEncode (msg.toUTF8(),  Wt::Utils::EncodeNewLines);
+
+    // apply filter, will modify outputCurrent
+    searchFilter();
     /*
      * Little javascript trick to make sure we scroll along with new content
      */
-    wApp->doJavaScript(output_->jsRef() + ".scrollTop += "
-                       + output_->jsRef() + ".scrollHeight;");
+    wApp->doJavaScript(outputCurrent_->jsRef() + ".scrollTop += "
+                       + outputCurrent_->jsRef() + ".scrollHeight;");
     
 }
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_draggableImage.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_draggableImage.cc	(revision 410)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_draggableImage.cc	(revision 411)
@@ -37,4 +37,6 @@
     mouseWentOut().connect(this, &GWt_draggableImage::mouseOut);
     mouseDragged().connect(this, &GWt_draggableImage::mouseIsDragged);
+    setStyleClass("draggableIcon");
+
 }
 
Index: /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc
===================================================================
--- /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc	(revision 410)
+++ /Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_softwarePanel.cc	(revision 411)
@@ -140,20 +140,7 @@
   sections_.push_back(newSection);
 
-/*  Wt::WContainerWidget* container = new Wt::WContainerWidget();
-  Wt::WGridLayout* containerLayout = new Wt::WGridLayout();
-  containerLayout->setContentsMargins(0,0,0,0);
-
-  // push back on User interface
-  containerLayout->addWidget(newSection,0,0);
-  
-  // add buttons
-  containerLayout->addWidget(createAddDeletePushButtons(sections_.size()-1),0,1);
-
-  container->setLayout(containerLayout);
-*/
-  
-  // add to sections
-//  contenuSections_->addWidget(container);
   contenuSections_->addWidget(newSection);
+  
+  updateSections();
 }
 
