Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_abstractElement.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_abstractElement.h	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_abstractElement.h	(revision 437)
@@ -1,4 +1,4 @@
-#ifndef GWTABSTRACELEMENT_SEEN
-#define GWTABSTRACELEMENT_SEEN
+#ifndef GWT_abstractElement_SEEN
+#define GWT_abstractElement_SEEN
 
 #include "GWt_draggableImage.h"
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_abstractElementFactory.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_abstractElementFactory.h	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_abstractElementFactory.h	(revision 437)
@@ -7,16 +7,16 @@
 //
 
-#ifndef PSPA_GWt_abstractElementFactory_h
-#define PSPA_GWt_abstractElementFactory_h
+#ifndef GWt_abstractElementFactory_h
+#define GWt_abstractElementFactory_h
 
-#include "GWt_rfgun.h"
-#include "GWt_drift.h"
-#include "GWt_cell.h"
-#include "GWt_bend.h"
-#include "GWt_soleno.h"
-#include "GWt_beam.h"
-#include "GWt_fit.h"
-#include "GWt_snapshot.h"
-#include "GWt_mpole.h"
+#include "GWt_elementRfgun.h"
+#include "GWt_elementDrift.h"
+#include "GWt_elementCell.h"
+#include "GWt_elementBend.h"
+#include "GWt_elementSoleno.h"
+#include "GWt_elementBeam.h"
+#include "GWt_elementFit.h"
+#include "GWt_elementSnapshot.h"
+#include "GWt_elementMpole.h"
 
 using namespace Wt;
@@ -67,13 +67,13 @@
   inline void setMPoleEnable(bool a) { isMPoleElementEnable = a;};
   
-  GWt_drift* createDriftElement();
-  GWt_rfgun* createRFGunElement();
-  GWt_cell* createCellElement();
-  GWt_bend* createBendElement();
-  GWt_soleno* createSolenoElement();
-  GWt_beam* createBeamElement();
-  GWt_fit* createFitElement();
-  GWt_snapshot* createSnapshotElement();
-  GWt_mpole* createMPoleElement();
+  GWt_elementDrift* createDriftElement();
+  GWt_elementRfgun* createRFGunElement();
+  GWt_elementCell* createCellElement();
+  GWt_elementBend* createBendElement();
+  GWt_elementSoleno* createSolenoElement();
+  GWt_elementBeam* createBeamElement();
+  GWt_elementFit* createFitElement();
+  GWt_elementSnapshot* createSnapshotElement();
+  GWt_elementMpole* createMPoleElement();
   vector <GWt_abstractElement*> getAllElements();
   
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_console.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_console.h	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_console.h	(revision 437)
@@ -1,4 +1,4 @@
-#ifndef GWTCONSOLE_SEEN
-#define GWTCONSOLE_SEEN
+#ifndef GWT_CONSOLE_SEEN
+#define GWT_CONSOLE_SEEN
 
 #include <iostream>
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_dialog.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_dialog.h	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_dialog.h	(revision 437)
@@ -1,4 +1,4 @@
 #ifndef GWT_DIALOG
-#define  GWT_DIALOG
+#define GWT_DIALOG
 
 #include <Wt/WDialog>
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_dropZoneLigneFaisceau.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_dropZoneLigneFaisceau.h	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_dropZoneLigneFaisceau.h	(revision 437)
@@ -2,5 +2,4 @@
 #define GWT_DROPZONELIGNEFAISEAU_SEEN
 
