#ifndef GWT_abstractElement_SEEN #define GWT_abstractElement_SEEN #include "GWt_draggableImage.h" #include "GWt_console.h" #include "abstractElement.h" #include "elementDrift.h" #include "elementRfgun.h" #include "elementCell.h" #include "elementSoleno.h" #include "elementBend.h" #include "elementBeam.h" #include "elementFit.h" #include "elementSnapshot.h" #include "elementMultipole.h" #include #include #include #include #include #include using namespace Wt; using namespace std; using namespace boost; class GWt_elementLigneFaisceau; // defined to ensure that the boost::variant could return something even when there is nothing class NullType {}; class GWt_abstractElement : public WContainerWidget { protected : abstractElement* abstractElement_; WDialog* dialog_; GWt_draggableImage* dropped_; WContainerWidget* wc_; WText* wc_item_; WLineEdit* labelEdit_; GWt_abstractElement() {;} string* beginDialog(); public : GWt_abstractElement(abstractElement*); void initialize(); void showParameters(); void deleteElement(); void updateLabelAndToolTipWidget(); void FileInput(ifstream& ifs); WContainerWidget* getWidget(); abstractElement* getAbstractElement(); inline WString print() { return abstractElement_->print(); } virtual void dialogDone(WDialog::DialogCode code) = 0; virtual string getMimeType() = 0; virtual string getSmallImageURL() = 0; virtual string getBigImageURL() = 0; virtual string getName() = 0; virtual void initilializeDialog() = 0; void createDragImage(WContainerWidget*); WImage* getImage(); protected: WImage* image_; GWt_elementLigneFaisceau* elementLigneFaiseauContainer_; // Nom, type de parametre std::map > parameterMapValue; std::map parameterMapDescription; inline void registerParam(string name, variant value, string desc) { parameterMapValue[name] = value; parameterMapDescription[name] = desc; } variant getParamValue(string); string getParamDescription(string); }; #endif