From 6dae81ac936f36254513dea584dd9a97ad2f978a Mon Sep 17 00:00:00 2001 From: hyzboy Date: Wed, 21 Oct 2020 11:44:33 +0800 Subject: [PATCH] add ThemeForm,DTForm --- inc/hgl/gui/ThemeForm.h | 26 ++++++++++++++++++++++++++ src/GUI/DTForm.cpp | 13 +++++++++++++ src/GUI/DTForm.h | 27 +++++++++++++++++++++++++++ src/GUI/ThemeForm.cpp | 12 ++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 inc/hgl/gui/ThemeForm.h create mode 100644 src/GUI/DTForm.cpp create mode 100644 src/GUI/DTForm.h create mode 100644 src/GUI/ThemeForm.cpp diff --git a/inc/hgl/gui/ThemeForm.h b/inc/hgl/gui/ThemeForm.h new file mode 100644 index 00000000..ee4ef54a --- /dev/null +++ b/inc/hgl/gui/ThemeForm.h @@ -0,0 +1,26 @@ +#ifndef HGL_GUI_THEME_FORM_INCLUDE +#define HGL_GUI_THEME_FORM_INCLUDE + +#include +#include + +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 diff --git a/src/GUI/DTForm.cpp b/src/GUI/DTForm.cpp new file mode 100644 index 00000000..7e8d3699 --- /dev/null +++ b/src/GUI/DTForm.cpp @@ -0,0 +1,13 @@ +#include"DTForm.h" +#include +#include + +namespace hgl +{ + namespace gui + { + namespace default_theme + { + }//namespace default_theme + }//namespace gui +}//namespace hgl diff --git a/src/GUI/DTForm.h b/src/GUI/DTForm.h new file mode 100644 index 00000000..e3a2abb1 --- /dev/null +++ b/src/GUI/DTForm.h @@ -0,0 +1,27 @@ +#ifndef HGL_GUI_DEFAULT_THEME_FORM_INCLUDE +#define HGL_GUI_DEFAULT_THEME_FORM_INCLUDE + +#include +#include +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 \ No newline at end of file diff --git a/src/GUI/ThemeForm.cpp b/src/GUI/ThemeForm.cpp new file mode 100644 index 00000000..fc77fc0b --- /dev/null +++ b/src/GUI/ThemeForm.cpp @@ -0,0 +1,12 @@ +#include + +namespace hgl +{ + namespace gui + { + namespace + { + constexpr VkFormat FORM_RT_PIXEL_FORMAT=UFMT_RGBA8; + }//namespace + }//namespace gui +}//namespace hgl \ No newline at end of file