-#include "GWt_dropZoneLigneFaisceau.h"
 #include "GWt_pspaApplication.h"
 
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementBeam.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementBeam.h	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementBeam.h	(revision 437)
@@ -0,0 +1,34 @@
+#ifndef GWt_elementBeam_SEEN
+#define GWt_elementBeam_SEEN
+
+
+#include "GWt_abstractElement.h"
+
+class GWt_elementBeam : public GWt_abstractElement {
+    
+  WLineEdit* xEdit_; // cm
+  WLineEdit* xpEdit_; // mrad
+  WLineEdit* yEdit_; // cm
+  WLineEdit* ypEdit_; // mrad
+  WLineEdit* dlEdit_; // cm
+  WLineEdit* delEdit_; // %
+  WLineEdit* p0Edit_; // GeV/c
+      
+ public :
+    
+  GWt_elementBeam() {;}
+  GWt_elementBeam(GWt_elementLigneFaisceau* );
+  ~GWt_elementBeam() {;}
+  
+  virtual void dialogDone(WDialog::DialogCode code);
+    
+  inline string getMimeType() {return "htdocs/beam.jpg"; }
+  inline string getSmallImageURL() {return "htdocs/beam.jpg"; }
+  inline string getBigImageURL() {return "htdocs/beam.jpg"; }
+  inline string getName() {return "beam"; }
+  
+ private :
+ 
+  void initilializeDialog();
+};
+#endif
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementBend.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementBend.h	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementBend.h	(revision 437)
@@ -0,0 +1,33 @@
+#ifndef GWt_elementBend_SEEN
+#define GWt_elementBend_SEEN
+
+#include "GWt_abstractElement.h"
+
+class GWt_elementBend : public GWt_abstractElement
+{
+  WLineEdit* angleEdit_; // deg.
+  WLineEdit* radiusEdit_; // m
+  WLineEdit* xlengthEdit_; // cm
+  WLineEdit* apertureEdit_; // cm
+  WLineEdit* beta1Edit_; // deg.
+  WLineEdit* beta2Edit_; // deg.
+  WLineEdit* momentumEdit_; // MeV/c
+       
+ public :
+    
+  GWt_elementBend() {;}
+  GWt_elementBend(GWt_elementLigneFaisceau* );
+  ~GWt_elementBend() {;}
+  
+  virtual void dialogDone(WDialog::DialogCode code);  
+  
+  inline string getMimeType() {return "htdocs/bend.jpg"; }
+  inline string getSmallImageURL() {return "htdocs/bend.jpg"; }
+  inline string getBigImageURL() {return "htdocs/bend.jpg"; }
+  inline string getName() {return "bend"; }
+  
+ private :
+  
+  void initilializeDialog();
+};
+#endif
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementCell.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementCell.h	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementCell.h	(revision 437)
@@ -0,0 +1,43 @@
+#ifndef GWT_elementCell_SEEN
+#define GWT_elementCell_SEEN
+
+#include "GWt_abstractElement.h"
+
+#include <iostream>
+#include <string>
+#include <sstream>
+
+using namespace Wt;
+using namespace std;
+
+class GWt_elementCell : public GWt_abstractElement
+{
+  WLineEdit* lenghtElemEdit_; // cm
+  WLineEdit* apertureEdit_; // cm
+  WLineEdit* initialPhaseEdit_; // degres
+  WLineEdit* phaseStepMaxEdit_;   // degres
+  WLineEdit* acceleratingFieldEdit_; // MV/m
+  WLineEdit* acceleratingShapeFileEdit_; // string
+  WLineEdit* focusingMagFileEdit_; // string
+  WLineEdit* offsetMagEdit_; // cm
+  WLineEdit* scaleFactorEdit_;
+      
+ public :
+    
+  GWt_elementCell() {;}
+  GWt_elementCell(GWt_elementLigneFaisceau* );
+  ~GWt_elementCell() {;}
+ 
+  virtual void dialogDone(WDialog::DialogCode code);
+    
+  inline string getMimeType() {return "htdocs/cell.jpg"; }
+  inline string getSmallImageURL() {return "htdocs/cell.jpg"; }
+  inline string getBigImageURL() {return "htdocs/cell.jpg"; }
+  inline string getName() {return "cell"; }
+  
+ private :
+
+  void initilializeDialog();
+  
+};
+#endif
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementDrift.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementDrift.h	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementDrift.h	(revision 437)
@@ -0,0 +1,36 @@
+#ifndef GWt_elementDriftFaisceau_SEEN
+#define GWt_elementDriftFaisceau_SEEN
+
+#include "GWt_abstractElement.h"
+#include "abstractElement.h"
+
+#include <iostream>
+#include <string>
+#include <sstream>
+
+using namespace Wt;
+using namespace std;
+
+class GWt_elementDrift : public GWt_abstractElement
+{
+  WLineEdit* xlengthEdit_;
+  WLineEdit* apertureEdit_;
+      
+ public:
+    
+  GWt_elementDrift() {;}
+  GWt_elementDrift(GWt_elementLigneFaisceau* );
+  ~GWt_elementDrift() {;}
+  
+  virtual void dialogDone(WDialog::DialogCode code);
+    
+  inline string getMimeType() {return "htdocs/drift.jpg"; }
+  inline string getSmallImageURL() {return "htdocs/drift.jpg"; }
+  inline string getBigImageURL() {return "htdocs/drift.jpg"; }
+  inline string getName() {return "drift"; }
+  
+ private :
+
+  void initilializeDialog();
+};
+#endif
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementFit.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementFit.h	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementFit.h	(revision 437)
@@ -0,0 +1,30 @@
+#ifndef GWt_elementFit_SEEN
+#define GWt_elementFit_SEEN
+
+#include "GWt_abstractElement.h"
+
+class GWt_elementFit : public GWt_abstractElement
+{
+    
+  WComboBox* nameEdit_; // deg.
+  WLineEdit* valueEdit_; // m
+  WLineEdit* tolerEdit_; // cm
+   
+ public :
+    
+  GWt_elementFit() {;}
+  GWt_elementFit(GWt_elementLigneFaisceau* );
+  ~GWt_elementFit() {;}
+  
+  virtual void dialogDone(WDialog::DialogCode code);
+    
+  inline string getMimeType() {return "htdocs/fit.jpg"; }
+  inline string getSmallImageURL() {return "htdocs/fit.jpg"; }
+  inline string getBigImageURL() {return "htdocs/fit.jpg"; }
+  inline string getName() {return "fit"; }
+  
+ private :
+  
+  void initilializeDialog();
+};
+#endif
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementLigneFaisceau.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementLigneFaisceau.h	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementLigneFaisceau.h	(revision 437)
@@ -2,5 +2,4 @@
 #define GWt_elementLigneFaisceau_SEEN
 
-#include "abstractElement.h"
 #include "GWt_abstractElement.h"
 #include "GWt_dropZoneLigneFaisceau.h"
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementMpole.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementMpole.h	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementMpole.h	(revision 437)
@@ -0,0 +1,38 @@
+#ifndef GWt_elementMpole_SEEN
+#define GWt_elementMpole_SEEN
+
+
+#include "GWt_abstractElement.h"
+#include "abstractElement.h"
+
+#include <iostream>
+#include <string>
+#include <sstream>
+
+using namespace Wt;
+using namespace std;
+
+class GWt_elementMpole : public GWt_abstractElement
+{
+  WLineEdit* orderEdit_;
+  WLineEdit* componentEdit_;
+
+ public :
+  
+  GWt_elementMpole()  {;}
+  GWt_elementMpole(GWt_elementLigneFaisceau*);
+  ~GWt_elementMpole() {;}
+  
+  virtual void dialogDone(WDialog::DialogCode code);
+  WImage* getImage();
+    
+  inline string getMimeType() {return "htdocs/mpole.jpg";}
+  inline string getSmallImageURL() {return "htdocs/mpole.jpg";}
+  inline string getBigImageURL() {return "htdocs/mpole.jpg";}
+  inline string getName() {return "mpole";}
+  
+ private :
+
+  void initilializeDialog();
+};
+#endif
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementRfgun.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementRfgun.h	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementRfgun.h	(revision 437)
@@ -0,0 +1,42 @@
+#ifndef GWt_elementRfgun_SEEN
+#define GWt_elementRfgun_SEEN
+
+#include "GWt_abstractElement.h"
+
+#include <iostream>
+#include <string>
+#include <sstream>
+
+using namespace Wt;
+using namespace std;
+
+class GWt_elementRfgun : public GWt_abstractElement
+{
+  WLineEdit* nmacropEdit_;
+  WLineEdit* sigma_tEdit_; // picoseconds
+  WLineEdit* sigma_rEdit_; // cm
+  WLineEdit* emit_xEdit_; // pi.mm.mrad
+  WLineEdit* emit_yEdit_; // pi.mm.mrad
+  WLineEdit* E_cinEdit_;   // MeV
+  WLineEdit* sigma_EEdit_; // MeV
+  WLineEdit* totalChargeEdit_;
+      
+ public :
+    
+  GWt_elementRfgun() {;}
+  GWt_elementRfgun(GWt_elementLigneFaisceau* );
+  ~GWt_elementRfgun() {;}
+  
+  virtual void dialogDone(WDialog::DialogCode code);
+    
+  inline string getMimeType() {return "htdocs/rfgun.jpg"; }
+  inline string getSmallImageURL() {return "htdocs/rfgun.jpg"; }
+  inline string getBigImageURL() {return "htdocs/rfgun.jpg"; }
+  inline string getName() {return "rfgun"; }
+    
+ private :
+  
+  void initilializeDialog();
+
+};
+#endif
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementSnapshot.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementSnapshot.h	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementSnapshot.h	(revision 437)
@@ -0,0 +1,35 @@
+#ifndef GWt_elementSnapshot_SEEN
+#define GWt_elementSnapshot_SEEN
+
+#include "GWt_abstractElement.h"
+#include "abstractElement.h"
+
+#include <iostream>
+#include <string>
+#include <sstream>
+
+using namespace Wt;
+using namespace std;
+
+class GWt_elementSnapshot : public GWt_abstractElement
+{
+  WLineEdit* snapshotFile_;
+   
+ public:
+    
+  GWt_elementSnapshot() {;}
+  GWt_elementSnapshot(GWt_elementLigneFaisceau*,int);
+  ~GWt_elementSnapshot() {;}
+  
+  virtual void dialogDone(WDialog::DialogCode code);
+    
+  inline string getMimeType() {return "htdocs/snapshot.jpg"; }
+  inline string getSmallImageURL() {return "htdocs/snapshot.jpg"; }
+  inline string getBigImageURL() {return "htdocs/snapshot.jpg"; }
+  inline string getName() {return "snapshot"; }
+  
+ private :
+
+  void initilializeDialog();
+};
+#endif
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementSoleno.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementSoleno.h	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementSoleno.h	(revision 437)
@@ -0,0 +1,43 @@
+#ifndef GWt_elementSoleno_SEEN
+#define GWt_elementSoleno_SEEN
+
+#include <Wt/WCheckBox>
+
+#include "GWt_abstractElement.h"
+#include "abstractElement.h"
+
+#include <iostream>
+#include <string>
+#include <sstream>
+
+using namespace Wt;
+using namespace std;
+
+class GWt_elementSoleno : public  GWt_abstractElement
+{
+  WLineEdit* xlengthEdit_;
+  WLineEdit* apertureEdit_;
+  WLineEdit* B0Edit_;
+  WCheckBox* varyB0Edit_;
+  
+  void updateB();
+    
+ public :
+    
+  GWt_elementSoleno() {;}
+  GWt_elementSoleno(GWt_elementLigneFaisceau* );
+  ~GWt_elementSoleno() {;}
+  
+  virtual void dialogDone(WDialog::DialogCode code);
+  WImage* getImage();
+  
+  inline string getMimeType() {return "htdocs/soleno.jpg"; }
+  inline string getSmallImageURL() {return "htdocs/soleno.jpg"; }
+  inline string getBigImageURL() {return "htdocs/soleno.jpg"; }
+  inline string getName() {return "soleno"; }
+  
+ private :
+
+  void initilializeDialog();
+};
+#endif
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_ligneFaisceau.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_ligneFaisceau.h	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_ligneFaisceau.h	(revision 437)
@@ -1,4 +1,4 @@
-#ifndef LIGNEFAISCEAU_SEEN
-#define LIGNEFAISCEAU_SEEN
+#ifndef GWt_LIGNEFAISCEAU_SEEN
+#define GWt_LIGNEFAISCEAU_SEEN
 
 #include "dataManager.h"
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h	(revision 437)
@@ -1,4 +1,4 @@
-#ifndef PSPA_SEEN
-#define  PSPA_SEEN
+#ifndef GWt_PSPA_Application_SEEN
+#define GWt_PSPA_Application_SEEN
 
 #include <cstdlib>
