diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Wasabi/api/skin/widgets/xuigrid.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Wasabi/api/skin/widgets/xuigrid.h')
-rw-r--r-- | Src/Wasabi/api/skin/widgets/xuigrid.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Src/Wasabi/api/skin/widgets/xuigrid.h b/Src/Wasabi/api/skin/widgets/xuigrid.h new file mode 100644 index 00000000..084c7d4c --- /dev/null +++ b/Src/Wasabi/api/skin/widgets/xuigrid.h @@ -0,0 +1,59 @@ +#ifndef __GRID_H +#define __GRID_H + +#include <api/wnd/wndclass/guiobjwnd.h> +#include <tataki/bitmap/autobitmap.h> +#include <tataki/region/region.h> + +#define GRID_PARENT GuiObjectWnd + +// ----------------------------------------------------------------------- +class Grid : public GRID_PARENT { + + public: + + Grid(); + virtual ~Grid(); + + virtual int onPaint(Canvas *c); + virtual int setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value); + + void setGridImage(const wchar_t *elementname, int what); + virtual void getGridRect(RECT *r) { getClientRect(r); } + + virtual api_region *getRegion() { return ® } + virtual int onInit(); + virtual int onResize(); +protected: + /*static */void CreateXMLParameters(int master_handle); + private: + void doPaint(Canvas *canvas, int dorgn=0); + + enum { + GRID_SETTOPLEFT= 0, + GRID_SETTOP, + GRID_SETTOPRIGHT, + GRID_SETLEFT, + GRID_SETMIDDLE, + GRID_SETRIGHT, + GRID_SETBOTTOMLEFT, + GRID_SETBOTTOM, + GRID_SETBOTTOMRIGHT, + }; + static XMLParamPair params[]; + + int myxuihandle; + + AutoSkinBitmap topleft, top, topright; + AutoSkinBitmap left, middle, right; + AutoSkinBitmap bottomleft, bottom, bottomright; + RegionI reg; +}; + + +// ----------------------------------------------------------------------- +extern const wchar_t GridXuiObjectStr[]; +extern char GridXuiSvcName[]; +class GridXuiSvc : public XuiObjectSvc<Grid, GridXuiObjectStr, GridXuiSvcName> {}; + +#endif |