1
0

xuiwa2slider.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _XUIWA2SLIDER_H
  2. #define _XUIWA2SLIDER_H
  3. #include <api/script/objects/guiobj.h>
  4. #include <api/skin/widgets.h>
  5. #include <api/syscb/callbacks/corecbi.h>
  6. #define WA2SLIDER_PARENT GuiObjectWnd
  7. class Wa2Slider : public WA2SLIDER_PARENT, public CoreCallbackI
  8. {
  9. public:
  10. Wa2Slider();
  11. virtual ~Wa2Slider();
  12. virtual int setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value);
  13. virtual int onInit();
  14. virtual int onPaint(Canvas *canvas);
  15. virtual int corecb_onVolumeChange(int newvol);
  16. virtual int corecb_onPanChange(int newpan);
  17. virtual int corecb_onSeeked(int newpos);
  18. virtual int corecb_onStarted();
  19. virtual int corecb_onStopped();
  20. virtual void timerCallback(int id);
  21. protected:
  22. /*static */void CreateXMLParameters(int master_handle);
  23. private:
  24. int realpos;
  25. StringW images;
  26. SkinBitmap *imagesBitmap;
  27. int spacing;
  28. int action;
  29. static XMLParamPair params[];
  30. int xuihandle;
  31. bool started;
  32. enum {
  33. ACT_NONE = 0,
  34. ACT_VOLUME,
  35. ACT_BALANCE,
  36. ACT_SEEK,
  37. };
  38. enum {
  39. Wa2Slider_TIMER_POS = 1,
  40. };
  41. enum {
  42. WA2SLIDER_IMAGES,
  43. WA2SLIDER_IMAGESSPACING,
  44. WA2SLIDER_SOURCE,
  45. WA2SLIDER_NUMPARAMS,
  46. };
  47. };
  48. // -----------------------------------------------------------------------
  49. extern const wchar_t Wa2SliderXuiObjectStr[];
  50. extern char Wa2SliderXuiSvcName[];
  51. class Wa2SliderXuiSvc : public XuiObjectSvc<Wa2Slider, Wa2SliderXuiObjectStr, Wa2SliderXuiSvcName> {};
  52. #endif