From ee954f7ff0f6b08273f6af738c0ce11e06a5b883 Mon Sep 17 00:00:00 2001 From: vczh Date: Mon, 28 Sep 2015 22:31:10 -0700 Subject: [PATCH] New empty tutorial projects --- Tutorial/Codegen.bat | 17 +++ .../GacUI_Layout/Alignment/Alignment.vcxproj | 101 ++++++++++++++++++ .../Alignment/Alignment.vcxproj.filters | 41 +++++++ Tutorial/GacUI_Layout/Alignment/Main.cpp | 23 ++++ .../GacUI_Layout/Alignment/UI/Codegen.bat | 1 + .../GacUI_Layout/Alignment/UI/Resource.xml | 24 +++++ .../GacUI_Layout/Alignment/UI/Source/Demo.h | 16 +++ .../UI/Source/DemoPartialClasses.cpp | 80 ++++++++++++++ .../Alignment/UI/Source/DemoPartialClasses.h | 74 +++++++++++++ Tutorial/GacUI_Layout/Flow/Flow.vcxproj | 101 ++++++++++++++++++ .../GacUI_Layout/Flow/Flow.vcxproj.filters | 41 +++++++ Tutorial/GacUI_Layout/Flow/Main.cpp | 23 ++++ Tutorial/GacUI_Layout/Flow/UI/Codegen.bat | 1 + Tutorial/GacUI_Layout/Flow/UI/Resource.xml | 24 +++++ Tutorial/GacUI_Layout/Flow/UI/Source/Demo.h | 16 +++ .../Flow/UI/Source/DemoPartialClasses.cpp | 80 ++++++++++++++ .../Flow/UI/Source/DemoPartialClasses.h | 74 +++++++++++++ Tutorial/GacUI_Layout/GacUI_Layout.sln | 78 ++++++++++++++ .../GacUI_Layout/RichTextEmbedding/Main.cpp | 23 ++++ .../RichTextEmbedding.vcxproj | 101 ++++++++++++++++++ .../RichTextEmbedding.vcxproj.filters | 41 +++++++ .../RichTextEmbedding/UI/Codegen.bat | 1 + .../RichTextEmbedding/UI/Resource.xml | 24 +++++ .../RichTextEmbedding/UI/Source/Demo.h | 16 +++ .../UI/Source/DemoPartialClasses.cpp | 80 ++++++++++++++ .../UI/Source/DemoPartialClasses.h | 74 +++++++++++++ Tutorial/GacUI_Layout/Stack/Main.cpp | 23 ++++ Tutorial/GacUI_Layout/Stack/Stack.vcxproj | 101 ++++++++++++++++++ .../GacUI_Layout/Stack/Stack.vcxproj.filters | 41 +++++++ Tutorial/GacUI_Layout/Stack/UI/Codegen.bat | 1 + Tutorial/GacUI_Layout/Stack/UI/Resource.xml | 24 +++++ Tutorial/GacUI_Layout/Stack/UI/Source/Demo.h | 16 +++ .../Stack/UI/Source/DemoPartialClasses.cpp | 80 ++++++++++++++ .../Stack/UI/Source/DemoPartialClasses.h | 74 +++++++++++++ Tutorial/GacUI_Layout/Table/Main.cpp | 23 ++++ Tutorial/GacUI_Layout/Table/Table.vcxproj | 101 ++++++++++++++++++ .../GacUI_Layout/Table/Table.vcxproj.filters | 41 +++++++ Tutorial/GacUI_Layout/Table/UI/Codegen.bat | 1 + Tutorial/GacUI_Layout/Table/UI/Resource.xml | 24 +++++ Tutorial/GacUI_Layout/Table/UI/Source/Demo.h | 16 +++ .../Table/UI/Source/DemoPartialClasses.cpp | 80 ++++++++++++++ .../Table/UI/Source/DemoPartialClasses.h | 74 +++++++++++++ Tutorial/GacUI_Layout/UIRes/Alignment.bin | Bin 0 -> 1857 bytes Tutorial/GacUI_Layout/UIRes/Flow.bin | Bin 0 -> 1837 bytes .../GacUI_Layout/UIRes/RichTextEmbedding.bin | Bin 0 -> 1889 bytes Tutorial/GacUI_Layout/UIRes/Stack.bin | Bin 0 -> 1841 bytes Tutorial/GacUI_Layout/UIRes/Table.bin | Bin 0 -> 1841 bytes 47 files changed, 1895 insertions(+) create mode 100644 Tutorial/GacUI_Layout/Alignment/Alignment.vcxproj create mode 100644 Tutorial/GacUI_Layout/Alignment/Alignment.vcxproj.filters create mode 100644 Tutorial/GacUI_Layout/Alignment/Main.cpp create mode 100644 Tutorial/GacUI_Layout/Alignment/UI/Codegen.bat create mode 100644 Tutorial/GacUI_Layout/Alignment/UI/Resource.xml create mode 100644 Tutorial/GacUI_Layout/Alignment/UI/Source/Demo.h create mode 100644 Tutorial/GacUI_Layout/Alignment/UI/Source/DemoPartialClasses.cpp create mode 100644 Tutorial/GacUI_Layout/Alignment/UI/Source/DemoPartialClasses.h create mode 100644 Tutorial/GacUI_Layout/Flow/Flow.vcxproj create mode 100644 Tutorial/GacUI_Layout/Flow/Flow.vcxproj.filters create mode 100644 Tutorial/GacUI_Layout/Flow/Main.cpp create mode 100644 Tutorial/GacUI_Layout/Flow/UI/Codegen.bat create mode 100644 Tutorial/GacUI_Layout/Flow/UI/Resource.xml create mode 100644 Tutorial/GacUI_Layout/Flow/UI/Source/Demo.h create mode 100644 Tutorial/GacUI_Layout/Flow/UI/Source/DemoPartialClasses.cpp create mode 100644 Tutorial/GacUI_Layout/Flow/UI/Source/DemoPartialClasses.h create mode 100644 Tutorial/GacUI_Layout/GacUI_Layout.sln create mode 100644 Tutorial/GacUI_Layout/RichTextEmbedding/Main.cpp create mode 100644 Tutorial/GacUI_Layout/RichTextEmbedding/RichTextEmbedding.vcxproj create mode 100644 Tutorial/GacUI_Layout/RichTextEmbedding/RichTextEmbedding.vcxproj.filters create mode 100644 Tutorial/GacUI_Layout/RichTextEmbedding/UI/Codegen.bat create mode 100644 Tutorial/GacUI_Layout/RichTextEmbedding/UI/Resource.xml create mode 100644 Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/Demo.h create mode 100644 Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/DemoPartialClasses.cpp create mode 100644 Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/DemoPartialClasses.h create mode 100644 Tutorial/GacUI_Layout/Stack/Main.cpp create mode 100644 Tutorial/GacUI_Layout/Stack/Stack.vcxproj create mode 100644 Tutorial/GacUI_Layout/Stack/Stack.vcxproj.filters create mode 100644 Tutorial/GacUI_Layout/Stack/UI/Codegen.bat create mode 100644 Tutorial/GacUI_Layout/Stack/UI/Resource.xml create mode 100644 Tutorial/GacUI_Layout/Stack/UI/Source/Demo.h create mode 100644 Tutorial/GacUI_Layout/Stack/UI/Source/DemoPartialClasses.cpp create mode 100644 Tutorial/GacUI_Layout/Stack/UI/Source/DemoPartialClasses.h create mode 100644 Tutorial/GacUI_Layout/Table/Main.cpp create mode 100644 Tutorial/GacUI_Layout/Table/Table.vcxproj create mode 100644 Tutorial/GacUI_Layout/Table/Table.vcxproj.filters create mode 100644 Tutorial/GacUI_Layout/Table/UI/Codegen.bat create mode 100644 Tutorial/GacUI_Layout/Table/UI/Resource.xml create mode 100644 Tutorial/GacUI_Layout/Table/UI/Source/Demo.h create mode 100644 Tutorial/GacUI_Layout/Table/UI/Source/DemoPartialClasses.cpp create mode 100644 Tutorial/GacUI_Layout/Table/UI/Source/DemoPartialClasses.h create mode 100644 Tutorial/GacUI_Layout/UIRes/Alignment.bin create mode 100644 Tutorial/GacUI_Layout/UIRes/Flow.bin create mode 100644 Tutorial/GacUI_Layout/UIRes/RichTextEmbedding.bin create mode 100644 Tutorial/GacUI_Layout/UIRes/Stack.bin create mode 100644 Tutorial/GacUI_Layout/UIRes/Table.bin diff --git a/Tutorial/Codegen.bat b/Tutorial/Codegen.bat index c1fd42bc..3e99be70 100644 --- a/Tutorial/Codegen.bat +++ b/Tutorial/Codegen.bat @@ -5,4 +5,21 @@ popd pushd MVVM\UI call Codegen.bat popd +popd +pushd GacUI_Layout +pushd Alignment\UI +call Codegen.bat +popd +pushd Stack\UI +call Codegen.bat +popd +pushd Table\UI +call Codegen.bat +popd +pushd Flow\UI +call Codegen.bat +popd +pushd RichTextEmbedding\UI +call Codegen.bat +popd popd \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Alignment/Alignment.vcxproj b/Tutorial/GacUI_Layout/Alignment/Alignment.vcxproj new file mode 100644 index 00000000..763cfcca --- /dev/null +++ b/Tutorial/GacUI_Layout/Alignment/Alignment.vcxproj @@ -0,0 +1,101 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {5250F07C-55C7-45F6-91E0-438792FB28DC} + Win32Proj + Alignment + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + true + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + false + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + {8018d622-66ba-4e65-9d03-bdac37ea9a54} + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Alignment/Alignment.vcxproj.filters b/Tutorial/GacUI_Layout/Alignment/Alignment.vcxproj.filters new file mode 100644 index 00000000..a3720b1c --- /dev/null +++ b/Tutorial/GacUI_Layout/Alignment/Alignment.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {3b2d74b3-5741-45f8-bee8-c446859c9765} + + + + + Source Files + + + UI + + + + + Resource Files + + + + + UI + + + UI + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Alignment/Main.cpp b/Tutorial/GacUI_Layout/Alignment/Main.cpp new file mode 100644 index 00000000..b7c4a9c3 --- /dev/null +++ b/Tutorial/GacUI_Layout/Alignment/Main.cpp @@ -0,0 +1,23 @@ +#include "UI/Source/Demo.h" +#include + +using namespace vl::collections; +using namespace vl::stream; + +int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow) +{ + return SetupWindowsDirect2DRenderer(); +} + +void GuiMain() +{ + { + List errors; + FileStream fileStream(L"../UIRes/Alignment.bin", FileStream::ReadOnly); + auto resource = GuiResource::LoadPrecompiledBinary(fileStream, errors); + GetInstanceLoaderManager()->SetResource(L"Resource", resource); + } + demo::MainWindow window; + window.MoveToScreenCenter(); + GetApplication()->Run(&window); +} \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Alignment/UI/Codegen.bat b/Tutorial/GacUI_Layout/Alignment/UI/Codegen.bat new file mode 100644 index 00000000..27f6654b --- /dev/null +++ b/Tutorial/GacUI_Layout/Alignment/UI/Codegen.bat @@ -0,0 +1 @@ +..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Alignment/UI/Resource.xml b/Tutorial/GacUI_Layout/Alignment/UI/Resource.xml new file mode 100644 index 00000000..9c47c43d --- /dev/null +++ b/Tutorial/GacUI_Layout/Alignment/UI/Resource.xml @@ -0,0 +1,24 @@ + + + + + Source + GacUIReflection.h + Demo + + + + ..\..\UIRes + Alignment.bin + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Alignment/UI/Source/Demo.h b/Tutorial/GacUI_Layout/Alignment/UI/Source/Demo.h new file mode 100644 index 00000000..febeba0f --- /dev/null +++ b/Tutorial/GacUI_Layout/Alignment/UI/Source/Demo.h @@ -0,0 +1,16 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Demo + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo +#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo + +#include "DemoPartialClasses.h" + +#endif diff --git a/Tutorial/GacUI_Layout/Alignment/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Layout/Alignment/UI/Source/DemoPartialClasses.cpp new file mode 100644 index 00000000..aa0483a1 --- /dev/null +++ b/Tutorial/GacUI_Layout/Alignment/UI/Source/DemoPartialClasses.cpp @@ -0,0 +1,80 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Partial Classes + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#include "Demo.h" + +namespace demo +{ + // #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.) + + // #endregion CLASS_MEMBER_GUIEVENT_HANDLER + + MainWindow::MainWindow() + { + InitializeComponents(); + } + + MainWindow::~MainWindow() + { + ClearSubscriptions(); + } +} + + +namespace vl +{ + namespace reflection + { + namespace description + { + #define _ , + IMPL_CPP_TYPE_INFO(demo::MainWindow) + + BEGIN_CLASS_MEMBER(demo::MainWindow) + CLASS_MEMBER_BASE(vl::presentation::controls::GuiWindow) + CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(demo::MainWindow) + + #undef _ + + class DemoResourceLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(demo::MainWindow) + } + + void Unload(ITypeManager* manager) + { + } + }; + + class DemoResourcePlugin : public Object, public vl::presentation::controls::IGuiPlugin + { + public: + void Load()override + { + GetGlobalTypeManager()->AddTypeLoader(new DemoResourceLoader); + } + + void AfterLoad()override + { + } + + void Unload()override + { + } + }; + GUI_REGISTER_PLUGIN(DemoResourcePlugin) + } + } +} + diff --git a/Tutorial/GacUI_Layout/Alignment/UI/Source/DemoPartialClasses.h b/Tutorial/GacUI_Layout/Alignment/UI/Source/DemoPartialClasses.h new file mode 100644 index 00000000..8088a85f --- /dev/null +++ b/Tutorial/GacUI_Layout/Alignment/UI/Source/DemoPartialClasses.h @@ -0,0 +1,74 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Partial Classes + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES +#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES + +#include "GacUIReflection.h" + +namespace demo +{ + class MainWindow; + + template + class MainWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass, public vl::reflection::Description + { + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + private: + protected: + + void InitializeComponents() + { + if (InitializeFromResource()) + { + } + else + { + } + } + public: + MainWindow_() + :vl::presentation::GuiInstancePartialClass(L"demo::MainWindow") + ,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle()) + { + } + }; + +} +namespace vl +{ + namespace reflection + { + namespace description + { + DECL_TYPE_INFO(demo::MainWindow) + + } + } +} +namespace demo +{ + class MainWindow : public demo::MainWindow_ + { + friend class demo::MainWindow_; + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + protected: + + // #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.) + // #endregion CLASS_MEMBER_GUIEVENT_HANDLER + public: + MainWindow(); + ~MainWindow(); + }; +} + + + +#endif diff --git a/Tutorial/GacUI_Layout/Flow/Flow.vcxproj b/Tutorial/GacUI_Layout/Flow/Flow.vcxproj new file mode 100644 index 00000000..f634ae55 --- /dev/null +++ b/Tutorial/GacUI_Layout/Flow/Flow.vcxproj @@ -0,0 +1,101 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {FAFF902E-3CB1-4898-A613-3B47869BB38F} + Win32Proj + Flow + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + true + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + false + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + {8018d622-66ba-4e65-9d03-bdac37ea9a54} + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Flow/Flow.vcxproj.filters b/Tutorial/GacUI_Layout/Flow/Flow.vcxproj.filters new file mode 100644 index 00000000..7a3e60fe --- /dev/null +++ b/Tutorial/GacUI_Layout/Flow/Flow.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {e49c5ffa-71dd-4d5a-bc93-08f5b9aef3db} + + + + + Source Files + + + UI + + + + + Resource Files + + + + + UI + + + UI + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Flow/Main.cpp b/Tutorial/GacUI_Layout/Flow/Main.cpp new file mode 100644 index 00000000..df5af983 --- /dev/null +++ b/Tutorial/GacUI_Layout/Flow/Main.cpp @@ -0,0 +1,23 @@ +#include "UI/Source/Demo.h" +#include + +using namespace vl::collections; +using namespace vl::stream; + +int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow) +{ + return SetupWindowsDirect2DRenderer(); +} + +void GuiMain() +{ + { + List errors; + FileStream fileStream(L"../UIRes/Flow.bin", FileStream::ReadOnly); + auto resource = GuiResource::LoadPrecompiledBinary(fileStream, errors); + GetInstanceLoaderManager()->SetResource(L"Resource", resource); + } + demo::MainWindow window; + window.MoveToScreenCenter(); + GetApplication()->Run(&window); +} \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Flow/UI/Codegen.bat b/Tutorial/GacUI_Layout/Flow/UI/Codegen.bat new file mode 100644 index 00000000..27f6654b --- /dev/null +++ b/Tutorial/GacUI_Layout/Flow/UI/Codegen.bat @@ -0,0 +1 @@ +..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Flow/UI/Resource.xml b/Tutorial/GacUI_Layout/Flow/UI/Resource.xml new file mode 100644 index 00000000..b3dd67cf --- /dev/null +++ b/Tutorial/GacUI_Layout/Flow/UI/Resource.xml @@ -0,0 +1,24 @@ + + + + + Source + GacUIReflection.h + Demo + + + + ..\..\UIRes + Flow.bin + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Flow/UI/Source/Demo.h b/Tutorial/GacUI_Layout/Flow/UI/Source/Demo.h new file mode 100644 index 00000000..febeba0f --- /dev/null +++ b/Tutorial/GacUI_Layout/Flow/UI/Source/Demo.h @@ -0,0 +1,16 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Demo + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo +#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo + +#include "DemoPartialClasses.h" + +#endif diff --git a/Tutorial/GacUI_Layout/Flow/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Layout/Flow/UI/Source/DemoPartialClasses.cpp new file mode 100644 index 00000000..aa0483a1 --- /dev/null +++ b/Tutorial/GacUI_Layout/Flow/UI/Source/DemoPartialClasses.cpp @@ -0,0 +1,80 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Partial Classes + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#include "Demo.h" + +namespace demo +{ + // #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.) + + // #endregion CLASS_MEMBER_GUIEVENT_HANDLER + + MainWindow::MainWindow() + { + InitializeComponents(); + } + + MainWindow::~MainWindow() + { + ClearSubscriptions(); + } +} + + +namespace vl +{ + namespace reflection + { + namespace description + { + #define _ , + IMPL_CPP_TYPE_INFO(demo::MainWindow) + + BEGIN_CLASS_MEMBER(demo::MainWindow) + CLASS_MEMBER_BASE(vl::presentation::controls::GuiWindow) + CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(demo::MainWindow) + + #undef _ + + class DemoResourceLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(demo::MainWindow) + } + + void Unload(ITypeManager* manager) + { + } + }; + + class DemoResourcePlugin : public Object, public vl::presentation::controls::IGuiPlugin + { + public: + void Load()override + { + GetGlobalTypeManager()->AddTypeLoader(new DemoResourceLoader); + } + + void AfterLoad()override + { + } + + void Unload()override + { + } + }; + GUI_REGISTER_PLUGIN(DemoResourcePlugin) + } + } +} + diff --git a/Tutorial/GacUI_Layout/Flow/UI/Source/DemoPartialClasses.h b/Tutorial/GacUI_Layout/Flow/UI/Source/DemoPartialClasses.h new file mode 100644 index 00000000..8088a85f --- /dev/null +++ b/Tutorial/GacUI_Layout/Flow/UI/Source/DemoPartialClasses.h @@ -0,0 +1,74 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Partial Classes + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES +#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES + +#include "GacUIReflection.h" + +namespace demo +{ + class MainWindow; + + template + class MainWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass, public vl::reflection::Description + { + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + private: + protected: + + void InitializeComponents() + { + if (InitializeFromResource()) + { + } + else + { + } + } + public: + MainWindow_() + :vl::presentation::GuiInstancePartialClass(L"demo::MainWindow") + ,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle()) + { + } + }; + +} +namespace vl +{ + namespace reflection + { + namespace description + { + DECL_TYPE_INFO(demo::MainWindow) + + } + } +} +namespace demo +{ + class MainWindow : public demo::MainWindow_ + { + friend class demo::MainWindow_; + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + protected: + + // #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.) + // #endregion CLASS_MEMBER_GUIEVENT_HANDLER + public: + MainWindow(); + ~MainWindow(); + }; +} + + + +#endif diff --git a/Tutorial/GacUI_Layout/GacUI_Layout.sln b/Tutorial/GacUI_Layout/GacUI_Layout.sln new file mode 100644 index 00000000..eecaa9aa --- /dev/null +++ b/Tutorial/GacUI_Layout/GacUI_Layout.sln @@ -0,0 +1,78 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Alignment", "Alignment\Alignment.vcxproj", "{5250F07C-55C7-45F6-91E0-438792FB28DC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{31A1319F-F666-4586-940C-7A05E56C9A59}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Vlpp", "..\Lib\Vlpp\Vlpp.vcxproj", "{F081AD61-FE91-4044-B667-F83586D7CC5B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Workflow", "..\Lib\Workflow\Workflow.vcxproj", "{0EE1EA52-8ABA-40F3-B431-B7BCF8D6D520}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GacUILite", "..\Lib\GacUILite\GacUILite.vcxproj", "{96C559CA-9718-4BEC-A053-28A0AB6A8CA2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GacUI", "..\Lib\GacUI\GacUI.vcxproj", "{8018D622-66BA-4E65-9D03-BDAC37EA9A54}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stack", "Stack\Stack.vcxproj", "{29B382EC-47FE-4514-89E1-20DAAB2129A3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Table", "Table\Table.vcxproj", "{EB722167-66B6-4F11-809F-2B20FF2357FC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Flow", "Flow\Flow.vcxproj", "{FAFF902E-3CB1-4898-A613-3B47869BB38F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RichTextEmbedding", "RichTextEmbedding\RichTextEmbedding.vcxproj", "{A586B9AF-3C54-4353-9214-F15182C4BFB8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5250F07C-55C7-45F6-91E0-438792FB28DC}.Debug|Win32.ActiveCfg = Debug|Win32 + {5250F07C-55C7-45F6-91E0-438792FB28DC}.Debug|Win32.Build.0 = Debug|Win32 + {5250F07C-55C7-45F6-91E0-438792FB28DC}.Release|Win32.ActiveCfg = Release|Win32 + {5250F07C-55C7-45F6-91E0-438792FB28DC}.Release|Win32.Build.0 = Release|Win32 + {F081AD61-FE91-4044-B667-F83586D7CC5B}.Debug|Win32.ActiveCfg = Debug|Win32 + {F081AD61-FE91-4044-B667-F83586D7CC5B}.Debug|Win32.Build.0 = Debug|Win32 + {F081AD61-FE91-4044-B667-F83586D7CC5B}.Release|Win32.ActiveCfg = Release|Win32 + {F081AD61-FE91-4044-B667-F83586D7CC5B}.Release|Win32.Build.0 = Release|Win32 + {0EE1EA52-8ABA-40F3-B431-B7BCF8D6D520}.Debug|Win32.ActiveCfg = Debug|Win32 + {0EE1EA52-8ABA-40F3-B431-B7BCF8D6D520}.Debug|Win32.Build.0 = Debug|Win32 + {0EE1EA52-8ABA-40F3-B431-B7BCF8D6D520}.Release|Win32.ActiveCfg = Release|Win32 + {0EE1EA52-8ABA-40F3-B431-B7BCF8D6D520}.Release|Win32.Build.0 = Release|Win32 + {96C559CA-9718-4BEC-A053-28A0AB6A8CA2}.Debug|Win32.ActiveCfg = Debug|Win32 + {96C559CA-9718-4BEC-A053-28A0AB6A8CA2}.Debug|Win32.Build.0 = Debug|Win32 + {96C559CA-9718-4BEC-A053-28A0AB6A8CA2}.Release|Win32.ActiveCfg = Release|Win32 + {96C559CA-9718-4BEC-A053-28A0AB6A8CA2}.Release|Win32.Build.0 = Release|Win32 + {8018D622-66BA-4E65-9D03-BDAC37EA9A54}.Debug|Win32.ActiveCfg = Debug|Win32 + {8018D622-66BA-4E65-9D03-BDAC37EA9A54}.Debug|Win32.Build.0 = Debug|Win32 + {8018D622-66BA-4E65-9D03-BDAC37EA9A54}.Release|Win32.ActiveCfg = Release|Win32 + {8018D622-66BA-4E65-9D03-BDAC37EA9A54}.Release|Win32.Build.0 = Release|Win32 + {29B382EC-47FE-4514-89E1-20DAAB2129A3}.Debug|Win32.ActiveCfg = Debug|Win32 + {29B382EC-47FE-4514-89E1-20DAAB2129A3}.Debug|Win32.Build.0 = Debug|Win32 + {29B382EC-47FE-4514-89E1-20DAAB2129A3}.Release|Win32.ActiveCfg = Release|Win32 + {29B382EC-47FE-4514-89E1-20DAAB2129A3}.Release|Win32.Build.0 = Release|Win32 + {EB722167-66B6-4F11-809F-2B20FF2357FC}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB722167-66B6-4F11-809F-2B20FF2357FC}.Debug|Win32.Build.0 = Debug|Win32 + {EB722167-66B6-4F11-809F-2B20FF2357FC}.Release|Win32.ActiveCfg = Release|Win32 + {EB722167-66B6-4F11-809F-2B20FF2357FC}.Release|Win32.Build.0 = Release|Win32 + {FAFF902E-3CB1-4898-A613-3B47869BB38F}.Debug|Win32.ActiveCfg = Debug|Win32 + {FAFF902E-3CB1-4898-A613-3B47869BB38F}.Debug|Win32.Build.0 = Debug|Win32 + {FAFF902E-3CB1-4898-A613-3B47869BB38F}.Release|Win32.ActiveCfg = Release|Win32 + {FAFF902E-3CB1-4898-A613-3B47869BB38F}.Release|Win32.Build.0 = Release|Win32 + {A586B9AF-3C54-4353-9214-F15182C4BFB8}.Debug|Win32.ActiveCfg = Debug|Win32 + {A586B9AF-3C54-4353-9214-F15182C4BFB8}.Debug|Win32.Build.0 = Debug|Win32 + {A586B9AF-3C54-4353-9214-F15182C4BFB8}.Release|Win32.ActiveCfg = Release|Win32 + {A586B9AF-3C54-4353-9214-F15182C4BFB8}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F081AD61-FE91-4044-B667-F83586D7CC5B} = {31A1319F-F666-4586-940C-7A05E56C9A59} + {0EE1EA52-8ABA-40F3-B431-B7BCF8D6D520} = {31A1319F-F666-4586-940C-7A05E56C9A59} + {96C559CA-9718-4BEC-A053-28A0AB6A8CA2} = {31A1319F-F666-4586-940C-7A05E56C9A59} + {8018D622-66BA-4E65-9D03-BDAC37EA9A54} = {31A1319F-F666-4586-940C-7A05E56C9A59} + EndGlobalSection +EndGlobal diff --git a/Tutorial/GacUI_Layout/RichTextEmbedding/Main.cpp b/Tutorial/GacUI_Layout/RichTextEmbedding/Main.cpp new file mode 100644 index 00000000..1d01f21c --- /dev/null +++ b/Tutorial/GacUI_Layout/RichTextEmbedding/Main.cpp @@ -0,0 +1,23 @@ +#include "UI/Source/Demo.h" +#include + +using namespace vl::collections; +using namespace vl::stream; + +int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow) +{ + return SetupWindowsDirect2DRenderer(); +} + +void GuiMain() +{ + { + List errors; + FileStream fileStream(L"../UIRes/RichTextEmbedding.bin", FileStream::ReadOnly); + auto resource = GuiResource::LoadPrecompiledBinary(fileStream, errors); + GetInstanceLoaderManager()->SetResource(L"Resource", resource); + } + demo::MainWindow window; + window.MoveToScreenCenter(); + GetApplication()->Run(&window); +} \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/RichTextEmbedding/RichTextEmbedding.vcxproj b/Tutorial/GacUI_Layout/RichTextEmbedding/RichTextEmbedding.vcxproj new file mode 100644 index 00000000..e8855311 --- /dev/null +++ b/Tutorial/GacUI_Layout/RichTextEmbedding/RichTextEmbedding.vcxproj @@ -0,0 +1,101 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {A586B9AF-3C54-4353-9214-F15182C4BFB8} + Win32Proj + RichTextEmbedding + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + true + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + false + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + {8018d622-66ba-4e65-9d03-bdac37ea9a54} + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/RichTextEmbedding/RichTextEmbedding.vcxproj.filters b/Tutorial/GacUI_Layout/RichTextEmbedding/RichTextEmbedding.vcxproj.filters new file mode 100644 index 00000000..8fbbd77c --- /dev/null +++ b/Tutorial/GacUI_Layout/RichTextEmbedding/RichTextEmbedding.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {1928e74f-7d7d-4fe3-b5cd-e3658bfc16d9} + + + + + Source Files + + + UI + + + + + Resource Files + + + + + UI + + + UI + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Codegen.bat b/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Codegen.bat new file mode 100644 index 00000000..27f6654b --- /dev/null +++ b/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Codegen.bat @@ -0,0 +1 @@ +..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Resource.xml b/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Resource.xml new file mode 100644 index 00000000..baaf0312 --- /dev/null +++ b/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Resource.xml @@ -0,0 +1,24 @@ + + + + + Source + GacUIReflection.h + Demo + + + + ..\..\UIRes + RichTextEmbedding.bin + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/Demo.h b/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/Demo.h new file mode 100644 index 00000000..febeba0f --- /dev/null +++ b/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/Demo.h @@ -0,0 +1,16 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Demo + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo +#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo + +#include "DemoPartialClasses.h" + +#endif diff --git a/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/DemoPartialClasses.cpp new file mode 100644 index 00000000..aa0483a1 --- /dev/null +++ b/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/DemoPartialClasses.cpp @@ -0,0 +1,80 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Partial Classes + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#include "Demo.h" + +namespace demo +{ + // #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.) + + // #endregion CLASS_MEMBER_GUIEVENT_HANDLER + + MainWindow::MainWindow() + { + InitializeComponents(); + } + + MainWindow::~MainWindow() + { + ClearSubscriptions(); + } +} + + +namespace vl +{ + namespace reflection + { + namespace description + { + #define _ , + IMPL_CPP_TYPE_INFO(demo::MainWindow) + + BEGIN_CLASS_MEMBER(demo::MainWindow) + CLASS_MEMBER_BASE(vl::presentation::controls::GuiWindow) + CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(demo::MainWindow) + + #undef _ + + class DemoResourceLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(demo::MainWindow) + } + + void Unload(ITypeManager* manager) + { + } + }; + + class DemoResourcePlugin : public Object, public vl::presentation::controls::IGuiPlugin + { + public: + void Load()override + { + GetGlobalTypeManager()->AddTypeLoader(new DemoResourceLoader); + } + + void AfterLoad()override + { + } + + void Unload()override + { + } + }; + GUI_REGISTER_PLUGIN(DemoResourcePlugin) + } + } +} + diff --git a/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/DemoPartialClasses.h b/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/DemoPartialClasses.h new file mode 100644 index 00000000..8088a85f --- /dev/null +++ b/Tutorial/GacUI_Layout/RichTextEmbedding/UI/Source/DemoPartialClasses.h @@ -0,0 +1,74 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Partial Classes + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES +#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES + +#include "GacUIReflection.h" + +namespace demo +{ + class MainWindow; + + template + class MainWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass, public vl::reflection::Description + { + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + private: + protected: + + void InitializeComponents() + { + if (InitializeFromResource()) + { + } + else + { + } + } + public: + MainWindow_() + :vl::presentation::GuiInstancePartialClass(L"demo::MainWindow") + ,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle()) + { + } + }; + +} +namespace vl +{ + namespace reflection + { + namespace description + { + DECL_TYPE_INFO(demo::MainWindow) + + } + } +} +namespace demo +{ + class MainWindow : public demo::MainWindow_ + { + friend class demo::MainWindow_; + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + protected: + + // #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.) + // #endregion CLASS_MEMBER_GUIEVENT_HANDLER + public: + MainWindow(); + ~MainWindow(); + }; +} + + + +#endif diff --git a/Tutorial/GacUI_Layout/Stack/Main.cpp b/Tutorial/GacUI_Layout/Stack/Main.cpp new file mode 100644 index 00000000..8bd7cb12 --- /dev/null +++ b/Tutorial/GacUI_Layout/Stack/Main.cpp @@ -0,0 +1,23 @@ +#include "UI/Source/Demo.h" +#include + +using namespace vl::collections; +using namespace vl::stream; + +int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow) +{ + return SetupWindowsDirect2DRenderer(); +} + +void GuiMain() +{ + { + List errors; + FileStream fileStream(L"../UIRes/Stack.bin", FileStream::ReadOnly); + auto resource = GuiResource::LoadPrecompiledBinary(fileStream, errors); + GetInstanceLoaderManager()->SetResource(L"Resource", resource); + } + demo::MainWindow window; + window.MoveToScreenCenter(); + GetApplication()->Run(&window); +} \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Stack/Stack.vcxproj b/Tutorial/GacUI_Layout/Stack/Stack.vcxproj new file mode 100644 index 00000000..086862bc --- /dev/null +++ b/Tutorial/GacUI_Layout/Stack/Stack.vcxproj @@ -0,0 +1,101 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {29B382EC-47FE-4514-89E1-20DAAB2129A3} + Win32Proj + Stack + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + true + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + false + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + {8018d622-66ba-4e65-9d03-bdac37ea9a54} + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Stack/Stack.vcxproj.filters b/Tutorial/GacUI_Layout/Stack/Stack.vcxproj.filters new file mode 100644 index 00000000..40896e75 --- /dev/null +++ b/Tutorial/GacUI_Layout/Stack/Stack.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {d2fc84d7-e26c-4107-a97f-f4ac59acf4d7} + + + + + Source Files + + + UI + + + + + Resource Files + + + + + UI + + + UI + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Stack/UI/Codegen.bat b/Tutorial/GacUI_Layout/Stack/UI/Codegen.bat new file mode 100644 index 00000000..27f6654b --- /dev/null +++ b/Tutorial/GacUI_Layout/Stack/UI/Codegen.bat @@ -0,0 +1 @@ +..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Stack/UI/Resource.xml b/Tutorial/GacUI_Layout/Stack/UI/Resource.xml new file mode 100644 index 00000000..87c2537d --- /dev/null +++ b/Tutorial/GacUI_Layout/Stack/UI/Resource.xml @@ -0,0 +1,24 @@ + + + + + Source + GacUIReflection.h + Demo + + + + ..\..\UIRes + Stack.bin + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Stack/UI/Source/Demo.h b/Tutorial/GacUI_Layout/Stack/UI/Source/Demo.h new file mode 100644 index 00000000..febeba0f --- /dev/null +++ b/Tutorial/GacUI_Layout/Stack/UI/Source/Demo.h @@ -0,0 +1,16 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Demo + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo +#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo + +#include "DemoPartialClasses.h" + +#endif diff --git a/Tutorial/GacUI_Layout/Stack/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Layout/Stack/UI/Source/DemoPartialClasses.cpp new file mode 100644 index 00000000..aa0483a1 --- /dev/null +++ b/Tutorial/GacUI_Layout/Stack/UI/Source/DemoPartialClasses.cpp @@ -0,0 +1,80 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Partial Classes + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#include "Demo.h" + +namespace demo +{ + // #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.) + + // #endregion CLASS_MEMBER_GUIEVENT_HANDLER + + MainWindow::MainWindow() + { + InitializeComponents(); + } + + MainWindow::~MainWindow() + { + ClearSubscriptions(); + } +} + + +namespace vl +{ + namespace reflection + { + namespace description + { + #define _ , + IMPL_CPP_TYPE_INFO(demo::MainWindow) + + BEGIN_CLASS_MEMBER(demo::MainWindow) + CLASS_MEMBER_BASE(vl::presentation::controls::GuiWindow) + CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(demo::MainWindow) + + #undef _ + + class DemoResourceLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(demo::MainWindow) + } + + void Unload(ITypeManager* manager) + { + } + }; + + class DemoResourcePlugin : public Object, public vl::presentation::controls::IGuiPlugin + { + public: + void Load()override + { + GetGlobalTypeManager()->AddTypeLoader(new DemoResourceLoader); + } + + void AfterLoad()override + { + } + + void Unload()override + { + } + }; + GUI_REGISTER_PLUGIN(DemoResourcePlugin) + } + } +} + diff --git a/Tutorial/GacUI_Layout/Stack/UI/Source/DemoPartialClasses.h b/Tutorial/GacUI_Layout/Stack/UI/Source/DemoPartialClasses.h new file mode 100644 index 00000000..8088a85f --- /dev/null +++ b/Tutorial/GacUI_Layout/Stack/UI/Source/DemoPartialClasses.h @@ -0,0 +1,74 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Partial Classes + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES +#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES + +#include "GacUIReflection.h" + +namespace demo +{ + class MainWindow; + + template + class MainWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass, public vl::reflection::Description + { + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + private: + protected: + + void InitializeComponents() + { + if (InitializeFromResource()) + { + } + else + { + } + } + public: + MainWindow_() + :vl::presentation::GuiInstancePartialClass(L"demo::MainWindow") + ,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle()) + { + } + }; + +} +namespace vl +{ + namespace reflection + { + namespace description + { + DECL_TYPE_INFO(demo::MainWindow) + + } + } +} +namespace demo +{ + class MainWindow : public demo::MainWindow_ + { + friend class demo::MainWindow_; + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + protected: + + // #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.) + // #endregion CLASS_MEMBER_GUIEVENT_HANDLER + public: + MainWindow(); + ~MainWindow(); + }; +} + + + +#endif diff --git a/Tutorial/GacUI_Layout/Table/Main.cpp b/Tutorial/GacUI_Layout/Table/Main.cpp new file mode 100644 index 00000000..e777c86d --- /dev/null +++ b/Tutorial/GacUI_Layout/Table/Main.cpp @@ -0,0 +1,23 @@ +#include "UI/Source/Demo.h" +#include + +using namespace vl::collections; +using namespace vl::stream; + +int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow) +{ + return SetupWindowsDirect2DRenderer(); +} + +void GuiMain() +{ + { + List errors; + FileStream fileStream(L"../UIRes/Table.bin", FileStream::ReadOnly); + auto resource = GuiResource::LoadPrecompiledBinary(fileStream, errors); + GetInstanceLoaderManager()->SetResource(L"Resource", resource); + } + demo::MainWindow window; + window.MoveToScreenCenter(); + GetApplication()->Run(&window); +} \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Table/Table.vcxproj b/Tutorial/GacUI_Layout/Table/Table.vcxproj new file mode 100644 index 00000000..899bf125 --- /dev/null +++ b/Tutorial/GacUI_Layout/Table/Table.vcxproj @@ -0,0 +1,101 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {EB722167-66B6-4F11-809F-2B20FF2357FC} + Win32Proj + Table + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + true + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + false + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + {8018d622-66ba-4e65-9d03-bdac37ea9a54} + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Table/Table.vcxproj.filters b/Tutorial/GacUI_Layout/Table/Table.vcxproj.filters new file mode 100644 index 00000000..7743eae6 --- /dev/null +++ b/Tutorial/GacUI_Layout/Table/Table.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {e31c015d-47c8-42bb-af59-9f3234970321} + + + + + Source Files + + + UI + + + + + Resource Files + + + + + UI + + + UI + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Table/UI/Codegen.bat b/Tutorial/GacUI_Layout/Table/UI/Codegen.bat new file mode 100644 index 00000000..27f6654b --- /dev/null +++ b/Tutorial/GacUI_Layout/Table/UI/Codegen.bat @@ -0,0 +1 @@ +..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Table/UI/Resource.xml b/Tutorial/GacUI_Layout/Table/UI/Resource.xml new file mode 100644 index 00000000..06536bbc --- /dev/null +++ b/Tutorial/GacUI_Layout/Table/UI/Resource.xml @@ -0,0 +1,24 @@ + + + + + Source + GacUIReflection.h + Demo + + + + ..\..\UIRes + Table.bin + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Layout/Table/UI/Source/Demo.h b/Tutorial/GacUI_Layout/Table/UI/Source/Demo.h new file mode 100644 index 00000000..febeba0f --- /dev/null +++ b/Tutorial/GacUI_Layout/Table/UI/Source/Demo.h @@ -0,0 +1,16 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Demo + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo +#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo + +#include "DemoPartialClasses.h" + +#endif diff --git a/Tutorial/GacUI_Layout/Table/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Layout/Table/UI/Source/DemoPartialClasses.cpp new file mode 100644 index 00000000..aa0483a1 --- /dev/null +++ b/Tutorial/GacUI_Layout/Table/UI/Source/DemoPartialClasses.cpp @@ -0,0 +1,80 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Partial Classes + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#include "Demo.h" + +namespace demo +{ + // #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.) + + // #endregion CLASS_MEMBER_GUIEVENT_HANDLER + + MainWindow::MainWindow() + { + InitializeComponents(); + } + + MainWindow::~MainWindow() + { + ClearSubscriptions(); + } +} + + +namespace vl +{ + namespace reflection + { + namespace description + { + #define _ , + IMPL_CPP_TYPE_INFO(demo::MainWindow) + + BEGIN_CLASS_MEMBER(demo::MainWindow) + CLASS_MEMBER_BASE(vl::presentation::controls::GuiWindow) + CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(demo::MainWindow) + + #undef _ + + class DemoResourceLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(demo::MainWindow) + } + + void Unload(ITypeManager* manager) + { + } + }; + + class DemoResourcePlugin : public Object, public vl::presentation::controls::IGuiPlugin + { + public: + void Load()override + { + GetGlobalTypeManager()->AddTypeLoader(new DemoResourceLoader); + } + + void AfterLoad()override + { + } + + void Unload()override + { + } + }; + GUI_REGISTER_PLUGIN(DemoResourcePlugin) + } + } +} + diff --git a/Tutorial/GacUI_Layout/Table/UI/Source/DemoPartialClasses.h b/Tutorial/GacUI_Layout/Table/UI/Source/DemoPartialClasses.h new file mode 100644 index 00000000..8088a85f --- /dev/null +++ b/Tutorial/GacUI_Layout/Table/UI/Source/DemoPartialClasses.h @@ -0,0 +1,74 @@ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Partial Classes + +This file is generated by: Vczh GacUI Resource Code Generator +************************************************************************ +DO NOT MODIFY +***********************************************************************/ + +#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES +#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES + +#include "GacUIReflection.h" + +namespace demo +{ + class MainWindow; + + template + class MainWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass, public vl::reflection::Description + { + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + private: + protected: + + void InitializeComponents() + { + if (InitializeFromResource()) + { + } + else + { + } + } + public: + MainWindow_() + :vl::presentation::GuiInstancePartialClass(L"demo::MainWindow") + ,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle()) + { + } + }; + +} +namespace vl +{ + namespace reflection + { + namespace description + { + DECL_TYPE_INFO(demo::MainWindow) + + } + } +} +namespace demo +{ + class MainWindow : public demo::MainWindow_ + { + friend class demo::MainWindow_; + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + protected: + + // #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.) + // #endregion CLASS_MEMBER_GUIEVENT_HANDLER + public: + MainWindow(); + ~MainWindow(); + }; +} + + + +#endif diff --git a/Tutorial/GacUI_Layout/UIRes/Alignment.bin b/Tutorial/GacUI_Layout/UIRes/Alignment.bin new file mode 100644 index 0000000000000000000000000000000000000000..8ad771b2e84b72c51f8e9dadc87d48c0c4e171f6 GIT binary patch literal 1857 zcmbuATW`}q5QPurQtqON2M`GO1raJdRC%KTRXlJJ7xBVNNnC0vajV!Bg+CAH8?#N^ zxN#LW+Vy5GXXng}*K3k4d45)=V^zB9{Tmf3z2Eh7Xn7iI-rV%uv1aHsvwolhuY1b% zBh0Y5=sD1#e;_l~JwY96tRs!=xnW6-^TnEvmh4%V*`hKQm_6;|8W`_<;>23;Uimq( z1>=h6dm~mpi5BywaQ{GStYb4-IMIkyxsGft!3u&n3bw|{GjvR zIB^7dFc@juyTTDq^-H&G_0n?kQv`>?arX2*Yyi6M`PSC>e2sNvyq~&YIrHur`a1R* zS8~jNS7}~Vqpon9N9WW*#6=Y=XD!!nd%G7*(73#C8ao#x@P5KT2i|tD++L|zFufc&-B#k?CZHUy}xWtvI3hu6d6f=ws&ne zTk%MP1U&RS3{oVL^z5Ec?>hzxj&$nh*oi^5i@B!`=}$r$~-xH96985Yi5fJr*vhxaIi$nxYr`DU*hI9k?e2Vep$`H zq_)d!W;MLuVcFIJobY%BKQ0H@Cnl?4(2JRW38O3iwjLz@)q5B3u3l(6m8$dMIgfw3 kXq%T&-BI{I@LX2k_FlwOf4I{4F!5<2i)~kOSe{z`0+b{X_5c6? literal 0 HcmV?d00001 diff --git a/Tutorial/GacUI_Layout/UIRes/Flow.bin b/Tutorial/GacUI_Layout/UIRes/Flow.bin new file mode 100644 index 0000000000000000000000000000000000000000..d5b5f2121f4ff382df48490adeb0e3612f74813a GIT binary patch literal 1837 zcmbuAO>fgc5Qc~HDL@Di2M`GO1r-7gD8~kK+N%_&&~LuY4Y)o6US)v_mbxr zgyRzPJs#(r9Q_TOW3;lShlusuNvA%XNcrvQI>t01z*UM zsQ>pZ-3J{J&f)3Vqm)Bmt!B2oTq-K-hg#3({#kPw$A&)J80rK+=-T(jq literal 0 HcmV?d00001 diff --git a/Tutorial/GacUI_Layout/UIRes/RichTextEmbedding.bin b/Tutorial/GacUI_Layout/UIRes/RichTextEmbedding.bin new file mode 100644 index 0000000000000000000000000000000000000000..7e3ed883d288369a31b5fe92f381868bcecc58ed GIT binary patch literal 1889 zcmbuAT~8B16o!xZfl*`BV4~5ezknF^!t|0#h!=hYG~Rdv?Sh-Mg>*|q|GYlWtV3H^ zx}?r#rqem^dC%w0u0+H&=9ehqBqni_{reb2#eSFH9_M+iu(`wBLegU`kay#dbwA2D zNH8&1ncX+wU?#PJb}L!|P(<97(c zafA5@#tF7u{lA0kIL4=*d-j?CS}2Jz553fG75eNr%XXWyb)N74*6eAO&_+=6_OLj_ zgEB?Xj}3MsJRZldcnE5n|2?9~Io<@lhvhzx$OHKI(oW)A%nxWQ`Igo`{6FIg=gtQg z$m>|9v72*;aaLHH%+=XgXW6yd#s3oI2<#5K-|UTYBV}}iw^gdQu^zH7!PT|82P)^d zAa1kWCkkW8OhA$^X~`+iL20HvO}U-2mIXSAPP~b?@iJbJ?oPapSM0AN$tZ2PH)KaX zzgWA*O;sp#N?4dLmS-vNp8Y>TEW6G@wPk=n?1mt$7jl5WmP zpI^e0^W~c5Gz-4O=TZO9ZMaWcJe&}xwg)MPzK-+R@70a|#rgq|;@(dS5(;jkAAp3Kqae^U?Y|MI=7c3UqrS+(kZ pm@cEAFXH*jsqQHCA2S!#x49S9j6Ys+ez^Sfn8l_mIw8+2e*w3o7#siq literal 0 HcmV?d00001 diff --git a/Tutorial/GacUI_Layout/UIRes/Stack.bin b/Tutorial/GacUI_Layout/UIRes/Stack.bin new file mode 100644 index 0000000000000000000000000000000000000000..58ac5d809b45e7c82cf288355ab85dc908059f29 GIT binary patch literal 1841 zcmbuA%We}v5Jijd2rnTLu>gU9FNhGZKwie6hy@Q}5F0jOJb@9m6L}mF_<1;|hmP%J zVn?Q}?rB%ux?Qj7S&N8E%#TsVQB2}0``0mwn*A=%0(l;5Y;H1l&=jmC`flvA?nM>f z5=_iRW;YJ_$?RBX%38!A4x^9d29k#76Pgc5_Ry6eCUD8Q72h>Y9B(;sh*rLrJcl40 zSD5c$oN$(_|9j{TV|?tnviJP=go+sR&`Zy)L!TWd*=``);`im>nmw%(+6Wrnf)j^$ zP^Ad^vCVFT$K&`F*Fg1BE{pg9&)1}r;5zdSD6yZ@+K1<7TtM#JJVW33JdM%ZI*g|# zp2=K2jcJzMQ@i+CfgFMDvHQ*5Xtq=4M%1THbv34a_7%9MCbvQ5T$aRVR{KO@44DZ? z@+B=fwK=HED5vSj?UA)6{3tr{JYK|;cue{_@hqOQ*Dj;vbZ=;mEI-@2!A(~!@-XoG z%!3q+2{bLc$02v{!2&BC^Bj;6Wji!kl}MIZm#HmmUpZ#2E#0d*?W1#ea=I+DoMyq7 z@-*uIxefQh5)UWD>DhynLtn4?YY&iRCZZ-wvDr literal 0 HcmV?d00001 diff --git a/Tutorial/GacUI_Layout/UIRes/Table.bin b/Tutorial/GacUI_Layout/UIRes/Table.bin new file mode 100644 index 0000000000000000000000000000000000000000..f0f877b03e5c61d9185231ea07db085f0077b8f2 GIT binary patch literal 1841 zcmbuAOK%e~6h<%QQC>oTSb#vlFNhGZKv_1RiUkkRA~tMFGKG+2gs7&-c66_N+z375a7*aTL?I&is9hqhh|pyN^7#H72*|n`rus1^Qm>G44hg zKa-g@m+8IO=MmYqP8YQw!#Icmp7)T{IA76xL9&akz+wuPn4S2gYr^=*iX*h*z2!Z^ z!gh`R3B)ODIr_bY?jR;7kt_Smw=0xz%*`lWw+dsnokqKbti$vD-0xOvID;9XGJrX8t4TI=t1{Zqh%X@%vjE2jCpWCFJ(|=jiL0XB^F~O+FQT zrj2^aX&&8Gd&E*=ImUL2*&pVz*+`iiQ=cl;RZe@%OYG{J+{G&AvVfmi9l$~k83~gV zOB!-&GpVa6XX(h>BWq3gQFP;Vyond_ob+|$RlH=bU$zp{xzub~e!h2YHyicHP2!K~ z`-zMRG%Y(Pl)J=Wft5~p4@ro!O*UDXK$dwIsq}7NG3LE3-MfbN*##mwTb6lDv*4jT zYxV!w(tWZd!YMpmdzf