@@ -22,5 +22,4 @@
 #include "GWt_dialog.h"
 #include "GWt_console.h"
-#include "GWt_abstractElementFactory.h"
 #include "GWt_softwarePanel.h"
 #include "GWt_ligneFaisceau.h"
@@ -29,4 +28,6 @@
 
 #include "dataManager.h"
+
+class GWt_abstractElementFactory;
 
 using namespace Wt;
Index: Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_softwarePanel.h
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_softwarePanel.h	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_softwarePanel.h	(revision 437)
@@ -7,6 +7,6 @@
 //
 
-#ifndef __PSPA__GWt_softwarePanel__
-#define __PSPA__GWt_softwarePanel__
+#ifndef GWt_softwarePanel_SEEN
+#define GWt_softwarePanel_SEEN
 
 #include <iostream>
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_abstractElement.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_abstractElement.cc	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_abstractElement.cc	(revision 437)
@@ -7,12 +7,4 @@
 #include "GWt_abstractElement.h"
 #include "GWt_elementLigneFaisceau.h"
-#include "GWt_rfgun.h"
-#include "GWt_drift.h"
-#include "GWt_cell.h"
-#include "GWt_bend.h"
-#include "GWt_soleno.h"
-#include "GWt_beam.h"
-#include "GWt_fit.h"
-//#include "GWt_snapshot.h"
 
 #include "GWt_draggableImage.h"
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_abstractElementFactory.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_abstractElementFactory.cc	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_abstractElementFactory.cc	(revision 437)
@@ -34,72 +34,72 @@
 }
 
-GWt_drift* GWt_abstractElementFactory::createDriftElement() 
+GWt_elementDrift* GWt_abstractElementFactory::createDriftElement()
 {
   if (isDriftElementEnable) {
-    return new GWt_drift();
+    return new GWt_elementDrift();
   }
   return NULL;
 }
 
-GWt_rfgun* GWt_abstractElementFactory::createRFGunElement() 
+GWt_elementRfgun* GWt_abstractElementFactory::createRFGunElement() 
 {
   if (isRFGunElementEnable) {
-    return new GWt_rfgun();
+    return new GWt_elementRfgun();
   }
   return NULL;
 }
 
-GWt_cell* GWt_abstractElementFactory::createCellElement() 
+GWt_elementCell* GWt_abstractElementFactory::createCellElement()
 {
   if (isCellElementEnable) {
-    return new GWt_cell();
+    return new GWt_elementCell();
   }
   return NULL;
 }
 
-GWt_bend* GWt_abstractElementFactory::createBendElement() 
+GWt_elementBend* GWt_abstractElementFactory::createBendElement()
 {
   if (isBendElementEnable) {
-    return new GWt_bend();
+    return new GWt_elementBend();
   }
   return NULL;
 }
 
-GWt_soleno* GWt_abstractElementFactory::createSolenoElement()
+GWt_elementSoleno* GWt_abstractElementFactory::createSolenoElement()
 {
   if (isSolenoElementEnable) {
-    return new GWt_soleno();
+    return new GWt_elementSoleno();
   }
   return NULL;
 }
 
-GWt_beam* GWt_abstractElementFactory::createBeamElement() 
+GWt_elementBeam* GWt_abstractElementFactory::createBeamElement()
 {
   if (isBeamElementEnable) {
-    return new GWt_beam();
+    return new GWt_elementBeam();
   }
   return NULL;
 }
 
-GWt_fit* GWt_abstractElementFactory::createFitElement() 
+GWt_elementFit* GWt_abstractElementFactory::createFitElement()
 {
   if (isFitElementEnable) {
-    return new GWt_fit();
+    return new GWt_elementFit();
   }
   return NULL;
 }
 
