1
0

xuigrid.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef __GRID_H
  2. #define __GRID_H
  3. #include <api/wnd/wndclass/guiobjwnd.h>
  4. #include <tataki/bitmap/autobitmap.h>
  5. #include <tataki/region/region.h>
  6. #define GRID_PARENT GuiObjectWnd
  7. // -----------------------------------------------------------------------
  8. class Grid : public GRID_PARENT {
  9. public:
  10. Grid();
  11. virtual ~Grid();
  12. virtual int onPaint(Canvas *c);
  13. virtual int setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value);
  14. void setGridImage(const wchar_t *elementname, int what);
  15. virtual void getGridRect(RECT *r) { getClientRect(r); }
  16. virtual api_region *getRegion() { return &reg; }
  17. virtual int onInit();
  18. virtual int onResize();
  19. protected:
  20. /*static */void CreateXMLParameters(int master_handle);
  21. private:
  22. void doPaint(Canvas *canvas, int dorgn=0);
  23. enum {
  24. GRID_SETTOPLEFT= 0,
  25. GRID_SETTOP,
  26. GRID_SETTOPRIGHT,
  27. GRID_SETLEFT,
  28. GRID_SETMIDDLE,
  29. GRID_SETRIGHT,
  30. GRID_SETBOTTOMLEFT,
  31. GRID_SETBOTTOM,
  32. GRID_SETBOTTOMRIGHT,
  33. };
  34. static XMLParamPair params[];
  35. int myxuihandle;
  36. AutoSkinBitmap topleft, top, topright;
  37. AutoSkinBitmap left, middle, right;
  38. AutoSkinBitmap bottomleft, bottom, bottomright;
  39. RegionI reg;
  40. };
  41. // -----------------------------------------------------------------------
  42. extern const wchar_t GridXuiObjectStr[];
  43. extern char GridXuiSvcName[];
  44. class GridXuiSvc : public XuiObjectSvc<Grid, GridXuiObjectStr, GridXuiSvcName> {};
  45. #endif