From c4dd9007d5f934b50157343b216190e32dc91160 Mon Sep 17 00:00:00 2001 From: vczh Date: Sun, 27 Dec 2015 03:12:08 -0800 Subject: [PATCH] ... --- .../ContainersAndButtons.vcxproj | 104 ++++++++++++++++++ .../ContainersAndButtons.vcxproj.filters | 46 ++++++++ .../ContainersAndButtons/Main.cpp | 23 ++++ .../ContainersAndButtons/UI/Codegen.bat | 1 + .../ContainersAndButtons/UI/Resource.xml | 24 ++++ .../ContainersAndButtons/UI/Source/Demo.h | 16 +++ .../UI/Source/DemoPartialClasses.cpp | 80 ++++++++++++++ .../UI/Source/DemoPartialClasses.h | 74 +++++++++++++ Tutorial/GacUI_Controls/GacUI_Controls.sln | 54 +++++++++ .../UIRes/ContainersAndButtons.bin | Bin 0 -> 9423 bytes Tutorial/README.md | 50 +++++++++ 11 files changed, 472 insertions(+) create mode 100644 Tutorial/GacUI_Controls/ContainersAndButtons/ContainersAndButtons.vcxproj create mode 100644 Tutorial/GacUI_Controls/ContainersAndButtons/ContainersAndButtons.vcxproj.filters create mode 100644 Tutorial/GacUI_Controls/ContainersAndButtons/Main.cpp create mode 100644 Tutorial/GacUI_Controls/ContainersAndButtons/UI/Codegen.bat create mode 100644 Tutorial/GacUI_Controls/ContainersAndButtons/UI/Resource.xml create mode 100644 Tutorial/GacUI_Controls/ContainersAndButtons/UI/Source/Demo.h create mode 100644 Tutorial/GacUI_Controls/ContainersAndButtons/UI/Source/DemoPartialClasses.cpp create mode 100644 Tutorial/GacUI_Controls/ContainersAndButtons/UI/Source/DemoPartialClasses.h create mode 100644 Tutorial/GacUI_Controls/GacUI_Controls.sln create mode 100644 Tutorial/GacUI_Controls/UIRes/ContainersAndButtons.bin create mode 100644 Tutorial/README.md diff --git a/Tutorial/GacUI_Controls/ContainersAndButtons/ContainersAndButtons.vcxproj b/Tutorial/GacUI_Controls/ContainersAndButtons/ContainersAndButtons.vcxproj new file mode 100644 index 00000000..30efdb4c --- /dev/null +++ b/Tutorial/GacUI_Controls/ContainersAndButtons/ContainersAndButtons.vcxproj @@ -0,0 +1,104 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {0C211930-C5DA-4567-A752-1D847CADEC1C} + Win32Proj + ContainersAndButtons + + + + 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_Controls/ContainersAndButtons/ContainersAndButtons.vcxproj.filters b/Tutorial/GacUI_Controls/ContainersAndButtons/ContainersAndButtons.vcxproj.filters new file mode 100644 index 00000000..8be91bb7 --- /dev/null +++ b/Tutorial/GacUI_Controls/ContainersAndButtons/ContainersAndButtons.vcxproj.filters @@ -0,0 +1,46 @@ + + + + + {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 + + + {d1c7e61f-8152-4c5a-bc5c-3cd43c12fd9f} + + + + + Source Files + + + UI + + + + + Resource Files + + + + + Resource Files + + + + + UI + + + UI + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Controls/ContainersAndButtons/Main.cpp b/Tutorial/GacUI_Controls/ContainersAndButtons/Main.cpp new file mode 100644 index 00000000..ec36e1b4 --- /dev/null +++ b/Tutorial/GacUI_Controls/ContainersAndButtons/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/ContainersAndButtons.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_Controls/ContainersAndButtons/UI/Codegen.bat b/Tutorial/GacUI_Controls/ContainersAndButtons/UI/Codegen.bat new file mode 100644 index 00000000..27f6654b --- /dev/null +++ b/Tutorial/GacUI_Controls/ContainersAndButtons/UI/Codegen.bat @@ -0,0 +1 @@ +..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file diff --git a/Tutorial/GacUI_Controls/ContainersAndButtons/UI/Resource.xml b/Tutorial/GacUI_Controls/ContainersAndButtons/UI/Resource.xml new file mode 100644 index 00000000..b6418333 --- /dev/null +++ b/Tutorial/GacUI_Controls/ContainersAndButtons/UI/Resource.xml @@ -0,0 +1,24 @@ + + + + + Source + GacUIReflection.h + Demo + + + + ..\..\UIRes + ContainersAndButtons.bin + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Controls/ContainersAndButtons/UI/Source/Demo.h b/Tutorial/GacUI_Controls/ContainersAndButtons/UI/Source/Demo.h new file mode 100644 index 00000000..febeba0f --- /dev/null +++ b/Tutorial/GacUI_Controls/ContainersAndButtons/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_Controls/ContainersAndButtons/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Controls/ContainersAndButtons/UI/Source/DemoPartialClasses.cpp new file mode 100644 index 00000000..aa0483a1 --- /dev/null +++ b/Tutorial/GacUI_Controls/ContainersAndButtons/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_Controls/ContainersAndButtons/UI/Source/DemoPartialClasses.h b/Tutorial/GacUI_Controls/ContainersAndButtons/UI/Source/DemoPartialClasses.h new file mode 100644 index 00000000..8088a85f --- /dev/null +++ b/Tutorial/GacUI_Controls/ContainersAndButtons/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_Controls/GacUI_Controls.sln b/Tutorial/GacUI_Controls/GacUI_Controls.sln new file mode 100644 index 00000000..6858a865 --- /dev/null +++ b/Tutorial/GacUI_Controls/GacUI_Controls.sln @@ -0,0 +1,54 @@ + +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}") = "ContainersAndButtons", "ContainersAndButtons\ContainersAndButtons.vcxproj", "{0C211930-C5DA-4567-A752-1D847CADEC1C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{739DADD1-5B91-464A-B477-7581D6323E2B}" +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}") = "GacUI", "..\Lib\GacUI\GacUI.vcxproj", "{8018D622-66BA-4E65-9D03-BDAC37EA9A54}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GacUILite", "..\Lib\GacUILite\GacUILite.vcxproj", "{96C559CA-9718-4BEC-A053-28A0AB6A8CA2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0C211930-C5DA-4567-A752-1D847CADEC1C}.Debug|Win32.ActiveCfg = Debug|Win32 + {0C211930-C5DA-4567-A752-1D847CADEC1C}.Debug|Win32.Build.0 = Debug|Win32 + {0C211930-C5DA-4567-A752-1D847CADEC1C}.Release|Win32.ActiveCfg = Release|Win32 + {0C211930-C5DA-4567-A752-1D847CADEC1C}.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 + {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 + {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 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F081AD61-FE91-4044-B667-F83586D7CC5B} = {739DADD1-5B91-464A-B477-7581D6323E2B} + {0EE1EA52-8ABA-40F3-B431-B7BCF8D6D520} = {739DADD1-5B91-464A-B477-7581D6323E2B} + {8018D622-66BA-4E65-9D03-BDAC37EA9A54} = {739DADD1-5B91-464A-B477-7581D6323E2B} + {96C559CA-9718-4BEC-A053-28A0AB6A8CA2} = {739DADD1-5B91-464A-B477-7581D6323E2B} + EndGlobalSection +EndGlobal diff --git a/Tutorial/GacUI_Controls/UIRes/ContainersAndButtons.bin b/Tutorial/GacUI_Controls/UIRes/ContainersAndButtons.bin new file mode 100644 index 0000000000000000000000000000000000000000..dcd003cbdfa81889931be091a498eb5caf70a89b GIT binary patch literal 9423 zcmeHNNsn7a5Uvo`uqbR|34+98$yj8RRYJosQsN*Jq$F0H8kpwyWQQ-J0-qu zxAMHy6hfHH06pc$qH)kn6$`FtKDa15tF8+G@iT{an*N*nAlRWry7`<{{_Dh-FOA$Goo(uq?n}y%&h}Q(qrddu zm!8iyOE1s1=d-<4aM|`VX3Xbv8<%Zd6akJ4mJyX6o$c-M5|QvYZR2ul;nLkO{9*f4 z-C|U+Mbi!LUU^yWmtAPJ!ZvIfl(n$^Y=PUrhG-F=xCPd2iEa#)+C;em9iiwts7gT`||~eKxu+Y{vCa zrJF{TOv`|mi3f}Rqs<`QtZ|TLD@%T|F_Jdg#o^*uiVSZe%6se7~ERO1N`%0f1>_u0ww=rv)SiR;LU~4 zTsZb;9klY0dj+3HSS43%WgErHp@fyJ`9SXmuTm#~-a0&}Vx$&QksR#hQqZixm-(=& z*O9$C@X>L99oak(sL2bN1=$bTHZD1IW-KJ47GG12uZD>u|t z%yU=+=H#fn6lT&j)Q`wv)N{y)_y2=F?8lAfAg+uGVXVfz0lnB-5u69+x@tzRb9QYx z{JKo>jQa-WJ)#-EdD-)s-5ot_yY0M{pF8>i?#8XW;`n6Wbo5y=to+mXk6Qb6EB|)% z(@yUT$0z$AM?XV`l{{4Vl7}zS*=9+)FFl`amN)EP^$D}jI6rpuC!L?y9iLahpE&xS zP1gI=*?Y>_``Y;QpYeU`==(<0``+mtae6l$pSb+s=tnnM??-3vn6tOX93x&uK59klX&<3D5V<5qs?=ze{f zRIlLrWgb3q^s~;-la9|klpNjXVN!e3*1O^SEV=l;Gk(tKPh0tuqx<>(rQ;LNpB>%L z_pcnEcz)yP9?wbbO2g9(E58TpwSP;syWE7q8O;eRmLX+EiKF6C6Tjk`jV!=5q-RHDSP-j>S8+ver zJFLwe9AkB2-ACi350fLGCG}YH5vmP1l7%yk1kPBt2^N7QoxfZ;BV?T)^sJSBTc{`6 z9_JD3OCRvJM>sFh7nXx!AtsE4?FUTJpC8Mx-VCRvWg%|qryf4$wVz*MI|~h-W4yOS znBEcL!{%jHpFGVDzDFn`qD7qY^kiQdc$dI)L^))jG~_HvPdTRb?nVDjQR~iRBF>T; zw