[265] | 1 | #ifndef GWt_elementLigneFaisceau_SEEN |
---|
| 2 | #define GWt_elementLigneFaisceau_SEEN |
---|
[178] | 3 | |
---|
[198] | 4 | #include "GWt_abstractElement.h" |
---|
[248] | 5 | #include "GWt_dropZoneLigneFaisceau.h" |
---|
[292] | 6 | #include "GWt_pspaApplication.h" |
---|
[178] | 7 | |
---|
[198] | 8 | #include <Wt/WContainerWidget> |
---|
| 9 | |
---|
[178] | 10 | using namespace Wt; |
---|
| 11 | |
---|
| 12 | |
---|
[265] | 13 | class GWt_elementLigneFaisceau : public WContainerWidget |
---|
[178] | 14 | { |
---|
[272] | 15 | public : |
---|
| 16 | /** |
---|
[239] | 17 | dropZone element |
---|
[248] | 18 | a drop zone is the basic element for a widget in the ligne faisceau drop zone area |
---|
| 19 | it should be like this : |
---|
[272] | 20 | |
---|
[248] | 21 | +----------+--------+---------+ |
---|
| 22 | | (--->) | ELEM | (-----) | |
---|
| 23 | +----------+--------+---------+ |
---|
| 24 | | NAME | |
---|
| 25 | +----------+--------+---------+ |
---|
| 26 | ELEM : Element representation, draggable object |
---|
| 27 | (----) and (---->) : Droppable zone, contain arrows or line if this element is connected to another |
---|
| 28 | NAME : editable element name |
---|
[272] | 29 | |
---|
| 30 | At first time, the ELEM element is replace by a message. |
---|
| 31 | */ |
---|
| 32 | |
---|
[453] | 33 | GWt_elementLigneFaisceau(PspaApplication*,GWt_ligneFaisceau*); |
---|
| 34 | GWt_elementLigneFaisceau(nomdElements::typedElement,PspaApplication*,GWt_ligneFaisceau*); |
---|
[272] | 35 | |
---|
| 36 | ~GWt_elementLigneFaisceau(); |
---|
| 37 | void addElement(GWt_abstractElement* elem); |
---|
| 38 | |
---|
| 39 | inline WText* getElementName() { |
---|
[305] | 40 | return elementLabel_; |
---|
[272] | 41 | } |
---|
| 42 | |
---|
| 43 | inline WText* getElementIcon() { |
---|
[305] | 44 | return elementLabel_; |
---|
[272] | 45 | } |
---|
| 46 | |
---|
[305] | 47 | void setElementLabel(std::string label); |
---|
[375] | 48 | void update(); |
---|
[272] | 49 | |
---|
[273] | 50 | inline GWt_dropZoneLigneFaisceau* getDropZoneLeft() { |
---|
| 51 | return dropZoneLeft_; |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | inline GWt_dropZoneLigneFaisceau* getDropZoneRight() { |
---|
| 55 | return dropZoneRight_; |
---|
| 56 | } |
---|
| 57 | |
---|
[305] | 58 | inline GWt_abstractElement* getGWt_AbstractElement() { |
---|
| 59 | return GWt_abstractElement_; |
---|
[299] | 60 | } |
---|
[375] | 61 | inline void setSoftwareName(std::string name) { |
---|
| 62 | softwareName_ =new WText(name); |
---|
| 63 | } |
---|
[359] | 64 | |
---|
[265] | 65 | private: |
---|
[272] | 66 | |
---|
| 67 | void removeDone(GWt_abstractElement*); |
---|
| 68 | std::string getElementNumberInBeamLine(nomdElements el); |
---|
[453] | 69 | void initialize_ligneFaisceau(nomdElements::typedElement eType,GWt_ligneFaisceau* ligne); |
---|
[365] | 70 | void mouseWentOut(); |
---|
| 71 | void mouseWentOver(); |
---|
[375] | 72 | void setBGColor(const WColor); |
---|
[272] | 73 | GWt_dialog* messageDropZone_; |
---|
| 74 | WText* firstTimeInsertMessage_; |
---|
| 75 | |
---|
[273] | 76 | GWt_dropZoneLigneFaisceau* dropZoneLeft_; |
---|
| 77 | GWt_dropZoneLigneFaisceau* dropZoneRight_; |
---|
[305] | 78 | WText* elementLabel_; |
---|
[292] | 79 | PspaApplication* pspa_; |
---|
[305] | 80 | GWt_abstractElement* GWt_abstractElement_; |
---|
[359] | 81 | WContainerWidget* elementContainer_; |
---|
[365] | 82 | WText* actionParameters_; |
---|
| 83 | WText* actionTrash_; |
---|
[375] | 84 | WText* softwareName_; |
---|
[178] | 85 | }; |
---|
| 86 | #endif |
---|