source: PSPA/Interface_Web/trunk/pspaWT/include/GWt_elementLigneFaiseau.h @ 248

Last change on this file since 248 was 248, checked in by garnier, 12 years ago

Grosse modifications pour une meilleur gestion des drag & drop (a terminer)

File size: 1.9 KB
Line 
1#ifndef GWT_ELEMENTLIGNEFAISEAU_SEEN
2#define GWT_ELEMENTLIGNEFAISEAU_SEEN
3
4#include "GWt_dialog.h"
5#include "GWt_pspaApplication.h"
6#include "abstractElement.h"
7#include "GWt_abstractElement.h"
8#include "GWt_dropZoneLigneFaisceau.h"
9
10#include <Wt/WContainerWidget>
11
12using namespace Wt;
13
14
15class GWt_elementLigneFaiseau : public WContainerWidget
16{
17 public : 
18  /**
19     dropZone element
20     a drop zone is the basic element for a widget in the ligne faisceau drop zone area
21     it should be like this :
22
23     +----------+--------+---------+
24     |   (--->) |  ELEM  | (-----) |
25     +----------+--------+---------+
26     |             NAME            |
27     +----------+--------+---------+
28     ELEM : Element representation, draggable object
29     (----) and (---->) : Droppable zone, contain arrows or line if this element is connected to another
30     NAME : editable element name
31
32    At first time, the ELEM element is replace by a message.
33
34    @param pspa : application name
35    @param linkImage : true/false if the drop zone have to display the link image
36    @param showInsertMessage : true/false if it has to display the insertMessage at first step
37   */
38
39  GWt_elementLigneFaiseau();
40  GWt_elementLigneFaiseau(abstractElement*);
41
42  ~GWt_elementLigneFaiseau();
43  void addElement(GWt_abstractElement* elem);
44
45  inline WText* getElementName() {
46    return elementName_;
47  }
48
49  inline WText* getElementIcon() {
50    return elementName_;
51  }
52
53 private:
54
55  void onClick(GWt_abstractElement*);
56  void removeDone(GWt_abstractElement*); 
57  std::string getElementNumberInBeamLine(nomdElements el);
58  void removeOtherDropZone(GWt_elementLigneFaiseau*);
59  void initialize_ligneFaisceau(abstractElement*);
60  PspaApplication* pspa_;
61  GWt_dialog* messageDropZone_;
62  WText* firstTimeInsertMessage_;
63
64  GWt_dropZoneLigneFaisceau* arrowImage_;
65  WContainerWidget* dragElementZone_;
66  GWt_dropZoneLigneFaisceau* lineImage_;
67  WText* elementName_;
68
69  GWt_abstractElement* abstractElement_;
70};
71#endif
Note: See TracBrowser for help on using the repository browser.