1 | #ifndef GWt_elementLigneFaisceau_SEEN |
---|
2 | #define GWt_elementLigneFaisceau_SEEN |
---|
3 | |
---|
4 | #include "abstractElement.h" |
---|
5 | #include "GWt_abstractElement.h" |
---|
6 | #include "GWt_dropZoneLigneFaisceau.h" |
---|
7 | #include "GWt_pspaApplication.h" |
---|
8 | |
---|
9 | #include <Wt/WContainerWidget> |
---|
10 | |
---|
11 | using namespace Wt; |
---|
12 | |
---|
13 | |
---|
14 | class GWt_elementLigneFaisceau : public WContainerWidget |
---|
15 | { |
---|
16 | public : |
---|
17 | /** |
---|
18 | dropZone element |
---|
19 | a drop zone is the basic element for a widget in the ligne faisceau drop zone area |
---|
20 | it should be like this : |
---|
21 | |
---|
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 |
---|
30 | |
---|
31 | At first time, the ELEM element is replace by a message. |
---|
32 | */ |
---|
33 | |
---|
34 | GWt_elementLigneFaisceau(PspaApplication*); |
---|
35 | GWt_elementLigneFaisceau(typedElement,PspaApplication*); |
---|
36 | |
---|
37 | ~GWt_elementLigneFaisceau(); |
---|
38 | void addElement(GWt_abstractElement* elem); |
---|
39 | |
---|
40 | inline WText* getElementName() { |
---|
41 | return elementLabel_; |
---|
42 | } |
---|
43 | |
---|
44 | inline WText* getElementIcon() { |
---|
45 | return elementLabel_; |
---|
46 | } |
---|
47 | |
---|
48 | void setElementLabel(std::string label); |
---|
49 | void update(); |
---|
50 | |
---|
51 | inline GWt_dropZoneLigneFaisceau* getDropZoneLeft() { |
---|
52 | return dropZoneLeft_; |
---|
53 | } |
---|
54 | |
---|
55 | inline GWt_dropZoneLigneFaisceau* getDropZoneRight() { |
---|
56 | return dropZoneRight_; |
---|
57 | } |
---|
58 | |
---|
59 | inline GWt_abstractElement* getGWt_AbstractElement() { |
---|
60 | return GWt_abstractElement_; |
---|
61 | } |
---|
62 | inline void setSoftwareName(std::string name) { |
---|
63 | softwareName_ =new WText(name); |
---|
64 | } |
---|
65 | |
---|
66 | private: |
---|
67 | |
---|
68 | void removeDone(GWt_abstractElement*); |
---|
69 | std::string getElementNumberInBeamLine(nomdElements el); |
---|
70 | void initialize_ligneFaisceau(typedElement eType); |
---|
71 | void mouseWentOut(); |
---|
72 | void mouseWentOver(); |
---|
73 | void setBGColor(const WColor); |
---|
74 | GWt_dialog* messageDropZone_; |
---|
75 | WText* firstTimeInsertMessage_; |
---|
76 | |
---|
77 | GWt_dropZoneLigneFaisceau* dropZoneLeft_; |
---|
78 | GWt_dropZoneLigneFaisceau* dropZoneRight_; |
---|
79 | WText* elementLabel_; |
---|
80 | PspaApplication* pspa_; |
---|
81 | GWt_abstractElement* GWt_abstractElement_; |
---|
82 | WContainerWidget* elementContainer_; |
---|
83 | WText* actionParameters_; |
---|
84 | WText* actionTrash_; |
---|
85 | WText* softwareName_; |
---|
86 | }; |
---|
87 | #endif |
---|