1 #pragma once 2 #ifndef GWEN_CONTROLS_PANELLISTPANEL_H 3 #define GWEN_CONTROLS_PANELLISTPANEL_H 4 5 #include "Gwen/Gwen.h" 6 #include "Gwen/Controls/Base.h" 7 8 namespace Gwen 9 { 10 namespace Controls 11 { 12 class GWEN_EXPORT PanelListPanel : public Controls::Base 13 { 14 public: 15 GWEN_CONTROL(PanelListPanel, Controls::Base); 16 17 void Render(Gwen::Skin::Base* skin); 18 void Layout(Skin::Base* skin); 19 20 void DoHorizontalLayout(); 21 void DoVerticalLayout(); 22 IsVerticalLayout()23 bool IsVerticalLayout() { return m_bVertical; } IsHorizontalLayout()24 bool IsHorizontalLayout() { return !m_bVertical; } SetVertical()25 void SetVertical() 26 { 27 m_bVertical = true; 28 Invalidate(); 29 } SetHorizontal()30 void SetHorizontal() 31 { 32 m_bVertical = false; 33 Invalidate(); 34 } 35 SetSizeToChildren(bool bShould)36 void SetSizeToChildren(bool bShould) { m_bSizeToChildren = bShould; } SetControlSpacing(int spacing)37 void SetControlSpacing(int spacing) { m_iControlSpacing = spacing; } SetLineSpacing(int spacing)38 void SetLineSpacing(int spacing) { m_iLineSpacing = spacing; } SetWrapping(bool wrap)39 void SetWrapping(bool wrap) { m_bWrapping = wrap; } 40 41 Gwen::Point GetBiggestChildSize(); 42 43 protected: 44 bool m_bVertical; 45 bool m_bSizeToChildren; 46 int m_iControlSpacing; 47 int m_iLineSpacing; 48 bool m_bWrapping; 49 }; 50 } // namespace Controls 51 } // namespace Gwen 52 #endif 53