Update HelloWorld/CppXml

This commit is contained in:
Zihan Chen
2017-01-24 01:36:36 -08:00
parent 53d8ba77ba
commit 496da00045
22 changed files with 10497 additions and 3054 deletions
+2 -2
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
@@ -69,7 +69,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
@@ -69,7 +69,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
@@ -83,11 +83,6 @@
<ClCompile Include="Main.cpp" />
<ClCompile Include="UI\Source\HelloWorldPartialClasses.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\GacUI\GacUI.vcxproj">
<Project>{8018d622-66ba-4e65-9d03-bdac37ea9a54}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Xml Include="UI\Resource.xml" />
</ItemGroup>
@@ -95,6 +90,11 @@
<ClInclude Include="UI\Source\HelloWorld.h" />
<ClInclude Include="UI\Source\HelloWorldPartialClasses.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\GacUILite\GacUILite.vcxproj">
<Project>{96c559ca-9718-4bec-a053-28a0ab6a8ca2}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
@@ -2,14 +2,10 @@
<Resource>
<Folder name="GacGenConfig">
<Folder name="Cpp">
<Text name="Output">Source</Text>
<Text name="Include">GacUIReflection.h</Text>
<Text name="SourceFolder">Source</Text>
<Text name="Resource">..\..\UIRes\CppXml.bin</Text>
<Text name="NormalInclude">GacUI.h</Text>
<Text name="Name">HelloWorld</Text>
<Text name="Prefix"></Text>
</Folder>
<Folder name="Res">
<Text name="Output">..\..\UIRes</Text>
<Text name="PrecompiledBinary">CppXml.bin</Text>
</Folder>
</Folder>
<Folder name="MainWindow">
@@ -1,16 +1,35 @@
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
GacUI::HelloWorld
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
This file is generated by: Vczh GacUI Resource Code Generator
************************************************************************
DO NOT MODIFY
GacGen.exe Resource.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_HelloWorld
#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_HelloWorld
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_HELLOWORLD
#define VCZH_WORKFLOW_COMPILER_GENERATED_HELLOWORLD
#include "HelloWorldPartialClasses.h"
/***********************************************************************
Reflection
***********************************************************************/
namespace vl
{
namespace reflection
{
namespace description
{
#ifndef VCZH_DEBUG_NO_REFLECTION
DECL_TYPE_INFO(::helloworld::MainWindow)
DECL_TYPE_INFO(::helloworld::MainWindowConstructor)
#endif
extern bool LoadHelloWorldTypes();
}
}
}
#endif
@@ -1,42 +1,116 @@
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
GacUI::Partial Classes
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
This file is generated by: Vczh GacUI Resource Code Generator
************************************************************************
DO NOT MODIFY
GacGen.exe Resource.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#include "HelloWorld.h"
#if defined( _MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wparentheses-equality"
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses-equality"
#endif
#define GLOBAL_SYMBOL ::vl_workflow_global::HelloWorld::
#define GLOBAL_NAME ::vl_workflow_global::HelloWorld::Instance().
#define GLOBAL_OBJ &::vl_workflow_global::HelloWorld::Instance()
#define USERIMPL(...)
/***********************************************************************
Global Variables
***********************************************************************/
BEGIN_GLOBAL_STORAGE_CLASS(vl_workflow_global_HelloWorld)
vl_workflow_global::HelloWorld instance;
INITIALIZE_GLOBAL_STORAGE_CLASS
FINALIZE_GLOBAL_STORAGE_CLASS
END_GLOBAL_STORAGE_CLASS(vl_workflow_global_HelloWorld)
namespace vl_workflow_global
{
/***********************************************************************
Global Functions
***********************************************************************/
HelloWorld& HelloWorld::Instance()
{
return Getvl_workflow_global_HelloWorld().instance;
}
}
/***********************************************************************
Class (::helloworld::MainWindowConstructor)
***********************************************************************/
namespace helloworld
{
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
void MainWindowConstructor::__vwsn_initialize_instance_(::helloworld::MainWindow* __vwsn_this_, ::vl::presentation::GuiResourcePathResolver* __vwsn_resolver_)
{
(::vl::__vwsn::This(this)->__vwsn_precompile_0 = __vwsn_this_);
(::vl::__vwsn::This(this)->__vwsn_precompile_2 = ::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->GetBoundsComposition());
{
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = 480; __vwsn_temp__.y = 320; return __vwsn_temp__; }());
}
{
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = 480; __vwsn_temp__.y = 320; return __vwsn_temp__; }());
}
{
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->SetText(::vl::WString(L"Hello, world!", false));
}
{
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle();
(::vl::__vwsn::This(this)->__vwsn_precompile_1 = new ::vl::presentation::controls::GuiLabel(__vwsn_controlStyle_));
}
{
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetFont([&](){ ::vl::presentation::FontProperties __vwsn_temp__; __vwsn_temp__.fontFamily = ::vl::WString(L"Segoe UI", false); __vwsn_temp__.size = 32; __vwsn_temp__.antialias = true; return __vwsn_temp__; }());
}
{
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetText(::vl::WString(L"Welcome to GacUI Library!", false));
}
{
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::controls::GuiControl*>(::vl::__vwsn::This(this)->__vwsn_precompile_1)));
}
}
void MainWindow::OnCreate()
MainWindowConstructor::MainWindowConstructor()
{
}
void MainWindow::OnDestroy()
{
}
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
/***********************************************************************
Class (::helloworld::MainWindow)
***********************************************************************/
MainWindow::MainWindow()
: ::vl::presentation::controls::GuiWindow(::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateWindowStyle())
{
InitializeComponents();
OnCreate();
auto __vwsn_resource_ = ::vl::__vwsn::This(::vl::presentation::GetResourceManager())->GetResourceFromClassName(::vl::WString(L"helloworld::MainWindow", false));
auto __vwsn_resolver_ = ::vl::Ptr<::vl::presentation::GuiResourcePathResolver>(new ::vl::presentation::GuiResourcePathResolver(__vwsn_resource_, ::vl::__vwsn::This(__vwsn_resource_.Obj())->GetWorkingDirectory()));
::vl::__vwsn::This(this)->__vwsn_initialize_instance_(this, ::vl::__vwsn::Ensure(static_cast<::vl::presentation::GuiResourcePathResolver*>(__vwsn_resolver_.Obj())));
}
MainWindow::~MainWindow()
{
OnDestroy();
ClearSubscriptions();
::vl::__vwsn::This(this)->ClearSubscriptions();
}
}
}
#undef GLOBAL_SYMBOL
#undef GLOBAL_NAME
#undef GLOBAL_OBJ
#undef USERIMPL
/***********************************************************************
Reflection
***********************************************************************/
namespace vl
{
@@ -44,47 +118,55 @@ namespace vl
{
namespace description
{
#define _ ,
IMPL_CPP_TYPE_INFO(helloworld::MainWindow)
#ifndef VCZH_DEBUG_NO_REFLECTION
IMPL_CPP_TYPE_INFO(::helloworld::MainWindow)
IMPL_CPP_TYPE_INFO(::helloworld::MainWindowConstructor)
BEGIN_CLASS_MEMBER(helloworld::MainWindow)
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
CLASS_MEMBER_CONSTRUCTOR(helloworld::MainWindow*(), NO_PARAMETER)
END_CLASS_MEMBER(helloworld::MainWindow)
#define _ ,
BEGIN_CLASS_MEMBER(::helloworld::MainWindow)
END_CLASS_MEMBER(::helloworld::MainWindow)
#undef _
BEGIN_CLASS_MEMBER(::helloworld::MainWindowConstructor)
CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" _ L"__vwsn_resolver_" })
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
END_CLASS_MEMBER(::helloworld::MainWindowConstructor)
class HelloWorldResourceLoader : public Object, public ITypeLoader
#undef _
class HelloWorldTypeLoader : public Object, public ITypeLoader
{
public:
void Load(ITypeManager* manager)
{
ADD_TYPE_INFO(helloworld::MainWindow)
ADD_TYPE_INFO(::helloworld::MainWindow)
ADD_TYPE_INFO(::helloworld::MainWindowConstructor)
}
void Unload(ITypeManager* manager)
{
}
};
#endif
class HelloWorldResourcePlugin : public Object, public vl::presentation::controls::IGuiPlugin
bool LoadHelloWorldTypes()
{
public:
void Load()override
#ifndef VCZH_DEBUG_NO_REFLECTION
if (auto manager = GetGlobalTypeManager())
{
GetGlobalTypeManager()->AddTypeLoader(new HelloWorldResourceLoader);
return manager->AddTypeLoader(MakePtr<HelloWorldTypeLoader>());
}
void AfterLoad()override
{
}
void Unload()override
{
}
};
GUI_REGISTER_PLUGIN(HelloWorldResourcePlugin)
#endif
return false;
}
}
}
}
#if defined( _MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__)
#pragma clang diagnostic pop
#endif
@@ -1,76 +1,79 @@
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
GacUI::Partial Classes
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
This file is generated by: Vczh GacUI Resource Code Generator
************************************************************************
DO NOT MODIFY
GacGen.exe Resource.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_HelloWorld_PARTIAL_CLASSES
#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_HelloWorld_PARTIAL_CLASSES
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_HELLOWORLDPARTIALCLASSES
#define VCZH_WORKFLOW_COMPILER_GENERATED_HELLOWORLDPARTIALCLASSES
#include "GacUIReflection.h"
#include "GacUI.h"
#if defined( _MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wparentheses-equality"
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses-equality"
#endif
namespace helloworld
{
class MainWindowConstructor;
class MainWindow;
template<typename TImpl>
class MainWindow_ : public ::vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>, public vl::reflection::Description<TImpl>
class MainWindowConstructor : public ::vl::Object, public ::vl::reflection::Description<MainWindowConstructor>
{
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
private:
#ifndef VCZH_DEBUG_NO_REFLECTION
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindowConstructor>;
#endif
protected:
void InitializeComponents()
{
if (InitializeFromResource())
{
}
else
{
}
}
::helloworld::MainWindow* __vwsn_precompile_0 = static_cast<::helloworld::MainWindow*>(nullptr);
::vl::presentation::controls::GuiLabel* __vwsn_precompile_1 = static_cast<::vl::presentation::controls::GuiLabel*>(nullptr);
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_2 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
void __vwsn_initialize_instance_(::helloworld::MainWindow* __vwsn_this_, ::vl::presentation::GuiResourcePathResolver* __vwsn_resolver_);
public:
MainWindow_()
:vl::presentation::GuiInstancePartialClass<::vl::presentation::controls::GuiWindow>(L"helloworld::MainWindow")
,::vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
{
}
MainWindowConstructor();
};
}
namespace vl
{
namespace reflection
class MainWindow : public ::vl::presentation::controls::GuiWindow, public ::helloworld::MainWindowConstructor, public ::vl::reflection::Description<MainWindow>
{
namespace description
{
DECL_TYPE_INFO(helloworld::MainWindow)
}
}
}
namespace helloworld
{
class MainWindow : public helloworld::MainWindow_<helloworld::MainWindow>
{
friend class helloworld::MainWindow_<helloworld::MainWindow>;
friend struct vl::reflection::description::CustomTypeDescriptorSelector<helloworld::MainWindow>;
protected:
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
void OnCreate();
void OnDestroy();
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
friend class ::helloworld::MainWindowConstructor;
#ifndef VCZH_DEBUG_NO_REFLECTION
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindow>;
#endif
public:
MainWindow();
~MainWindow();
};
}
/***********************************************************************
Global Variables and Functions
***********************************************************************/
namespace vl_workflow_global
{
class HelloWorld
{
public:
static HelloWorld& Instance();
};
}
#if defined( _MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__)
#pragma clang diagnostic pop
#endif
#endif
Binary file not shown.
+15 -5
View File
@@ -73,24 +73,34 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\Import\GacUI.cpp">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/bigobj %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="..\..\..\Import\GacUIReflection.cpp">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/bigobj %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="..\..\..\Import\GacUIWindows.cpp">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/bigobj %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="..\..\..\Import\Vlpp.cpp">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/bigobj %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<ClCompile Include="..\..\..\Import\VlppWorkflow.cpp">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/bigobj %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\Import\GacUI.h" />
<ClInclude Include="..\..\..\Import\GacUIReflection.h" />
<ClInclude Include="..\..\..\Import\GacUIWindows.h" />
<ClInclude Include="..\..\..\Import\Vlpp.h" />
<ClInclude Include="..\..\..\Import\VlppWorkflow.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GacUILite\GacUILite.vcxproj">
<Project>{96c559ca-9718-4bec-a053-28a0ab6a8ca2}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
+18
View File
@@ -21,6 +21,15 @@
<ClCompile Include="..\..\..\Import\VlppWorkflow.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Import\GacUI.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Import\GacUIWindows.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\Import\Vlpp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\Import\GacUIReflection.h">
@@ -29,5 +38,14 @@
<ClInclude Include="..\..\..\Import\VlppWorkflow.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Import\GacUI.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Import\GacUIWindows.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\Import\Vlpp.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
+2 -2
View File
@@ -46,7 +46,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
@@ -62,7 +62,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>