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.

49 lines
1.3 KiB

  1. /*
  2. * RowLayout
  3. */
  4. #ifndef DUI_LAYOUT_ROWLAYOUT_H_INCLUDED
  5. #define DUI_LAYOUT_ROWLAYOUT_H_INCLUDED
  6. #pragma once
  7. namespace DirectUI
  8. {
  9. // No layout positions
  10. ////////////////////////////////////////////////////////
  11. // RowLayout
  12. class RowLayout : public Layout
  13. {
  14. public:
  15. static HRESULT Create(int dNumParams, int* pParams, OUT Value** ppValue); // For parser
  16. static HRESULT Create(int idShare, UINT uXAlign, UINT uYAlign, OUT Layout** ppLayout);
  17. virtual void Attach(Element* pec);
  18. virtual void Detach(Element* pec);
  19. // Layout callbacks
  20. virtual void DoLayout(Element* pec, int cx, int cy);
  21. virtual SIZE UpdateDesiredSize(Element* pec, int cxConstraint, int cyConstraint, Surface* psrf);
  22. virtual Element* GetAdjacent(Element* pec, Element* peFrom, int iNavDir, NavReference const* pnr, bool bKeyableOnly);
  23. RowLayout() { }
  24. static HRESULT InternalCreate(UINT uXAlign, UINT uYAlign, OUT Layout** ppLayout);
  25. void Initialize(UINT uXAlign, UINT uYAlign);
  26. virtual ~RowLayout();
  27. protected:
  28. SIZE _sizeDesired;
  29. BOOL _fRecalc;
  30. DynamicArray<Element*>* _arpeClients;
  31. UINT* _arxCols;
  32. UINT _cCols;
  33. UINT _uXAlign;
  34. UINT _uYAlign;
  35. };
  36. } // namespace DirectUI
  37. #endif // DUI_LAYOUT_ROWLAYOUT_H_INCLUDED