1
0

xuiquerydrag.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef __QUERYDRAG_H
  2. #define __QUERYDRAG_H
  3. #include <api/wnd/wndclass/guiobjwnd.h>
  4. #include <tataki/bitmap/autobitmap.h>
  5. class FilenameI;
  6. #define QUERYDRAG_PARENT GuiObjectWnd
  7. // -----------------------------------------------------------------------
  8. // Your wnd object class
  9. class QueryDrag : public QUERYDRAG_PARENT {
  10. public:
  11. QueryDrag();
  12. virtual ~QueryDrag();
  13. virtual int onPaint(Canvas *c);
  14. virtual int getPreferences(int what);
  15. virtual int onMouseMove(int x, int y);
  16. virtual int setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value);
  17. void setImage(const char *elementname);
  18. void setSource(const char *elementname);
  19. void onBeginDrag();
  20. virtual int dragComplete(int success);
  21. private:
  22. AutoSkinBitmap image;
  23. String source;
  24. FilenameI *fn;
  25. enum {
  26. QUERYDRAG_SETIMAGE = 0,
  27. QUERYDRAG_SETSOURCE,
  28. };
  29. static XMLParamPair params[];
  30. int myxuihandle;
  31. };
  32. // -----------------------------------------------------------------------
  33. extern char QueryDragXuiObjectStr[];
  34. extern char QueryDragXuiSvcName[];
  35. class QueryDragXuiSvc : public XuiObjectSvc<QueryDrag, QueryDragXuiObjectStr, QueryDragXuiSvcName> {};
  36. #endif