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