2020-10-14 21:05:30 +08:00
|
|
|
#ifndef HGL_GUI_LAYOUT_INCLUDE
|
|
|
|
#define HGL_GUI_LAYOUT_INCLUDE
|
|
|
|
|
|
|
|
#include<hgl/gui/Widget.h>
|
2024-11-21 01:30:42 +08:00
|
|
|
#include<hgl/type/SortedSet.h>
|
2020-10-14 21:05:30 +08:00
|
|
|
namespace hgl
|
|
|
|
{
|
|
|
|
namespace gui
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* 布局器基础
|
|
|
|
*/
|
|
|
|
class LayoutBase
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
|
2024-11-21 01:30:42 +08:00
|
|
|
SortedSet<Widget *> widgets_set;
|
2020-10-14 21:05:30 +08:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
virtual bool AddWidget(Widget *);
|
|
|
|
virtual bool RemoveWidget(Widget *);
|
|
|
|
};//class LayoutBase
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 布局器
|
|
|
|
*/
|
|
|
|
class Layout:public LayoutBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
};//class Layout:public LayoutBase
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 垂直分布布局器
|
|
|
|
*/
|
|
|
|
class VBoxLayout:public LayoutBase
|
|
|
|
{
|
|
|
|
public:
|
2020-11-03 22:29:32 +08:00
|
|
|
};//class VBoxLayout:public LayoutBase
|
2020-10-14 21:05:30 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 水平分布布局器
|
|
|
|
*/
|
|
|
|
class HBoxLayout:public LayoutBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
};//class HBoxLayout:public LayoutBase
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 网格分布布局器
|
|
|
|
*/
|
|
|
|
class GridLayout:public LayoutBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
};//class GridLayout:public LayoutBase
|
|
|
|
}//namespace gui
|
|
|
|
}//namespace hgl
|
|
|
|
#endif//HGL_GUI_LAYOUT_INCLUDE
|