Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2 KiB

  1. /*
  2. * FillLayout
  3. */
  4. #ifndef DUI_FILLLAYOUT_H_INCLUDED
  5. #define DUI_FILLLAYOUT_H_INCLUDED
  6. #pragma once
  7. namespace DirectUI
  8. {
  9. // FillLayout positions
  10. // "Auto (-1)" means stretch to size of parent
  11. // All other layout positions describe a limited type of stretch
  12. // (i.e. "left" means stretch all edges to parent except right edge)
  13. #define FLP_Left 0
  14. #define FLP_Top 1
  15. #define FLP_Right 2
  16. #define FLP_Bottom 3
  17. ////////////////////////////////////////////////////////
  18. // FillLayout
  19. class FillLayout : public Layout
  20. {
  21. public:
  22. static HRESULT Create(int dNumParams, int* pParams, OUT Value** ppValue); // For parser
  23. static HRESULT Create(OUT Layout** ppLayout);
  24. // Layout callbacks
  25. virtual void DoLayout(Element* pec, int dWidth, int dHeight);
  26. virtual SIZE UpdateDesiredSize(Element* pec, int dConstW, int dConstH, Surface* psrf);
  27. virtual Element* GetAdjacent(Element* pec, Element* peFrom, int iNavDir, NavReference const* pnr, bool bKeyableOnly);
  28. FillLayout() { };
  29. void Initialize();
  30. virtual ~FillLayout() { };
  31. private:
  32. RECT rcMargin;
  33. };
  34. } // namespace DirectUI
  35. #endif // DUI_FILLLAYOUT_H_INCLUDED