1
0

xuirect.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef _XUIRECT_H
  2. #define _XUIRECT_H
  3. #include <api/wnd/wndclass/guiobjwnd.h>
  4. #include <tataki/color/skinclr.h>
  5. #include <tataki/canvas/bltcanvas.h>
  6. #define SCRIPTRECT_PARENT GuiObjectWnd
  7. class ScriptRect : public SCRIPTRECT_PARENT {
  8. public:
  9. static const wchar_t *xuiobject_getXmlTag() { return L"Rect"; }
  10. static const char *xuiobject_getServiceName() { return "Rect XuiObject"; }
  11. ScriptRect();
  12. virtual ~ScriptRect();
  13. virtual int onInit();
  14. virtual int onPaint(Canvas *c);
  15. virtual int setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value);
  16. protected:
  17. /*static */void CreateXMLParameters(int master_handle);
  18. private:
  19. enum {
  20. SCRIPTRECT_SETCOLOR = 0,
  21. SCRIPTRECT_SETFILLED,
  22. SCRIPTRECT_EDGES,
  23. SCRIPTRECT_THICKNESS,
  24. SCRIPTRECT_GAMMAGROUP,
  25. };
  26. static XMLParamPair params[];
  27. void resetPixel();
  28. int myxuihandle;
  29. SkinColor color;
  30. int filled, edges, thickness;
  31. BltCanvas pixel;
  32. };
  33. class ScriptRectXuiSvc : public XuiObjectSvc2<ScriptRect> {};
  34. #endif