1
0

ChildSizer.h 767 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef NULLSOFT_CHILDSIZERH
  2. #define NULLSOFT_CHILDSIZERH
  3. #include "MediaLibraryInterface.h"
  4. typedef struct
  5. {
  6. int id;
  7. int type; // 0xLTRB
  8. RECT rinfo;
  9. }
  10. ChildWndResizeItem;
  11. enum
  12. {
  13. Stationary = 0x0000,
  14. ResizeBottom = 0x0001,
  15. ResizeRight = 0x0010,
  16. ResizeTop = 0x0100,
  17. ResizeLeft=0x1000,
  18. DockToBottom = 0x0101,
  19. DockToBottomRight = 0x1111,
  20. };
  21. class ChildSizer
  22. {
  23. typedef void (*ChildResizeFunc)(HWND, ChildWndResizeItem*, int);
  24. public:
  25. ChildSizer();
  26. void Init(HWND dlg, ChildWndResizeItem *list, int count);
  27. void Resize(HWND dlg, ChildWndResizeItem *list, int count);
  28. static ChildWndResizeItem *Lookup(int id, ChildWndResizeItem *list, size_t numElements);
  29. ChildResizeFunc childresize_init, childresize_resize;
  30. };
  31. extern ChildSizer childSizer;
  32. #endif