add ThemeForm,DTForm

This commit is contained in:
2020-10-21 11:44:33 +08:00
parent 917424e784
commit 6dae81ac93
4 changed files with 78 additions and 0 deletions

26
inc/hgl/gui/ThemeForm.h Normal file
View File

@@ -0,0 +1,26 @@
#ifndef HGL_GUI_THEME_FORM_INCLUDE
#define HGL_GUI_THEME_FORM_INCLUDE
#include<hgl/graph/VKRenderTarget.h>
#include<hgl/gui/Form.h>
namespace hgl
{
namespace gui
{
class ThemeForm
{
protected:
Form *form;
hgl::graph::vulkan::RenderTarget *render_target;
public:
ThemeForm(Form *);
void SetRenderTarget(hgl::graph::vulkan::RenderTarget *);
};//class ThemeForm
}//namespace gui
}//namespace hgl
#endif//HGL_GUI_THEME_FORM_INCLUDE

13
src/GUI/DTForm.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include"DTForm.h"
#include<hgl/gui/Form.h>
#include<hgl/graph/VKRenderTarget.h>
namespace hgl
{
namespace gui
{
namespace default_theme
{
}//namespace default_theme
}//namespace gui
}//namespace hgl

27
src/GUI/DTForm.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef HGL_GUI_DEFAULT_THEME_FORM_INCLUDE
#define HGL_GUI_DEFAULT_THEME_FORM_INCLUDE
#include<hgl/gui/ThemeForm.h>
#include<hgl/graph/VK.h>
using namespace hgl::graph;
namespace hgl
{
namespace gui
{
class Form;
namespace default_theme
{
class DTForm:public ThemeForm
{
public:
DTForm(Form *f):ThemeForm(f){}
~DTForm()=default;
};//class DTForm
}//namespace default_theme
}//namespace gui
}//namespace hgl
#endif//HGL_GUI_DEFAULT_THEME_FORM_INCLUDE

12
src/GUI/ThemeForm.cpp Normal file
View File

@@ -0,0 +1,12 @@
#include<hgl/gui/ThemeForm.h>
namespace hgl
{
namespace gui
{
namespace
{
constexpr VkFormat FORM_RT_PIXEL_FORMAT=UFMT_RGBA8;
}//namespace
}//namespace gui
}//namespace hgl