FlowLayout.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef FLOWLAYOUT_H_
  2. #define FLOWLAYOUT_H_
  3. #include "Layout.h"
  4. namespace gameplay
  5. {
  6. /**
  7. * Defines a layout that arranges controls in order, left-to-right, row by row.
  8. */
  9. class FlowLayout : public Layout
  10. {
  11. friend class Form;
  12. friend class Container;
  13. public:
  14. /**
  15. * Get the type of this Layout.
  16. *
  17. * @return Layout::LAYOUT_FLOW
  18. */
  19. Layout::Type getType();
  20. protected:
  21. /**
  22. * Create a FlowLayout.
  23. *
  24. * @return A FlowLayout object.
  25. */
  26. static FlowLayout* create();
  27. /**
  28. * Update the controls contained by the specified container.
  29. *
  30. * @param container The container to update.
  31. * @param offset The offset position.
  32. */
  33. void update(const Container* container, const Vector2& offset);
  34. private:
  35. /**
  36. * Constructor.
  37. */
  38. FlowLayout();
  39. /**
  40. * Constructor.
  41. */
  42. FlowLayout(const FlowLayout& copy);
  43. /**
  44. * Destructor.
  45. */
  46. virtual ~FlowLayout();
  47. };
  48. }
  49. #endif