AbsoluteLayout.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef ABSOLUTELAYOUT_H_
  2. #define ABSOLUTELAYOUT_H_
  3. #include "Layout.h"
  4. namespace gameplay
  5. {
  6. /**
  7. * Defines a Layout for forms and containers that requires the user
  8. * to specify absolute positions for all contained controls.
  9. */
  10. class AbsoluteLayout : public Layout
  11. {
  12. friend class Form;
  13. friend class Container;
  14. public:
  15. /**
  16. * Get the type of this Layout.
  17. *
  18. * @return Layout::LAYOUT_ABSOLUTE
  19. */
  20. Layout::Type getType();
  21. protected:
  22. /**
  23. * Create an AbsoluteLayout.
  24. *
  25. * @return an AbsoluteLayout object.
  26. */
  27. static AbsoluteLayout* create();
  28. /**
  29. * Update the controls contained by the specified container.
  30. *
  31. * An AbsoluteLayout does nothing to modify the layout of controls.
  32. * It simply calls update() on any control that is dirty.
  33. *
  34. * @param container The container to update.
  35. */
  36. void update(const Container* container);
  37. private:
  38. AbsoluteLayout();
  39. AbsoluteLayout(const AbsoluteLayout& copy);
  40. virtual ~AbsoluteLayout();
  41. };
  42. }
  43. #endif