-GWt_snapshot* GWt_abstractElementFactory::createSnapshotElement()
+GWt_elementSnapshot* GWt_abstractElementFactory::createSnapshotElement()
 {
   if (isSnapshotElementEnable) {
-    return new GWt_snapshot();
+    return new GWt_elementSnapshot();
   }
   return NULL;
 }
 
-GWt_mpole* GWt_abstractElementFactory::createMPoleElement() 
+GWt_elementMpole* GWt_abstractElementFactory::createMPoleElement()
 {
   if (isMPoleElementEnable) {
-    return new GWt_mpole();
+    return new GWt_elementMpole();
   }
   return NULL;
@@ -110,29 +110,29 @@
   vector <GWt_abstractElement*> elems;
   if (isRFGunElementEnable) {
-    elems.push_back(new GWt_rfgun());
+    elems.push_back(new GWt_elementRfgun());
   }
   if (isBeamElementEnable) {
-    elems.push_back(new GWt_beam());
+    elems.push_back(new GWt_elementBeam());
   }
   if (isDriftElementEnable) {
-    elems.push_back(new GWt_drift());
+    elems.push_back(new GWt_elementDrift());
   }
   if (isBendElementEnable) {
-    elems.push_back(new GWt_bend());
+    elems.push_back(new GWt_elementBend());
   }
   if (isCellElementEnable) {
-    elems.push_back(new GWt_cell());
+    elems.push_back(new GWt_elementCell());
   }
   if (isSolenoElementEnable) {
-    elems.push_back(new GWt_soleno());
+    elems.push_back(new GWt_elementSoleno());
   }
   if (isFitElementEnable) {
-    elems.push_back(new GWt_fit());
+    elems.push_back(new GWt_elementFit());
   }
   if (isSnapshotElementEnable) {
-    elems.push_back(new GWt_snapshot());
+    elems.push_back(new GWt_elementSnapshot());
   }
   if (isMPoleElementEnable) {
-    elems.push_back(new GWt_mpole());
+    elems.push_back(new GWt_elementMpole());
   }
 
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_dropZoneLigneFaisceau.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_dropZoneLigneFaisceau.cc	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_dropZoneLigneFaisceau.cc	(revision 437)
@@ -4,4 +4,5 @@
 #include <Wt/WApplication>
 
+#include "GWt_abstractElementFactory.h"
 #include "GWt_dropZoneLigneFaisceau.h"
 #include "GWt_ligneFaisceau.h"
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementBeam.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementBeam.cc	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementBeam.cc	(revision 437)
@@ -0,0 +1,92 @@
+#include "GWt_elementBeam.h"
+#include "mixedTools.h"
+
+#include <Wt/WText>
+#include <Wt/WLineEdit>
+#include <Wt/WBreak>
+#include <Wt/WDialog>
+#include <Wt/WPushButton>
+
+GWt_elementBeam::GWt_elementBeam(GWt_elementLigneFaisceau* elemLigne)
+:GWt_abstractElement(new elementBeam())
+{
+  elementLigneFaiseauContainer_ = elemLigne;
+  initialize();
+}
+
+void GWt_elementBeam::initilializeDialog() 
+{
+  string* param = beginDialog();
+
+  registerParam("int____",2000, " 1/2 horizontal beam extend rms (cm) : ");
+  getParamValue("int____");
+  getParamDescription("int____");
+  registerParam("bool____",true, " 1/2 horizontal beam extend rms (cm) : ");
+  getParamValue("bool____");
+  getParamDescription("bool____");
+
+  string t = "ttttt";
+  registerParam("str____",t, " 1/2 horizontal beam extend rms (cm) : ");
+  getParamValue("str____");
+  getParamDescription("str____");
+  
+  new WText(" 1/2 horizontal beam extend rms (cm) : ",dialog_->contents());
+  xEdit_ = new WLineEdit(param->c_str(), dialog_->contents());
+  //  new WBreak(dialog_->contents());
+  
+  new WText("1/2 horizontal beam divergence rms (mrad) : ",dialog_->contents());
+  xpEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+    
+  new WText("1/2 vertical beam extend rms (cm) : ",dialog_->contents());
+  yEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  //  new WBreak(dialog_->contents());
+  
+  new WText("1/2 horizontal beam divergence rms (mrad) : ",dialog_->contents());
+  ypEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  new WText("1/2 longitudinal beam extend rms (cm) : ",dialog_->contents());
+  dlEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  //  new WBreak(dialog_->contents());
+    
+  new WText("1/2 momentum spread rms (mrad) : ",dialog_->contents());
+  delEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+    
+  new WText("momentum of the central trajectory (GeV/c) : ",dialog_->contents());
+  p0Edit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+
+  WPushButton *annule= new WPushButton("cancel",dialog_->contents()); 
+  annule->clicked().connect(dialog_, &Wt::WDialog::reject);
+  WPushButton *submit= new WPushButton("OK",dialog_->contents());
+  submit->clicked().connect(dialog_, &Wt::WDialog::accept);
+  dialog_->finished().connect(this, &GWt_elementBeam::dialogDone);  
+}
+
+void GWt_elementBeam::dialogDone(WDialog::DialogCode code)
+{
+  if (code != Wt::WDialog::Accepted) return;
+
+  unsigned nbParam = abstractElement_->getNbParams();
+  string* envoi = new string[nbParam+1];
+  int compteur = -1;
+  
+  envoi[++compteur] = mixedTools::intToString(nbParam);
+  envoi[++compteur] = labelEdit_->text().toUTF8();
+  envoi[++compteur] = xEdit_->text().toUTF8();
+  envoi[++compteur] = xpEdit_->text().toUTF8();
+  envoi[++compteur] = yEdit_->text().toUTF8();
+  envoi[++compteur] = ypEdit_->text().toUTF8();
+  envoi[++compteur] = dlEdit_->text().toUTF8();
+  envoi[++compteur] = delEdit_->text().toUTF8();
+  envoi[++compteur] = p0Edit_->text().toUTF8();
+  if ( compteur !=  (int)nbParam ) {
+    cerr << " GWt_elementBeam::dialogDone() pb nb de parametres, compteur = " << compteur << " nbParam= " << nbParam << endl;
+    return;
+  }
+  abstractElement_->setParametersString(envoi);
+  updateLabelAndToolTipWidget();
+  delete [] envoi;
+}
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementBend.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementBend.cc	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementBend.cc	(revision 437)
@@ -0,0 +1,81 @@
+ 
+#include "GWt_elementBend.h"
+#include "mixedTools.h"
+
+#include <Wt/WText>
+#include <Wt/WLineEdit>
+#include <Wt/WBreak>
+#include <Wt/WDialog>
+#include <Wt/WPushButton>
+
+GWt_elementBend::GWt_elementBend(GWt_elementLigneFaisceau* elemLigne )
+:GWt_abstractElement(new elementBend())
+{
+  elementLigneFaiseauContainer_ = elemLigne;
+  initialize();
+}
+
+void GWt_elementBend::initilializeDialog() 
+{
+  string* param = beginDialog();
+    
+  new WText("angle (deg.) : ",dialog_->contents());
+  angleEdit_ = new WLineEdit( param->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  new WText("radius (m) : ",dialog_->contents());
+  radiusEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+    
+  new WText("momentum (MeV/c) : ",dialog_->contents());
+  momentumEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+    
+  new WText("length (cm) : ",dialog_->contents());
+  xlengthEdit_ = new WLineEdit("0", dialog_->contents());
+  xlengthEdit_->setDisabled(true);
+  new WBreak(dialog_->contents());
+    
+  new WText("aperture (cm) : ",dialog_->contents());
+  apertureEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  apertureEdit_->setDisabled(true);
+  new WBreak(dialog_->contents());
+    
+  new WText("pole face rotations (deg.) entrance : ",dialog_->contents());
+  beta1Edit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WText("exit : ",dialog_->contents());
+  beta2Edit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  WPushButton *annule= new WPushButton("cancel",dialog_->contents());  
+  annule->clicked().connect(dialog_, &Wt::WDialog::reject); 
+  WPushButton *submit= new WPushButton("OK",dialog_->contents());
+  submit->clicked().connect(dialog_, &Wt::WDialog::accept);
+  dialog_->finished().connect(this, &GWt_elementBend::dialogDone);
+}
+
+void GWt_elementBend::dialogDone(WDialog::DialogCode code)
+{
+  if (code != Wt::WDialog::Accepted) return;
+
+  unsigned nbParam = abstractElement_->getNbParams();
+  string* envoi = new string[nbParam+1];
+  int compteur = -1;
+  
+  envoi[++compteur] = string(mixedTools::intToString(nbParam) );
+  envoi[++compteur] = labelEdit_->text().toUTF8();
+  envoi[++compteur] = angleEdit_->text().toUTF8();
+  envoi[++compteur] = radiusEdit_->text().toUTF8();
+  envoi[++compteur] = momentumEdit_->text().toUTF8();
+  envoi[++compteur] = apertureEdit_->text().toUTF8();
+  envoi[++compteur] = beta1Edit_->text().toUTF8();
+  envoi[++compteur] = beta2Edit_->text().toUTF8(); 
+  if ( compteur !=  (int)nbParam ) {
+    cerr << " GWt_elementBend::dialogDone() pb nb de parametres, compteur = " << compteur << " nbParam= " << nbParam << endl;
+    return;
+  }
+  abstractElement_->setParametersString(envoi);
+  updateLabelAndToolTipWidget();
+  delete [] envoi;
+}
+
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementCell.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementCell.cc	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementCell.cc	(revision 437)
@@ -0,0 +1,105 @@
+
+#include "GWt_elementCell.h"
+#include "mixedTools.h"
+
+#include <Wt/WText>
+#include <Wt/WLineEdit>
+#include <Wt/WBreak>
+#include <Wt/WDialog>
+#include <Wt/WPushButton>
+#include <Wt/WPanel>
+
+GWt_elementCell::GWt_elementCell(GWt_elementLigneFaisceau* elemLigne)
+:GWt_abstractElement(new elementCell())
+{
+    elementLigneFaiseauContainer_ = elemLigne;
+    initialize();
+}
+
+void GWt_elementCell::initilializeDialog() 
+{
+  string* param = beginDialog();
+    
+  new WText("length (cm) : ",dialog_->contents());
+  lenghtElemEdit_ = new WLineEdit(param->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+    
+  new WText("aperture (cm) : ",dialog_->contents());
+  apertureEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  new WText("initial phase (deg.) : ",dialog_->contents());
+  initialPhaseEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  new WText("max phase step (deg.) : ",dialog_->contents());
+  phaseStepMaxEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  new WText("max accelerating field (MV/m) : ",dialog_->contents());
+  acceleratingFieldEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  new WText("name of file for field shape : ",dialog_->contents());
+  acceleratingShapeFileEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  WPanel *panel = new WPanel(dialog_->contents());
+  panel->setTitle(" magnetic focusing ");
+  
+  WText* t1 = new WText("name of file for focusing mag. field : ",dialog_->contents());
+  focusingMagFileEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  WText* t2 = new WText(" z-offset for mag. field : ",dialog_->contents());
+  offsetMagEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  
+  WText* t3 = new WText(" scaling factor for mag. field : ",dialog_->contents());
+  scaleFactorEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  
+  WContainerWidget* contenu = new WContainerWidget();
+  contenu->addWidget(t1);
+  contenu->addWidget(focusingMagFileEdit_);
+  contenu->addWidget(new WBreak());
+  contenu->addWidget(t2);
+  contenu->addWidget(offsetMagEdit_);
+  contenu->addWidget(new WBreak());
+  contenu->addWidget(t3);
+  contenu->addWidget(scaleFactorEdit_);
+  
+  panel->setCentralWidget(contenu);
+
+  WPushButton *annule= new WPushButton("cancel",dialog_->contents());  
+  annule->clicked().connect(dialog_, &Wt::WDialog::reject);  
+  WPushButton *submit= new WPushButton("OK",dialog_->contents());
+  submit->clicked().connect(dialog_, &Wt::WDialog::accept);
+  dialog_->finished().connect(this, &GWt_elementCell::dialogDone);
+}
+
+void GWt_elementCell::dialogDone(WDialog::DialogCode code)
+{
+  if (code != Wt::WDialog::Accepted) return;
+
+  unsigned nbParam = abstractElement_->getNbParams();
+  string* envoi = new string[nbParam+1];
+  int compteur = -1;
+    
+  envoi[++compteur] = mixedTools::intToString(nbParam);
+  envoi[++compteur] = labelEdit_->text().toUTF8();
+  envoi[++compteur] = lenghtElemEdit_->text().toUTF8();
+  envoi[++compteur] = apertureEdit_->text().toUTF8();
+  envoi[++compteur] = initialPhaseEdit_->text().toUTF8();
+  envoi[++compteur] =  phaseStepMaxEdit_->text().toUTF8();
+  envoi[++compteur] =  acceleratingFieldEdit_->text().toUTF8();
+  envoi[++compteur] = acceleratingShapeFileEdit_->text().toUTF8();
+  envoi[++compteur] = focusingMagFileEdit_->text().toUTF8();
+  envoi[++compteur] = offsetMagEdit_->text().toUTF8();
+  envoi[++compteur] = scaleFactorEdit_->text().toUTF8();
+  if ( compteur !=  (int)nbParam ) {
+    cerr << " GWt_elementCell::dialogDone() pb nb de parametres, compteur = " << compteur << " nbParam= " << nbParam << endl;
+    return;
+  }
+  abstractElement_->setParametersString(envoi);
+  updateLabelAndToolTipWidget();
+  delete [] envoi;
+}
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementDrift.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementDrift.cc	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementDrift.cc	(revision 437)
@@ -0,0 +1,56 @@
+
+#include "GWt_elementDrift.h"
+#include "mixedTools.h"
+
+#include <Wt/WText>
+#include <Wt/WLineEdit>
+#include <Wt/WBreak>
+#include <Wt/WDialog>
+#include <Wt/WPushButton>
+
+GWt_elementDrift::GWt_elementDrift(GWt_elementLigneFaisceau* elemLigne)
+:GWt_abstractElement(new elementDrift())
+{
+  elementLigneFaiseauContainer_ = elemLigne;
+  initialize();
+}
+
+void GWt_elementDrift::initilializeDialog() 
+{
+  string* param = beginDialog();
+    
+  new WText("length (cm) : ",dialog_->contents());
+  xlengthEdit_ = new WLineEdit(param->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  new WText("aperture (cm) : ",dialog_->contents());
+  apertureEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  WPushButton *annule= new WPushButton("cancel",dialog_->contents()); 
+  annule->clicked().connect(dialog_, &Wt::WDialog::reject);
+  WPushButton *submit= new WPushButton("OK",dialog_->contents());
+  submit->clicked().connect(dialog_, &Wt::WDialog::accept);
+  dialog_->finished().connect(this, &GWt_elementDrift::dialogDone);
+}
+
+void GWt_elementDrift::dialogDone(WDialog::DialogCode code)
+{
+  if (code != Wt::WDialog::Accepted) return;
+  
+  unsigned nbParam = abstractElement_->getNbParams();
+  string* envoi = new string[nbParam+1];
+  int compteur = -1;
+  
+  envoi[++compteur] = mixedTools::intToString(nbParam);
+  envoi[++compteur] = labelEdit_->text().toUTF8();
+  envoi[++compteur] = xlengthEdit_->text().toUTF8();
+  envoi[++compteur] = apertureEdit_->text().toUTF8();
+  if ( compteur !=  (int)nbParam ) {
+    cerr << " GWt_elementDrift::dialogDone() pb nb de parametres, compteur = " << compteur << " nbParam= " << nbParam << endl;
+    return;
+  }
+  abstractElement_->setParametersString(envoi);
+  updateLabelAndToolTipWidget();
+  delete [] envoi;
+}
+
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementFit.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementFit.cc	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementFit.cc	(revision 437)
@@ -0,0 +1,82 @@
+#include "GWt_elementFit.h"
+#include "mixedTools.h"
+
+#include <Wt/WText>
+#include <Wt/WLineEdit>
+#include <Wt/WBreak>
+#include <Wt/WDialog>
+#include <Wt/WPushButton>
+#include <Wt/WComboBox>
+
+GWt_elementFit::GWt_elementFit(GWt_elementLigneFaisceau* elemLigne)
+:GWt_abstractElement(new elementFit())
+{
+  elementLigneFaiseauContainer_ = elemLigne;
+  initialize();
+}
+
+void GWt_elementFit::initilializeDialog() 
+{
+  string* param = beginDialog();
+    
+  new WText(" variable to fit : ",dialog_->contents());
+  nameEdit_ = new WComboBox(dialog_->contents());
+  nameEdit_->addItem("R11");
+  nameEdit_->addItem("R22");
+  nameEdit_->addItem("R12");
+  nameEdit_->addItem("R21");
+  nameEdit_->addItem("??");
+  
+  string var = *param;
+  if ( var == "R11" ) {
+    nameEdit_->setCurrentIndex(0);
+  }
+  else if ( var == "R22" ) {
+    nameEdit_->setCurrentIndex(1);
+  }
+  else if ( var == "R12" ) {
+    nameEdit_->setCurrentIndex(2);
+  }
+  else if ( var == "R21" ) {
+    nameEdit_->setCurrentIndex(3);
+  }
+  else {
+    nameEdit_->setCurrentIndex(4);
+  }
+  new WText(" value : ",dialog_->contents());
+  valueEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WText(" tolerance : ",dialog_->contents());
+  tolerEdit_  = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  WPushButton *annule= new WPushButton("cancel",dialog_->contents()); 
+  annule->clicked().connect(dialog_, &Wt::WDialog::reject);
+  WPushButton *submit= new WPushButton("OK",dialog_->contents());
+  submit->clicked().connect(dialog_, &Wt::WDialog::accept);
+  dialog_->finished().connect(this, &GWt_elementFit::dialogDone); 
+}
+
+void GWt_elementFit::dialogDone(WDialog::DialogCode code)
+{
+  if (code != Wt::WDialog::Accepted) return;
+  
+  unsigned nbParam = abstractElement_->getNbParams();
+  string* envoi = new string[nbParam+1];
+  int compteur = -1;
+  
+  envoi[++compteur] = string(mixedTools::intToString(nbParam) );  
+  envoi[++compteur] = labelEdit_->text().toUTF8();
+  string variableString = nameEdit_->currentText().toUTF8();
+  cout << " GWt_elementFit::dialogDone() variable a fitter : " << variableString << endl;
+  envoi[++compteur] = variableString;
+  envoi[++compteur] = valueEdit_->text().toUTF8();
+  envoi[++compteur] = tolerEdit_->text().toUTF8();
+  if ( compteur !=  (int)nbParam ) {
+    cerr << " GWt_elementFit::dialogDone() pb nb de parametres, compteur = " << compteur << " nbParam= " << nbParam << endl;
+    return;
+  }
+  abstractElement_->setParametersString(envoi);
+  updateLabelAndToolTipWidget();
+  delete [] envoi;
+}
+
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementLigneFaisceau.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementLigneFaisceau.cc	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementLigneFaisceau.cc	(revision 437)
@@ -2,16 +2,8 @@
 
 #include "GWt_elementLigneFaisceau.h"
+#include "GWt_abstractElementFactory.h"
 #include "nomdElements.h"
 #include "GWt_console.h"
 #include "abstractElement.h"
-#include "GWt_rfgun.h"
-#include "GWt_drift.h"
-#include "GWt_cell.h"
-#include "GWt_bend.h"
-#include "GWt_soleno.h"
-#include "GWt_beam.h"
-#include "GWt_fit.h"
-#include "GWt_snapshot.h"
-#include "GWt_mpole.h"
 
 
@@ -95,26 +87,26 @@
   switch (  eType ) {
   case nomdElements::RFgun :
-    GWt_abstractElement_ = new GWt_rfgun(this);
+    GWt_abstractElement_ = new GWt_elementRfgun(this);
     break;
   case nomdElements::drift :
-    GWt_abstractElement_ = new GWt_drift(this);
+    GWt_abstractElement_ = new GWt_elementDrift(this);
     break;
   case nomdElements::cell  :
-    GWt_abstractElement_ = new GWt_cell(this);
+    GWt_abstractElement_ = new GWt_elementCell(this);
     break;
   case nomdElements::bend  :
-    GWt_abstractElement_ = new GWt_bend(this);
+    GWt_abstractElement_ = new GWt_elementBend(this);
     break;
   case nomdElements::soleno  :
-    GWt_abstractElement_ = new GWt_soleno(this);
+    GWt_abstractElement_ = new GWt_elementSoleno(this);
     break;
   case nomdElements::beam  :
-    GWt_abstractElement_ = new GWt_beam(this);
+    GWt_abstractElement_ = new GWt_elementBeam(this);
     break;
   case nomdElements::fit  :
-    GWt_abstractElement_ = new GWt_fit(this);
+    GWt_abstractElement_ = new GWt_elementFit(this);
     break;
   case nomdElements::mpole  :
-    GWt_abstractElement_ = new GWt_mpole(this);
+    GWt_abstractElement_ = new GWt_elementMpole(this);
     break;
   case nomdElements::snapshot :
@@ -123,5 +115,5 @@
       incr++;
       pspa_->setExtensionFile(incr);
-      GWt_abstractElement_ = new GWt_snapshot(this,incr);
+      GWt_abstractElement_ = new GWt_elementSnapshot(this,incr);
       break;
     }
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementMpole.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementMpole.cc	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementMpole.cc	(revision 437)
@@ -0,0 +1,58 @@
+
+#include "GWt_elementMpole.h"
+#include "mixedTools.h"
+
+#include <Wt/WText>
+#include <Wt/WLineEdit>
+#include <Wt/WBreak>
+#include <Wt/WDialog>
+#include <Wt/WPushButton>
+
+GWt_elementMpole::GWt_elementMpole(GWt_elementLigneFaisceau* elm) : GWt_abstractElement(new elementMultipole())
+{
+  elementLigneFaiseauContainer_ = elm;
+  initialize();
+}
+
+void GWt_elementMpole::initilializeDialog() 
+{
+  string* param = beginDialog();
+  new WText("order : ",dialog_->contents());
+  orderEdit_ = new WLineEdit(param->c_str(),dialog_->contents());
+  new WBreak(dialog_->contents());
+  new WText("component (m^-n) : ",dialog_->contents());
+  componentEdit_ = new WLineEdit((++param)->c_str(),dialog_->contents());
+  new WBreak(dialog_->contents());
+
+  WPushButton *annule= new WPushButton("cancel",dialog_->contents()); 
+  annule->clicked().connect(dialog_, &Wt::WDialog::reject);
+  WPushButton *submit= new WPushButton("OK",dialog_->contents());
+  submit->clicked().connect(dialog_, &Wt::WDialog::accept);
+  dialog_->finished().connect(this, &GWt_elementMpole::dialogDone);
+}
+
+void GWt_elementMpole::dialogDone(WDialog::DialogCode code)
+{
+  if (code != Wt::WDialog::Accepted) return;
+
+  unsigned nbParam = abstractElement_->getNbParams();
+  string* envoi = new string[nbParam+1];
+  int compteur = -1;
+
+  envoi[++compteur] = mixedTools::intToString(nbParam);
+  envoi[++compteur] = labelEdit_->text().toUTF8();
+  envoi[++compteur] = orderEdit_->text().toUTF8();
+  envoi[++compteur] = componentEdit_->text().toUTF8();
+  if ( compteur !=  (int)nbParam ) {
+    cerr << " GWt_elementMpole::dialogDone() : pb dans le nb de parametres, compteur = " << compteur << " nbParam= " << nbParam << endl;
+    return;
+  }
+
+  abstractElement_->setParametersString(envoi);
+  updateLabelAndToolTipWidget();
+  delete [] envoi;
+}
+
+WImage* GWt_elementMpole::getImage() {
+  return image_;
+}
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementRfgun.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementRfgun.cc	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementRfgun.cc	(revision 437)
@@ -0,0 +1,83 @@
+#include "GWt_elementRfgun.h"
+#include "mixedTools.h"
+
+#include <Wt/WText>
+#include <Wt/WLineEdit>
+#include <Wt/WBreak>
+#include <Wt/WDialog>
+#include <Wt/WPushButton>
+
+GWt_elementRfgun::GWt_elementRfgun(GWt_elementLigneFaisceau* elemLigne)
+:GWt_abstractElement(new elementRfgun())
+{
+  elementLigneFaiseauContainer_ = elemLigne;
+  initialize();
+}
+
+void GWt_elementRfgun::initilializeDialog() 
+{
+  string* param = beginDialog();
+    
+  new WText("nr of macroparticles : ",dialog_->contents());
+  nmacropEdit_ = new WLineEdit(param->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+    
+  new WText("sigma_t (ps) : ",dialog_->contents());
+  sigma_tEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  new WText("sigma_r (cm) : ",dialog_->contents());
+  sigma_rEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+    
+  new WText("emittance x (pi.mm.mrad) : ",dialog_->contents());
+  emit_xEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WText("emittance y (pi.mm.mrad) : ",dialog_->contents());
+  emit_yEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  new WText("initial kinetic energy (MeV) : ",dialog_->contents());
+  E_cinEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+    
+  new WText("sigma_Ecin (MeV) : ",dialog_->contents());
+  sigma_EEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+    
+  new WText("total charge in beam (nC) : ",dialog_->contents());
+  totalChargeEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  
+  WPushButton *annule= new WPushButton("cancel",dialog_->contents()); 
+  annule->clicked().connect(dialog_, &Wt::WDialog::reject);
+  WPushButton *submit= new WPushButton("OK",dialog_->contents());
+  submit->clicked().connect(dialog_, &Wt::WDialog::accept);
+  dialog_->finished().connect(this, &GWt_elementRfgun::dialogDone);
+}
+
+void GWt_elementRfgun::dialogDone(WDialog::DialogCode code)
+{
+  if (code != Wt::WDialog::Accepted) return;
+
+  unsigned nbParam = abstractElement_->getNbParams();
+  string* envoi = new string[nbParam+1];
+  int compteur = -1;
+
+  envoi[++compteur] = mixedTools::intToString(nbParam);
+  envoi[++compteur] = labelEdit_->text().toUTF8();
+  envoi[++compteur] = nmacropEdit_->text().toUTF8();
+  envoi[++compteur] = sigma_tEdit_->text().toUTF8();
+  envoi[++compteur] = sigma_rEdit_->text().toUTF8();
+  envoi[++compteur] = emit_xEdit_->text().toUTF8();
+  envoi[++compteur] = emit_yEdit_->text().toUTF8();
+  envoi[++compteur] = E_cinEdit_->text().toUTF8();
+  envoi[++compteur] = sigma_EEdit_->text().toUTF8();
+  envoi[++compteur] = totalChargeEdit_->text().toUTF8();
+  if ( compteur !=  (int)nbParam ) {
+    cerr << " GWt_elementRfgun::dialogDone() pb nb de parametres, compteur = " << compteur << " nbParam= " << nbParam << endl;
+    return;
+  }
+  abstractElement_->setParametersString(envoi);
+  updateLabelAndToolTipWidget();
+  delete [] envoi;
+}
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementSnapshot.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementSnapshot.cc	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementSnapshot.cc	(revision 437)
@@ -0,0 +1,50 @@
+
+#include "GWt_elementSnapshot.h"
+#include "mixedTools.h"
+
+#include <Wt/WText>
+#include <Wt/WBreak>
+#include <Wt/WLineEdit>
+#include <Wt/WDialog>
+#include <Wt/WPushButton>
+
+GWt_elementSnapshot::GWt_elementSnapshot(GWt_elementLigneFaisceau* elemLigne, int num) : GWt_abstractElement(new elementSnapshot(num))
+{
+  elementLigneFaiseauContainer_ = elemLigne;
+  initialize();
+}
+
+void GWt_elementSnapshot::initilializeDialog() 
+{
+  string* param = beginDialog();
+
+  new WText("name of file for snapshot : ",dialog_->contents());
+  snapshotFile_ = new WLineEdit(param->c_str(),dialog_->contents());
+  new WBreak(dialog_->contents());
+
+  WPushButton *annule= new WPushButton("cancel",dialog_->contents()); 
+  annule->clicked().connect(dialog_,&Wt::WDialog::reject);
+  WPushButton *submit= new WPushButton("OK",dialog_->contents());
+  submit->clicked().connect(dialog_,&Wt::WDialog::accept);
+  dialog_->finished().connect(this, &GWt_elementSnapshot::dialogDone);
+}
+
+void GWt_elementSnapshot::dialogDone(WDialog::DialogCode code)
+{
+  if (code != Wt::WDialog::Accepted) return;
+  
+  unsigned nbParam = abstractElement_->getNbParams();
+  string* envoi = new string[nbParam+1];
+  int compteur = -1;
+  
+  envoi[++compteur] = mixedTools::intToString(nbParam);
+  envoi[++compteur] = labelEdit_->text().toUTF8();
+  envoi[++compteur] = snapshotFile_->text().toUTF8();
+  if ( compteur !=  (int)nbParam ) {
+    cerr << " GWt_elementSnapshot::dialogDone() : pb dans le nb de parametres, compteur = " << compteur << " nbParam= " << nbParam << endl;
+    return;
+  }
+
+  abstractElement_->setParametersString(envoi);
+  delete [] envoi;
+}
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementSoleno.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementSoleno.cc	(revision 437)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementSoleno.cc	(revision 437)
@@ -0,0 +1,64 @@
+#include "GWt_elementSoleno.h"
+#include "mixedTools.h"
+
+#include <Wt/WText>
+#include <Wt/WLineEdit>
+#include <Wt/WBreak>
+#include <Wt/WDialog>
+#include <Wt/WPushButton>
+
+GWt_elementSoleno::GWt_elementSoleno(GWt_elementLigneFaisceau* elemLigne)
+:GWt_abstractElement(new elementSoleno())
+{
+  elementLigneFaiseauContainer_ = elemLigne;
+  initialize();
+}
+
+void GWt_elementSoleno::initilializeDialog() 
+{
+  string* param = beginDialog();
+    
+  new WText("length (cm) : ",dialog_->contents());
+  xlengthEdit_ = new WLineEdit( param->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  new WText("aperture (cm) : ",dialog_->contents());
+  apertureEdit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  new WBreak(dialog_->contents());
+  new WText("field (kG) : ",dialog_->contents());
+  B0Edit_ = new WLineEdit( (++param)->c_str(), dialog_->contents());
+  varyB0Edit_ = new WCheckBox(" : may vary ? ", dialog_->contents());
+  varyB0Edit_->setChecked(atoi( (++param)->c_str() ) );
+  new WBreak(dialog_->contents());
+
+  WPushButton *annule= new WPushButton("cancel",dialog_->contents());
+  annule->clicked().connect(dialog_, &Wt::WDialog::reject);
+  WPushButton *submit= new WPushButton("OK",dialog_->contents());
+  submit->clicked().connect(dialog_, &Wt::WDialog::accept);
+  dialog_->finished().connect(this, &GWt_elementSoleno::dialogDone);  
+}
+
+void GWt_elementSoleno::dialogDone(WDialog::DialogCode code)
+{
+  if (code != Wt::WDialog::Accepted) return;
+
+  unsigned nbParam = abstractElement_->getNbParams();
+  string* envoi = new string[nbParam+1];
+  int compteur = -1;
+  
+  envoi[++compteur] = mixedTools::intToString(nbParam);
+  envoi[++compteur] = labelEdit_->text().toUTF8();
+  envoi[++compteur] = xlengthEdit_->text().toUTF8();
+  envoi[++compteur] = apertureEdit_->text().toUTF8();
+  envoi[++compteur] = B0Edit_->text().toUTF8();
+  int varie;
+  if ( varyB0Edit_->checkState() == Checked ) varie = 1;
+  else varie = 0;
+  envoi[++compteur] = mixedTools::intToString(varie);
+  if ( compteur !=  (int)nbParam ) {
+    cerr << " GWt_bend::dialogDone() pb nb de parametres, compteur = " << compteur << " nbParam= " << nbParam << endl;
+    return;
+  }
+  abstractElement_->setParametersString(envoi);
+  updateLabelAndToolTipWidget();
+  delete [] envoi;
+}
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc	(revision 437)
@@ -4,9 +4,4 @@
 #include "GWt_ligneFaisceau.h"
 
-#include "GWt_drift.h"
-#include "GWt_rfgun.h"
-#include "GWt_cell.h"
-#include "GWt_soleno.h"
-#include "GWt_bend.h"
 #include "nomDeLogiciel.h"
 
Index: Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
===================================================================
--- Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc	(revision 436)
+++ Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc	(revision 437)
@@ -4,4 +4,5 @@
 #include "GWt_pspaApplication.h"
 #include "GWt_draggableImage.h"
+#include "GWt_abstractElementFactory.h"
 #include "GWt_serverFileSelector.h"
 #include "particleBeam.h"
