BsGUIWindowFrame.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #pragma once
  2. #include "BsPrerequisites.h"
  3. #include "BsGUIElement.h"
  4. #include "BsImageSprite.h"
  5. namespace BansheeEngine
  6. {
  7. class BS_EXPORT GUIWindowFrame : public GUIElement
  8. {
  9. public:
  10. static const CM::String& getGUITypeName();
  11. static GUIWindowFrame* create(GUIWidget& parent, const GUIElementStyle* style = nullptr);
  12. static GUIWindowFrame* create(GUIWidget& parent, const GUILayoutOptions& layoutOptions, const GUIElementStyle* style = nullptr);
  13. protected:
  14. ~GUIWindowFrame();
  15. /**
  16. * @copydoc GUIElement::getNumRenderElements()
  17. */
  18. virtual UINT32 getNumRenderElements() const;
  19. /**
  20. * @copydoc GUIElement::getMaterial()
  21. */
  22. virtual const CM::HMaterial& getMaterial(UINT32 renderElementIdx) const;
  23. /**
  24. * @copydoc GUIElement::getNumQuads()
  25. */
  26. virtual UINT32 getNumQuads(UINT32 renderElementIdx) const;
  27. /**
  28. * @copydoc GUIElement::fillBuffer()
  29. */
  30. virtual void fillBuffer(UINT8* vertices, UINT8* uv, UINT32* indices, UINT32 startingQuad,
  31. UINT32 maxNumQuads, UINT32 vertexStride, UINT32 indexStride, UINT32 renderElementIdx) const;
  32. /**
  33. * @copydoc GUIElement::updateRenderElementsInternal()
  34. */
  35. virtual void updateRenderElementsInternal();
  36. virtual UINT32 _getOptimalWidth() const;
  37. virtual UINT32 _getOptimalHeight() const;
  38. private:
  39. ImageSprite* mImageSprite;
  40. IMAGE_SPRITE_DESC mDesc;
  41. GUIWindowFrame(GUIWidget& parent, const GUIElementStyle* style, const GUILayoutOptions& layoutOptions);
  42. };
  43. }