aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/api/skin/widgets/db/xuiquerydrag.h
blob: 6dad07aeec756c87821a099312bba25ad5ca527e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef __QUERYDRAG_H
#define __QUERYDRAG_H

#include <api/wnd/wndclass/guiobjwnd.h>
#include <tataki/bitmap/autobitmap.h>

class FilenameI;

#define  QUERYDRAG_PARENT GuiObjectWnd 

// -----------------------------------------------------------------------
// Your wnd object class

class QueryDrag : public  QUERYDRAG_PARENT {
  
  public:

    QueryDrag();
    virtual ~QueryDrag();

    virtual int onPaint(Canvas *c); 
    virtual int getPreferences(int what); 
    virtual int onMouseMove(int x, int y);

    virtual int setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value);

    void setImage(const char *elementname);
    void setSource(const char *elementname);
    void onBeginDrag();
    virtual int dragComplete(int success);

  private:

    AutoSkinBitmap image;
    String source;

    FilenameI *fn;

    enum {
       QUERYDRAG_SETIMAGE = 0,
       QUERYDRAG_SETSOURCE,
    };
		static XMLParamPair params[];
    int myxuihandle;
};


// -----------------------------------------------------------------------
extern char QueryDragXuiObjectStr[];
extern char QueryDragXuiSvcName[];
class QueryDragXuiSvc : public XuiObjectSvc<QueryDrag, QueryDragXuiObjectStr, QueryDragXuiSvcName> {};

#endif