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. * Update the controls contained by the specified container.
  23. *
  24. * @param container The container to update.
  25. * @param offset The offset position.
  26. */
  27. void update(const Container* container, const Vector2& offset);
  28. private:
  29. /**
  30. * Constructor.
  31. */
  32. FlowLayout();
  33. /**
  34. * Constructor.
  35. */
  36. FlowLayout(const FlowLayout& copy);
  37. /**
  38. * Destructor.
  39. */
  40. virtual ~FlowLayout();
  41. /**
  42. * Create a FlowLayout.
  43. *
  44. * @return A FlowLayout object.
  45. */
  46. static FlowLayout* create();
  47. };
  48. }
  49. #endif