BsDockManagerLayout.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsIReflectable.h"
  4. #include "BsRect2I.h"
  5. namespace BansheeEngine
  6. {
  7. class DockManagerLayout : public IReflectable
  8. {
  9. public:
  10. struct Entry
  11. {
  12. public:
  13. Entry();
  14. ~Entry();
  15. static Entry* createLeaf(Entry* parent, UINT32 childIdx,
  16. const Vector<String>& widgetNames);
  17. static Entry* createContainer(Entry* parent, UINT32 childIdx, float splitPosition,
  18. bool horizontalSplit);
  19. Vector<String> widgetNames;
  20. bool isLeaf;
  21. float splitPosition;
  22. bool horizontalSplit;
  23. Entry* children[2];
  24. Entry* parent;
  25. };
  26. public:
  27. ~DockManagerLayout();
  28. Entry& getRootEntry() { return mRootEntry; }
  29. void pruneInvalidLeaves();
  30. private:
  31. Entry mRootEntry;
  32. /************************************************************************/
  33. /* RTTI */
  34. /************************************************************************/
  35. public:
  36. friend class DockManagerLayoutRTTI;
  37. static RTTITypeBase* getRTTIStatic();
  38. virtual RTTITypeBase* getRTTI() const;
  39. };
  40. }