move VK source files to up-level folder
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#ifndef HGL_GUI_FORM_INCLUDE
|
||||
#define HGL_GUI_FORM_INCLUDE
|
||||
|
||||
#include<hgl/graph/vulkan/VKPipeline.h>
|
||||
#include<hgl/graph/VKPipeline.h>
|
||||
#include<hgl/gui/Widget.h>
|
||||
namespace hgl
|
||||
{
|
||||
namespace gui
|
||||
@@ -11,18 +12,14 @@ namespace hgl
|
||||
/**
|
||||
* 窗体组件,窗体是承载所有GUI控件的基本装置
|
||||
*/
|
||||
class Form
|
||||
class Form:public Widget
|
||||
{
|
||||
protected: //每个窗体独立一个FBO存在,所以每个窗体会有自己的RenderTarget与pipeline
|
||||
|
||||
struct
|
||||
{
|
||||
vulkan::Pipeline *solid;
|
||||
vulkan::Pipeline *mask;
|
||||
vulkan::Pipeline *alpha;
|
||||
}pipeline;
|
||||
|
||||
public:
|
||||
|
||||
Form(ThemeEngine *te=nullptr):Widget(nullptr,te){}
|
||||
virtual ~Form()=default;
|
||||
};//class Form
|
||||
}//namespace gui
|
||||
}//namespace hgl
|
||||
|
@@ -2,23 +2,37 @@
|
||||
#define HGL_GUI_THEME_ENGINE_INCLUDE
|
||||
|
||||
#include<hgl/type/RectScope.h>
|
||||
#include<hgl/type/Map.h>
|
||||
#include<hgl/gui/ThemeForm.h>
|
||||
namespace hgl
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
class Widget;
|
||||
namespace vulkan
|
||||
{
|
||||
class Device;
|
||||
}//namespace vulkan
|
||||
|
||||
class ThemeEngine
|
||||
{
|
||||
{
|
||||
protected:
|
||||
|
||||
vulkan::Device *device;
|
||||
|
||||
MapObject<Form *,ThemeForm> form_list;
|
||||
|
||||
public:
|
||||
|
||||
ThemeEngine(vulkan::Device *dev){device=dev;}
|
||||
virtual ~ThemeEngine()=default;
|
||||
|
||||
virtual bool Init()=0;
|
||||
virtual void Clear()=0;
|
||||
|
||||
virtual void DrawFrame(const Widget *)=0;
|
||||
//virtual void DrawButton(const Widget *)=0;
|
||||
//virtual void DrawCheckBox(const Widget *)=0;
|
||||
//virtual void DrawRadioBox(const Widget *)=0;
|
||||
|
||||
virtual bool Registry(Form *)=0;
|
||||
virtual void Unregistry(Form *)=0;
|
||||
virtual void Render(Form *)=0;
|
||||
virtual bool Resize(Form *,const uint32_t,const uint32_t);
|
||||
};//class ThemeEngine
|
||||
|
||||
// ThemeEngine *CreateThemeEngine();
|
||||
|
@@ -54,18 +54,8 @@ namespace hgl
|
||||
|
||||
public:
|
||||
|
||||
Widget(Widget *parent=nullptr,ThemeEngine *te=nullptr)
|
||||
{
|
||||
parent_widget=parent;
|
||||
theme_engine=te;
|
||||
|
||||
//默认值
|
||||
visible=false; //不显示
|
||||
recv_event=false; //不接收事件
|
||||
align_bits=0; //不对齐
|
||||
position.Clear();
|
||||
}
|
||||
virtual ~Widget();
|
||||
Widget(Widget *parent=nullptr,ThemeEngine *te=nullptr);
|
||||
virtual ~Widget()=default;
|
||||
|
||||
virtual void Draw(){}
|
||||
};//class Widget
|
||||
|
Reference in New Issue
Block a user