source: PSPA/Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_draggableImage.cc

Last change on this file was 411, checked in by garnier, 11 years ago

ameliorations graphiques et ajout d'une fonction search dans l'output

File size: 1.7 KB
Line 
1#include "GWt_draggableImage.h"
2
3#include <Wt/WCssDecorationStyle>
4
5
6GWt_draggableImage::GWt_draggableImage(
7                                       const WLink & imageLink,
8                                       const WString & altText,
9                                       WContainerWidget * parent):
10WImage(imageLink,altText,parent)
11{
12    init();
13}
14
15
16GWt_draggableImage::GWt_draggableImage(
17                                       const WLink & imageLink,
18                                       WContainerWidget * parent):
19WImage(imageLink,"Image PSPA",parent)
20{
21    init();
22}
23
24
25GWt_draggableImage::~GWt_draggableImage()
26{
27}
28
29
30void GWt_draggableImage::init(){
31    changeCursorOnMouseOver_ = true;
32   
33    //  setMouseOverDelay(100);
34    mouseWentOver().connect(this, &GWt_draggableImage::mouseOver);
35    mouseWentUp().connect(this, &GWt_draggableImage::mouseUp);
36    mouseWentDown().connect(this, &GWt_draggableImage::mouseDown);
37    mouseWentOut().connect(this, &GWt_draggableImage::mouseOut);
38    mouseDragged().connect(this, &GWt_draggableImage::mouseIsDragged);
39    setStyleClass("draggableIcon");
40
41}
42
43
44void GWt_draggableImage::setChangeCursorOnMouseOver(bool change){
45    changeCursorOnMouseOver_ = change;
46}
47
48
49void GWt_draggableImage::mouseOver(const WMouseEvent& e)
50{
51    if (changeCursorOnMouseOver_) {
52        decorationStyle().setCursor(OpenHandCursor);
53    } else {
54        decorationStyle().setCursor(ArrowCursor);
55    }
56}
57
58void GWt_draggableImage::mouseOut(const WMouseEvent& e)
59{
60    decorationStyle().setCursor(ArrowCursor);
61}
62
63void GWt_draggableImage::mouseIsDragged(const WMouseEvent& e)
64{
65}
66
67void GWt_draggableImage::mouseUp(const WMouseEvent& e)
68{
69}
70
71void GWt_draggableImage::mouseDown(const WMouseEvent& e)
72{
73}
Note: See TracBrowser for help on using the repository browser.