1
0

snappnt.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef __SNAPPOINT_H
  2. #define __SNAPPOINT_H
  3. #include <bfc/ptrlist.h>
  4. #include <bfc/string/StringW.h>
  5. #include <api/skin/xmlobject.h>
  6. #define SNAPPOINT_XMLPARENT XmlObjectI
  7. class Container;
  8. class Layout;
  9. class SnapPoint;
  10. class ifc_window;
  11. class SnapPoint : public SNAPPOINT_XMLPARENT {
  12. public:
  13. SnapPoint(Layout *l, Container *c);
  14. virtual ~SnapPoint();
  15. virtual int setXmlParam(const wchar_t *name, const wchar_t *strvalue);
  16. virtual void setParentContainer(Container *c);
  17. virtual void setParentLayout(Layout *l);
  18. virtual Container *getParentContainer();
  19. virtual Layout *getParentLayout();
  20. virtual const wchar_t *getId();
  21. virtual int getX();
  22. virtual int getY();
  23. static int match(ifc_window *master, RECT *z, ifc_window *slave, int flag, int *donex, int *doney, int w, int h);
  24. static void removeAll();
  25. private:
  26. int x;
  27. int y;
  28. int relatx;
  29. int relaty;
  30. StringW id;
  31. Container *pcontainer;
  32. Layout *playout;
  33. static PtrList<SnapPoint> points;
  34. static int do_match(SnapPoint *pmast, SnapPoint *pslav, RECT *z, int mask, int *donex, int *doney, int w, int h);
  35. };
  36. #endif