diff --git a/Tutorial/GacUI_Xml/Binding_Bind/Main.cpp b/Tutorial/GacUI_Xml/Binding_Bind/Main.cpp index bdd930ee..e984f295 100644 --- a/Tutorial/GacUI_Xml/Binding_Bind/Main.cpp +++ b/Tutorial/GacUI_Xml/Binding_Bind/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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() { { diff --git a/Tutorial/GacUI_Xml/Binding_Bind/UI/Codegen.bat b/Tutorial/GacUI_Xml/Binding_Bind/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Binding_Bind/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Binding_Bind/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/Demo.h index a12c85a4..7566a5bb 100644 --- a/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -12,24 +12,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/DemoPartialClasses.cpp index c27f42d6..8bfa8dd3 100644 --- a/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -83,7 +89,7 @@ Closures void __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_() { - auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::ToString((::vl::__vwsn::Parse<::vl::vint32_t>(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetText()) + ::vl::__vwsn::Parse<::vl::vint32_t>(::vl::__vwsn::This(__vwsn_bind_cache_1)->GetText()))); } catch(...){ return ::vl::WString(L"ERROR", false); } }(); + auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::ToString((::vl::__vwsn::Parse<::vl::vint>(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetText()) + ::vl::__vwsn::Parse<::vl::vint>(::vl::__vwsn::This(__vwsn_bind_cache_1)->GetText()))); } catch(...){ return ::vl::WString(L"ERROR", false); } }(); ::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_)); } @@ -150,40 +156,40 @@ namespace demo (this->__vwsn_precompile_0 = __vwsn_this_); (this->__vwsn_precompile_14 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_14)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_14)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Binding_Bind", false)); } (this->__vwsn_precompile_1 = new ::vl::presentation::compositions::GuiTableComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"5", false))); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"5", false))); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint32_t>(4), static_cast<::vl::vint32_t>(3)); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint32_t>(100); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint>(4), static_cast<::vl::vint>(3)); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint>(100); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); } (this->__vwsn_precompile_2 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -200,7 +206,7 @@ namespace demo } (this->__vwsn_precompile_4 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -208,7 +214,7 @@ namespace demo } (this->__vwsn_precompile_5 = ::vl::__vwsn::This(this->textBoxA)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxA)->SetText(::vl::WString(L"1", false)); @@ -221,10 +227,10 @@ namespace demo } (this->__vwsn_precompile_6 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -241,7 +247,7 @@ namespace demo } (this->__vwsn_precompile_8 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -249,7 +255,7 @@ namespace demo } (this->__vwsn_precompile_9 = ::vl::__vwsn::This(this->textBoxB)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxB)->SetText(::vl::WString(L"2", false)); @@ -262,10 +268,10 @@ namespace demo } (this->__vwsn_precompile_10 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetSite(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -282,7 +288,7 @@ namespace demo } (this->__vwsn_precompile_12 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_12)->SetSite(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_12)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -293,7 +299,7 @@ namespace demo } (this->__vwsn_precompile_13 = ::vl::__vwsn::This(this->textBoxC)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_13)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_13)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_12)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->textBoxC)->GetBoundsComposition())); @@ -330,7 +336,7 @@ Class (::demo::MainWindow) MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } } @@ -339,78 +345,6 @@ Class (::demo::MainWindow) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_10) - CLASS_MEMBER_FIELD(__vwsn_precompile_11) - CLASS_MEMBER_FIELD(__vwsn_precompile_12) - CLASS_MEMBER_FIELD(__vwsn_precompile_13) - CLASS_MEMBER_FIELD(__vwsn_precompile_14) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(__vwsn_precompile_3) - CLASS_MEMBER_FIELD(__vwsn_precompile_4) - CLASS_MEMBER_FIELD(__vwsn_precompile_5) - CLASS_MEMBER_FIELD(__vwsn_precompile_6) - CLASS_MEMBER_FIELD(__vwsn_precompile_7) - CLASS_MEMBER_FIELD(__vwsn_precompile_8) - CLASS_MEMBER_FIELD(__vwsn_precompile_9) - CLASS_MEMBER_FIELD(textBoxA) - CLASS_MEMBER_FIELD(textBoxB) - CLASS_MEMBER_FIELD(textBoxC) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..fe248361 --- /dev/null +++ b/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/DemoReflection.cpp @@ -0,0 +1,101 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_10) + CLASS_MEMBER_FIELD(__vwsn_precompile_11) + CLASS_MEMBER_FIELD(__vwsn_precompile_12) + CLASS_MEMBER_FIELD(__vwsn_precompile_13) + CLASS_MEMBER_FIELD(__vwsn_precompile_14) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(__vwsn_precompile_3) + CLASS_MEMBER_FIELD(__vwsn_precompile_4) + CLASS_MEMBER_FIELD(__vwsn_precompile_5) + CLASS_MEMBER_FIELD(__vwsn_precompile_6) + CLASS_MEMBER_FIELD(__vwsn_precompile_7) + CLASS_MEMBER_FIELD(__vwsn_precompile_8) + CLASS_MEMBER_FIELD(__vwsn_precompile_9) + CLASS_MEMBER_FIELD(textBoxA) + CLASS_MEMBER_FIELD(textBoxB) + CLASS_MEMBER_FIELD(textBoxC) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/DemoReflection.h new file mode 100644 index 00000000..7ed53165 --- /dev/null +++ b/Tutorial/GacUI_Xml/Binding_Bind/UI/Source/DemoReflection.h @@ -0,0 +1,54 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Binding_Eval/Main.cpp b/Tutorial/GacUI_Xml/Binding_Eval/Main.cpp index 8a2d102f..af5616e9 100644 --- a/Tutorial/GacUI_Xml/Binding_Eval/Main.cpp +++ b/Tutorial/GacUI_Xml/Binding_Eval/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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() { { diff --git a/Tutorial/GacUI_Xml/Binding_Eval/UI/Codegen.bat b/Tutorial/GacUI_Xml/Binding_Eval/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Binding_Eval/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Binding_Eval/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/Demo.h index a12c85a4..7566a5bb 100644 --- a/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -12,24 +12,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/DemoPartialClasses.cpp index e3dfc2f5..da964682 100644 --- a/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -58,10 +64,10 @@ namespace demo (this->__vwsn_precompile_0 = __vwsn_this_); (this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Binding_Eval", false)); @@ -71,13 +77,13 @@ namespace demo (this->__vwsn_precompile_1 = new ::vl::presentation::controls::GuiLabel(__vwsn_controlStyle_)); } { - ::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 = static_cast<::vl::vint32_t>(32); __vwsn_temp__.antialias = true; return __vwsn_temp__; }()); + ::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 = static_cast<::vl::vint>(32); __vwsn_temp__.antialias = true; return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->__vwsn_precompile_1)); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetText((::vl::WString(L"1+2+3+4+5+6+7+8+9+10 = ", false) + ::vl::__vwsn::ToString((((((((((static_cast<::vl::vint32_t>(1) + static_cast<::vl::vint32_t>(2)) + static_cast<::vl::vint32_t>(3)) + static_cast<::vl::vint32_t>(4)) + static_cast<::vl::vint32_t>(5)) + static_cast<::vl::vint32_t>(6)) + static_cast<::vl::vint32_t>(7)) + static_cast<::vl::vint32_t>(8)) + static_cast<::vl::vint32_t>(9)) + static_cast<::vl::vint32_t>(10))))); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetText((::vl::WString(L"1+2+3+4+5+6+7+8+9+10 = ", false) + ::vl::__vwsn::ToString((((((((((static_cast<::vl::vint>(1) + static_cast<::vl::vint>(2)) + static_cast<::vl::vint>(3)) + static_cast<::vl::vint>(4)) + static_cast<::vl::vint>(5)) + static_cast<::vl::vint>(6)) + static_cast<::vl::vint>(7)) + static_cast<::vl::vint>(8)) + static_cast<::vl::vint>(9)) + static_cast<::vl::vint>(10))))); } } @@ -100,7 +106,7 @@ Class (::demo::MainWindow) MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } } @@ -109,63 +115,6 @@ Class (::demo::MainWindow) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..cf4a4ea6 --- /dev/null +++ b/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/DemoReflection.cpp @@ -0,0 +1,86 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/DemoReflection.h new file mode 100644 index 00000000..7ed53165 --- /dev/null +++ b/Tutorial/GacUI_Xml/Binding_Eval/UI/Source/DemoReflection.h @@ -0,0 +1,54 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Binding_Format/Main.cpp b/Tutorial/GacUI_Xml/Binding_Format/Main.cpp index 58988f77..2bfbcf7d 100644 --- a/Tutorial/GacUI_Xml/Binding_Format/Main.cpp +++ b/Tutorial/GacUI_Xml/Binding_Format/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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() { { diff --git a/Tutorial/GacUI_Xml/Binding_Format/UI/Codegen.bat b/Tutorial/GacUI_Xml/Binding_Format/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Binding_Format/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Binding_Format/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Binding_Format/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Binding_Format/UI/Source/Demo.h index a12c85a4..7566a5bb 100644 --- a/Tutorial/GacUI_Xml/Binding_Format/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Binding_Format/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -12,24 +12,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Binding_Format/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Binding_Format/UI/Source/DemoPartialClasses.cpp index 21fc2dd2..8d22ad66 100644 --- a/Tutorial/GacUI_Xml/Binding_Format/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Binding_Format/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -138,39 +144,39 @@ namespace demo (this->__vwsn_precompile_0 = __vwsn_this_); (this->__vwsn_precompile_8 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Binding_Format", false)); } (this->__vwsn_precompile_1 = new ::vl::presentation::compositions::GuiTableComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"5", false))); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"5", false))); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint32_t>(3), static_cast<::vl::vint32_t>(3)); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint32_t>(100); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint>(3), static_cast<::vl::vint>(3)); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint>(100); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); } (this->__vwsn_precompile_2 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -187,7 +193,7 @@ namespace demo } (this->__vwsn_precompile_4 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -195,7 +201,7 @@ namespace demo } (this->__vwsn_precompile_5 = ::vl::__vwsn::This(this->textBoxName)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxName)->SetText(::vl::WString(L"Jack", false)); @@ -208,10 +214,10 @@ namespace demo } (this->__vwsn_precompile_6 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(2)); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(2)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -252,7 +258,7 @@ Class (::demo::MainWindow) MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } } @@ -261,70 +267,6 @@ Class (::demo::MainWindow) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(__vwsn_precompile_3) - CLASS_MEMBER_FIELD(__vwsn_precompile_4) - CLASS_MEMBER_FIELD(__vwsn_precompile_5) - CLASS_MEMBER_FIELD(__vwsn_precompile_6) - CLASS_MEMBER_FIELD(__vwsn_precompile_7) - CLASS_MEMBER_FIELD(__vwsn_precompile_8) - CLASS_MEMBER_FIELD(textBoxName) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Binding_Format/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Binding_Format/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..f4b1910b --- /dev/null +++ b/Tutorial/GacUI_Xml/Binding_Format/UI/Source/DemoReflection.cpp @@ -0,0 +1,93 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(__vwsn_precompile_3) + CLASS_MEMBER_FIELD(__vwsn_precompile_4) + CLASS_MEMBER_FIELD(__vwsn_precompile_5) + CLASS_MEMBER_FIELD(__vwsn_precompile_6) + CLASS_MEMBER_FIELD(__vwsn_precompile_7) + CLASS_MEMBER_FIELD(__vwsn_precompile_8) + CLASS_MEMBER_FIELD(textBoxName) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Binding_Format/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Binding_Format/UI/Source/DemoReflection.h new file mode 100644 index 00000000..7ed53165 --- /dev/null +++ b/Tutorial/GacUI_Xml/Binding_Format/UI/Source/DemoReflection.h @@ -0,0 +1,54 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Binding_Uri/Main.cpp b/Tutorial/GacUI_Xml/Binding_Uri/Main.cpp index 7c43559a..fe172f3f 100644 --- a/Tutorial/GacUI_Xml/Binding_Uri/Main.cpp +++ b/Tutorial/GacUI_Xml/Binding_Uri/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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() { { diff --git a/Tutorial/GacUI_Xml/Binding_Uri/UI/Codegen.bat b/Tutorial/GacUI_Xml/Binding_Uri/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Binding_Uri/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Binding_Uri/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/Demo.h index a12c85a4..7566a5bb 100644 --- a/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -12,24 +12,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/DemoPartialClasses.cpp index 608277b0..794d915e 100644 --- a/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -75,10 +81,10 @@ namespace demo (this->__vwsn_precompile_0 = __vwsn_this_); (this->__vwsn_precompile_8 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTabStyle(); @@ -119,7 +125,7 @@ namespace demo } (this->__vwsn_precompile_7 = ::vl::__vwsn::This(this->documentLabel)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_7)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_7)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_6)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->documentLabel)); @@ -130,7 +136,7 @@ namespace demo } (this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->__vwsn_precompile_1)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(5); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(5); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(5); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(5); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->__vwsn_precompile_1)); @@ -174,7 +180,7 @@ Class (::demo::MainWindow) MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } } @@ -183,71 +189,6 @@ Class (::demo::MainWindow) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) - CLASS_MEMBER_METHOD(documentLabel_ActiveHyperlinkExecuted, { L"sender" _ L"arguments" }) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(__vwsn_precompile_3) - CLASS_MEMBER_FIELD(__vwsn_precompile_4) - CLASS_MEMBER_FIELD(__vwsn_precompile_5) - CLASS_MEMBER_FIELD(__vwsn_precompile_6) - CLASS_MEMBER_FIELD(__vwsn_precompile_7) - CLASS_MEMBER_FIELD(__vwsn_precompile_8) - CLASS_MEMBER_FIELD(documentLabel) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..ae9d2b94 --- /dev/null +++ b/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/DemoReflection.cpp @@ -0,0 +1,94 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + CLASS_MEMBER_METHOD(documentLabel_ActiveHyperlinkExecuted, { L"sender" _ L"arguments" }) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(__vwsn_precompile_3) + CLASS_MEMBER_FIELD(__vwsn_precompile_4) + CLASS_MEMBER_FIELD(__vwsn_precompile_5) + CLASS_MEMBER_FIELD(__vwsn_precompile_6) + CLASS_MEMBER_FIELD(__vwsn_precompile_7) + CLASS_MEMBER_FIELD(__vwsn_precompile_8) + CLASS_MEMBER_FIELD(documentLabel) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/DemoReflection.h new file mode 100644 index 00000000..7ed53165 --- /dev/null +++ b/Tutorial/GacUI_Xml/Binding_Uri/UI/Source/DemoReflection.h @@ -0,0 +1,54 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Binding_ViewModel/Main.cpp b/Tutorial/GacUI_Xml/Binding_ViewModel/Main.cpp index 5ca79404..d49b5fc2 100644 --- a/Tutorial/GacUI_Xml/Binding_ViewModel/Main.cpp +++ b/Tutorial/GacUI_Xml/Binding_ViewModel/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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(); -} - class ViewModelImpl : public Object, public virtual demo::IViewModel { public: diff --git a/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Codegen.bat b/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/Demo.h index 2ca8e578..7566a5bb 100644 --- a/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -12,32 +12,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::IViewModel) - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) - - BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(::demo::IViewModel) - ::vl::WString GetMessageFromName(const ::vl::WString& name) override - { - INVOKEGET_INTERFACE_PROXY(GetMessageFromName, name); - } - END_INTERFACE_PROXY(::demo::IViewModel) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/DemoPartialClasses.cpp index 8dff3e53..380ac468 100644 --- a/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -139,39 +145,39 @@ namespace demo (this->ViewModel = ::vl::__vwsn::This(__vwsn_this_)->GetViewModel()); (this->__vwsn_precompile_8 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Binding_ViewModel", false)); } (this->__vwsn_precompile_1 = new ::vl::presentation::compositions::GuiTableComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"5", false))); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"5", false))); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint32_t>(3), static_cast<::vl::vint32_t>(3)); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint32_t>(100); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint>(3), static_cast<::vl::vint>(3)); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint>(100); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); } (this->__vwsn_precompile_2 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -188,7 +194,7 @@ namespace demo } (this->__vwsn_precompile_4 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -196,7 +202,7 @@ namespace demo } (this->__vwsn_precompile_5 = ::vl::__vwsn::This(this->textBoxName)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxName)->SetText(::vl::WString(L"Jack", false)); @@ -209,10 +215,10 @@ namespace demo } (this->__vwsn_precompile_6 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(2)); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(2)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -259,7 +265,7 @@ Class (::demo::MainWindow) MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } /*********************************************************************** @@ -272,80 +278,6 @@ Class (::demo::IViewModel) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::IViewModel) - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_INTERFACE_MEMBER(::demo::IViewModel) - CLASS_MEMBER_METHOD(GetMessageFromName, { L"name" }) - END_INTERFACE_MEMBER(::demo::IViewModel) - - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(::vl::Ptr<::demo::IViewModel>), { L"__vwsn_ctor_parameter_ViewModel" }) - CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER) - CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel) - CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(__vwsn_precompile_3) - CLASS_MEMBER_FIELD(__vwsn_precompile_4) - CLASS_MEMBER_FIELD(__vwsn_precompile_5) - CLASS_MEMBER_FIELD(__vwsn_precompile_6) - CLASS_MEMBER_FIELD(__vwsn_precompile_7) - CLASS_MEMBER_FIELD(__vwsn_precompile_8) - CLASS_MEMBER_FIELD(ViewModel) - CLASS_MEMBER_FIELD(textBoxName) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::IViewModel) - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..c1addb28 --- /dev/null +++ b/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/DemoReflection.cpp @@ -0,0 +1,103 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::IViewModel) + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_INTERFACE_MEMBER(::demo::IViewModel) + CLASS_MEMBER_METHOD(GetMessageFromName, { L"name" }) + END_INTERFACE_MEMBER(::demo::IViewModel) + + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(::vl::Ptr<::demo::IViewModel>), { L"__vwsn_ctor_parameter_ViewModel" }) + CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER) + CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel) + CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(__vwsn_precompile_3) + CLASS_MEMBER_FIELD(__vwsn_precompile_4) + CLASS_MEMBER_FIELD(__vwsn_precompile_5) + CLASS_MEMBER_FIELD(__vwsn_precompile_6) + CLASS_MEMBER_FIELD(__vwsn_precompile_7) + CLASS_MEMBER_FIELD(__vwsn_precompile_8) + CLASS_MEMBER_FIELD(ViewModel) + CLASS_MEMBER_FIELD(textBoxName) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::IViewModel) + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/DemoReflection.h new file mode 100644 index 00000000..bb19f240 --- /dev/null +++ b/Tutorial/GacUI_Xml/Binding_ViewModel/UI/Source/DemoReflection.h @@ -0,0 +1,62 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::IViewModel) + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) + + BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(::demo::IViewModel) + ::vl::WString GetMessageFromName(const ::vl::WString& name) override + { + INVOKEGET_INTERFACE_PROXY(GetMessageFromName, name); + } + END_INTERFACE_PROXY(::demo::IViewModel) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Event_Cpp/Main.cpp b/Tutorial/GacUI_Xml/Event_Cpp/Main.cpp index 0aaf21f5..49a6103d 100644 --- a/Tutorial/GacUI_Xml/Event_Cpp/Main.cpp +++ b/Tutorial/GacUI_Xml/Event_Cpp/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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() { { diff --git a/Tutorial/GacUI_Xml/Event_Cpp/UI/Codegen.bat b/Tutorial/GacUI_Xml/Event_Cpp/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Event_Cpp/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Event_Cpp/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/Demo.h index b364bcac..3cd0ec2e 100644 --- a/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -13,24 +13,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" #include "MainWindow.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/DemoPartialClasses.cpp index e711afd8..9fabb308 100644 --- a/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -75,41 +81,41 @@ namespace demo (this->__vwsn_precompile_0 = __vwsn_this_); (this->__vwsn_precompile_17 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_17)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_17)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Event_Cpp", false)); } (this->__vwsn_precompile_1 = new ::vl::presentation::compositions::GuiTableComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"5", false))); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"5", false))); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint32_t>(4), static_cast<::vl::vint32_t>(4)); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint32_t>(100); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint>(4), static_cast<::vl::vint>(4)); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint>(100); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); } (this->__vwsn_precompile_2 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -126,7 +132,7 @@ namespace demo } (this->__vwsn_precompile_4 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(2)); + ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(2)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -134,7 +140,7 @@ namespace demo } (this->__vwsn_precompile_5 = ::vl::__vwsn::This(this->textBoxA)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxA)->SetText(::vl::WString(L"1", false)); @@ -147,10 +153,10 @@ namespace demo } (this->__vwsn_precompile_6 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -167,7 +173,7 @@ namespace demo } (this->__vwsn_precompile_8 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(2)); + ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(2)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -175,7 +181,7 @@ namespace demo } (this->__vwsn_precompile_9 = ::vl::__vwsn::This(this->textBoxB)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxB)->SetText(::vl::WString(L"2", false)); @@ -188,10 +194,10 @@ namespace demo } (this->__vwsn_precompile_10 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetSite(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -208,7 +214,7 @@ namespace demo } (this->__vwsn_precompile_12 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_12)->SetSite(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_12)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -219,7 +225,7 @@ namespace demo } (this->__vwsn_precompile_13 = ::vl::__vwsn::This(this->textBoxC)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_13)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_13)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_12)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->textBoxC)->GetBoundsComposition())); @@ -229,7 +235,7 @@ namespace demo } (this->__vwsn_precompile_14 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_14)->SetSite(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_14)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(2), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateButtonStyle(); @@ -237,7 +243,7 @@ namespace demo } (this->__vwsn_precompile_16 = ::vl::__vwsn::This(this->__vwsn_precompile_15)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_16)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_16)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_15)->SetText(::vl::WString(L"Calculate", false)); @@ -266,82 +272,6 @@ namespace demo #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) - CLASS_MEMBER_METHOD(buttonCalculate_Clicked, { L"sender" _ L"arguments" }) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_10) - CLASS_MEMBER_FIELD(__vwsn_precompile_11) - CLASS_MEMBER_FIELD(__vwsn_precompile_12) - CLASS_MEMBER_FIELD(__vwsn_precompile_13) - CLASS_MEMBER_FIELD(__vwsn_precompile_14) - CLASS_MEMBER_FIELD(__vwsn_precompile_15) - CLASS_MEMBER_FIELD(__vwsn_precompile_16) - CLASS_MEMBER_FIELD(__vwsn_precompile_17) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(__vwsn_precompile_3) - CLASS_MEMBER_FIELD(__vwsn_precompile_4) - CLASS_MEMBER_FIELD(__vwsn_precompile_5) - CLASS_MEMBER_FIELD(__vwsn_precompile_6) - CLASS_MEMBER_FIELD(__vwsn_precompile_7) - CLASS_MEMBER_FIELD(__vwsn_precompile_8) - CLASS_MEMBER_FIELD(__vwsn_precompile_9) - CLASS_MEMBER_FIELD(textBoxA) - CLASS_MEMBER_FIELD(textBoxB) - CLASS_MEMBER_FIELD(textBoxC) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..688e4721 --- /dev/null +++ b/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/DemoReflection.cpp @@ -0,0 +1,105 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + CLASS_MEMBER_METHOD(buttonCalculate_Clicked, { L"sender" _ L"arguments" }) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_10) + CLASS_MEMBER_FIELD(__vwsn_precompile_11) + CLASS_MEMBER_FIELD(__vwsn_precompile_12) + CLASS_MEMBER_FIELD(__vwsn_precompile_13) + CLASS_MEMBER_FIELD(__vwsn_precompile_14) + CLASS_MEMBER_FIELD(__vwsn_precompile_15) + CLASS_MEMBER_FIELD(__vwsn_precompile_16) + CLASS_MEMBER_FIELD(__vwsn_precompile_17) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(__vwsn_precompile_3) + CLASS_MEMBER_FIELD(__vwsn_precompile_4) + CLASS_MEMBER_FIELD(__vwsn_precompile_5) + CLASS_MEMBER_FIELD(__vwsn_precompile_6) + CLASS_MEMBER_FIELD(__vwsn_precompile_7) + CLASS_MEMBER_FIELD(__vwsn_precompile_8) + CLASS_MEMBER_FIELD(__vwsn_precompile_9) + CLASS_MEMBER_FIELD(textBoxA) + CLASS_MEMBER_FIELD(textBoxB) + CLASS_MEMBER_FIELD(textBoxC) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/DemoReflection.h new file mode 100644 index 00000000..7ed53165 --- /dev/null +++ b/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/DemoReflection.h @@ -0,0 +1,54 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/MainWindow.cpp b/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/MainWindow.cpp index 9e8cbac5..224426c2 100644 --- a/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/MainWindow.cpp +++ b/Tutorial/GacUI_Xml/Event_Cpp/UI/Source/MainWindow.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -56,7 +62,7 @@ namespace demo MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } } diff --git a/Tutorial/GacUI_Xml/Event_Script/Main.cpp b/Tutorial/GacUI_Xml/Event_Script/Main.cpp index 9181218d..244abbfb 100644 --- a/Tutorial/GacUI_Xml/Event_Script/Main.cpp +++ b/Tutorial/GacUI_Xml/Event_Script/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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() { { diff --git a/Tutorial/GacUI_Xml/Event_Script/UI/Codegen.bat b/Tutorial/GacUI_Xml/Event_Script/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Event_Script/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Event_Script/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Event_Script/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Event_Script/UI/Source/Demo.h index a12c85a4..7566a5bb 100644 --- a/Tutorial/GacUI_Xml/Event_Script/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Event_Script/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -12,24 +12,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Event_Script/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Event_Script/UI/Source/DemoPartialClasses.cpp index b53a464e..52e4a770 100644 --- a/Tutorial/GacUI_Xml/Event_Script/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Event_Script/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -61,7 +67,7 @@ Closures { auto a = ::vl::__vwsn::This(__vwsnthis_0->textBoxA)->GetText(); auto b = ::vl::__vwsn::This(__vwsnthis_0->textBoxB)->GetText(); - auto c = [&](){ try{ return ::vl::__vwsn::ToString((::vl::__vwsn::Parse<::vl::vint32_t>(a) + ::vl::__vwsn::Parse<::vl::vint32_t>(b))); } catch(...){ return ::vl::WString(L"", false); } }(); + auto c = [&](){ try{ return ::vl::__vwsn::ToString((::vl::__vwsn::Parse<::vl::vint>(a) + ::vl::__vwsn::Parse<::vl::vint>(b))); } catch(...){ return ::vl::WString(L"", false); } }(); ::vl::__vwsn::This(__vwsnthis_0->textBoxC)->SetText(c); } } @@ -77,41 +83,41 @@ namespace demo (this->__vwsn_precompile_0 = __vwsn_this_); (this->__vwsn_precompile_17 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_17)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_17)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Event_Script", false)); } (this->__vwsn_precompile_1 = new ::vl::presentation::compositions::GuiTableComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"5", false))); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"5", false))); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint32_t>(4), static_cast<::vl::vint32_t>(4)); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint32_t>(100); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint>(4), static_cast<::vl::vint>(4)); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint>(100); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); } (this->__vwsn_precompile_2 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -128,7 +134,7 @@ namespace demo } (this->__vwsn_precompile_4 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(2)); + ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(2)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -136,7 +142,7 @@ namespace demo } (this->__vwsn_precompile_5 = ::vl::__vwsn::This(this->textBoxA)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxA)->SetText(::vl::WString(L"1", false)); @@ -149,10 +155,10 @@ namespace demo } (this->__vwsn_precompile_6 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -169,7 +175,7 @@ namespace demo } (this->__vwsn_precompile_8 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(2)); + ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(2)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -177,7 +183,7 @@ namespace demo } (this->__vwsn_precompile_9 = ::vl::__vwsn::This(this->textBoxB)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxB)->SetText(::vl::WString(L"2", false)); @@ -190,10 +196,10 @@ namespace demo } (this->__vwsn_precompile_10 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetSite(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -210,7 +216,7 @@ namespace demo } (this->__vwsn_precompile_12 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_12)->SetSite(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_12)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -221,7 +227,7 @@ namespace demo } (this->__vwsn_precompile_13 = ::vl::__vwsn::This(this->textBoxC)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_13)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_13)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_12)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->textBoxC)->GetBoundsComposition())); @@ -231,7 +237,7 @@ namespace demo } (this->__vwsn_precompile_14 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_14)->SetSite(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_14)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(2), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateButtonStyle(); @@ -239,7 +245,7 @@ namespace demo } (this->__vwsn_precompile_16 = ::vl::__vwsn::This(this->__vwsn_precompile_15)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_16)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_16)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_15)->SetText(::vl::WString(L"Calculate", false)); @@ -278,7 +284,7 @@ Class (::demo::MainWindow) MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } } @@ -287,81 +293,6 @@ Class (::demo::MainWindow) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_10) - CLASS_MEMBER_FIELD(__vwsn_precompile_11) - CLASS_MEMBER_FIELD(__vwsn_precompile_12) - CLASS_MEMBER_FIELD(__vwsn_precompile_13) - CLASS_MEMBER_FIELD(__vwsn_precompile_14) - CLASS_MEMBER_FIELD(__vwsn_precompile_15) - CLASS_MEMBER_FIELD(__vwsn_precompile_16) - CLASS_MEMBER_FIELD(__vwsn_precompile_17) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(__vwsn_precompile_3) - CLASS_MEMBER_FIELD(__vwsn_precompile_4) - CLASS_MEMBER_FIELD(__vwsn_precompile_5) - CLASS_MEMBER_FIELD(__vwsn_precompile_6) - CLASS_MEMBER_FIELD(__vwsn_precompile_7) - CLASS_MEMBER_FIELD(__vwsn_precompile_8) - CLASS_MEMBER_FIELD(__vwsn_precompile_9) - CLASS_MEMBER_FIELD(textBoxA) - CLASS_MEMBER_FIELD(textBoxB) - CLASS_MEMBER_FIELD(textBoxC) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Event_Script/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Event_Script/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..0da2ab5f --- /dev/null +++ b/Tutorial/GacUI_Xml/Event_Script/UI/Source/DemoReflection.cpp @@ -0,0 +1,104 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_10) + CLASS_MEMBER_FIELD(__vwsn_precompile_11) + CLASS_MEMBER_FIELD(__vwsn_precompile_12) + CLASS_MEMBER_FIELD(__vwsn_precompile_13) + CLASS_MEMBER_FIELD(__vwsn_precompile_14) + CLASS_MEMBER_FIELD(__vwsn_precompile_15) + CLASS_MEMBER_FIELD(__vwsn_precompile_16) + CLASS_MEMBER_FIELD(__vwsn_precompile_17) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(__vwsn_precompile_3) + CLASS_MEMBER_FIELD(__vwsn_precompile_4) + CLASS_MEMBER_FIELD(__vwsn_precompile_5) + CLASS_MEMBER_FIELD(__vwsn_precompile_6) + CLASS_MEMBER_FIELD(__vwsn_precompile_7) + CLASS_MEMBER_FIELD(__vwsn_precompile_8) + CLASS_MEMBER_FIELD(__vwsn_precompile_9) + CLASS_MEMBER_FIELD(textBoxA) + CLASS_MEMBER_FIELD(textBoxB) + CLASS_MEMBER_FIELD(textBoxC) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Event_Script/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Event_Script/UI/Source/DemoReflection.h new file mode 100644 index 00000000..7ed53165 --- /dev/null +++ b/Tutorial/GacUI_Xml/Event_Script/UI/Source/DemoReflection.h @@ -0,0 +1,54 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Event_ViewModel/Main.cpp b/Tutorial/GacUI_Xml/Event_ViewModel/Main.cpp index bf5567c5..2ea030b4 100644 --- a/Tutorial/GacUI_Xml/Event_ViewModel/Main.cpp +++ b/Tutorial/GacUI_Xml/Event_ViewModel/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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(); -} - class ViewModelImpl : public Object, public virtual demo::IViewModel { public: diff --git a/Tutorial/GacUI_Xml/Event_ViewModel/UI/Codegen.bat b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Event_ViewModel/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/Demo.h index 7ce6f38c..7566a5bb 100644 --- a/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -12,36 +12,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::IViewModel) - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) - - BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(::demo::IViewModel) - ::vl::vint32_t Add(::vl::vint32_t a, ::vl::vint32_t b) override - { - INVOKEGET_INTERFACE_PROXY(Add, a, b); - } - ::vl::WString Error() override - { - INVOKEGET_INTERFACE_PROXY_NOPARAMS(Error); - } - END_INTERFACE_PROXY(::demo::IViewModel) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoPartialClasses.cpp index bddccb9b..927f79a5 100644 --- a/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -59,7 +65,7 @@ Closures void __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const { - ::vl::__vwsn::This(__vwsnthis_0->textBoxC)->SetText([&](){ try{ return ::vl::__vwsn::ToString(::vl::__vwsn::This(__vwsnthis_0->ViewModel.Obj())->Add(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::__vwsn::This(__vwsnthis_0->textBoxA)->GetText()), ::vl::__vwsn::Parse<::vl::vint32_t>(::vl::__vwsn::This(__vwsnthis_0->textBoxB)->GetText()))); } catch(...){ return ::vl::__vwsn::This(__vwsnthis_0->ViewModel.Obj())->Error(); } }()); + ::vl::__vwsn::This(__vwsnthis_0->textBoxC)->SetText([&](){ try{ return ::vl::__vwsn::ToString(::vl::__vwsn::This(__vwsnthis_0->ViewModel.Obj())->Add(::vl::__vwsn::Parse<::vl::vint>(::vl::__vwsn::This(__vwsnthis_0->textBoxA)->GetText()), ::vl::__vwsn::Parse<::vl::vint>(::vl::__vwsn::This(__vwsnthis_0->textBoxB)->GetText()))); } catch(...){ return ::vl::__vwsn::This(__vwsnthis_0->ViewModel.Obj())->Error(); } }()); } } @@ -75,41 +81,41 @@ namespace demo (this->ViewModel = ::vl::__vwsn::This(__vwsn_this_)->GetViewModel()); (this->__vwsn_precompile_17 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_17)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_17)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Event_ViewModel", false)); } (this->__vwsn_precompile_1 = new ::vl::presentation::compositions::GuiTableComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"5", false))); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"5", false))); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint32_t>(4), static_cast<::vl::vint32_t>(4)); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint32_t>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint32_t>(100); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint32_t>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowsAndColumns(static_cast<::vl::vint>(4), static_cast<::vl::vint>(4)); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetRowOption(static_cast<::vl::vint>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint>(100); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnOption(static_cast<::vl::vint>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); } (this->__vwsn_precompile_2 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -126,7 +132,7 @@ namespace demo } (this->__vwsn_precompile_4 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(2)); + ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(2)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -134,7 +140,7 @@ namespace demo } (this->__vwsn_precompile_5 = ::vl::__vwsn::This(this->textBoxA)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxA)->SetText(::vl::WString(L"1", false)); @@ -147,10 +153,10 @@ namespace demo } (this->__vwsn_precompile_6 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -167,7 +173,7 @@ namespace demo } (this->__vwsn_precompile_8 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(2)); + ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(2)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -175,7 +181,7 @@ namespace demo } (this->__vwsn_precompile_9 = ::vl::__vwsn::This(this->textBoxB)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxB)->SetText(::vl::WString(L"2", false)); @@ -188,10 +194,10 @@ namespace demo } (this->__vwsn_precompile_10 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetSite(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle(); @@ -208,7 +214,7 @@ namespace demo } (this->__vwsn_precompile_12 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_12)->SetSite(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_12)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -219,7 +225,7 @@ namespace demo } (this->__vwsn_precompile_13 = ::vl::__vwsn::This(this->textBoxC)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_13)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_13)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_12)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->textBoxC)->GetBoundsComposition())); @@ -229,7 +235,7 @@ namespace demo } (this->__vwsn_precompile_14 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_14)->SetSite(static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(2), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_14)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(2), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateButtonStyle(); @@ -237,7 +243,7 @@ namespace demo } (this->__vwsn_precompile_16 = ::vl::__vwsn::This(this->__vwsn_precompile_15)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_16)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_16)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_15)->SetText(::vl::WString(L"Calculate", false)); @@ -282,7 +288,7 @@ Class (::demo::MainWindow) MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } /*********************************************************************** @@ -295,92 +301,6 @@ Class (::demo::IViewModel) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::IViewModel) - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_INTERFACE_MEMBER(::demo::IViewModel) - CLASS_MEMBER_METHOD(Add, { L"a" _ L"b" }) - CLASS_MEMBER_METHOD(Error, NO_PARAMETER) - END_INTERFACE_MEMBER(::demo::IViewModel) - - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(::vl::Ptr<::demo::IViewModel>), { L"__vwsn_ctor_parameter_ViewModel" }) - CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER) - CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel) - CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_10) - CLASS_MEMBER_FIELD(__vwsn_precompile_11) - CLASS_MEMBER_FIELD(__vwsn_precompile_12) - CLASS_MEMBER_FIELD(__vwsn_precompile_13) - CLASS_MEMBER_FIELD(__vwsn_precompile_14) - CLASS_MEMBER_FIELD(__vwsn_precompile_15) - CLASS_MEMBER_FIELD(__vwsn_precompile_16) - CLASS_MEMBER_FIELD(__vwsn_precompile_17) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(__vwsn_precompile_3) - CLASS_MEMBER_FIELD(__vwsn_precompile_4) - CLASS_MEMBER_FIELD(__vwsn_precompile_5) - CLASS_MEMBER_FIELD(__vwsn_precompile_6) - CLASS_MEMBER_FIELD(__vwsn_precompile_7) - CLASS_MEMBER_FIELD(__vwsn_precompile_8) - CLASS_MEMBER_FIELD(__vwsn_precompile_9) - CLASS_MEMBER_FIELD(ViewModel) - CLASS_MEMBER_FIELD(textBoxA) - CLASS_MEMBER_FIELD(textBoxB) - CLASS_MEMBER_FIELD(textBoxC) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::IViewModel) - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoPartialClasses.h b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoPartialClasses.h index 193c29dc..78a30df1 100644 --- a/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoPartialClasses.h +++ b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoPartialClasses.h @@ -88,7 +88,7 @@ namespace demo friend struct ::vl::reflection::description::CustomTypeDescriptorSelector; #endif public: - virtual ::vl::vint32_t Add(::vl::vint32_t a, ::vl::vint32_t b) = 0; + virtual ::vl::vint Add(::vl::vint a, ::vl::vint b) = 0; virtual ::vl::WString Error() = 0; }; diff --git a/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..d936ed8e --- /dev/null +++ b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoReflection.cpp @@ -0,0 +1,115 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::IViewModel) + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_INTERFACE_MEMBER(::demo::IViewModel) + CLASS_MEMBER_METHOD(Add, { L"a" _ L"b" }) + CLASS_MEMBER_METHOD(Error, NO_PARAMETER) + END_INTERFACE_MEMBER(::demo::IViewModel) + + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(::vl::Ptr<::demo::IViewModel>), { L"__vwsn_ctor_parameter_ViewModel" }) + CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER) + CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel) + CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_10) + CLASS_MEMBER_FIELD(__vwsn_precompile_11) + CLASS_MEMBER_FIELD(__vwsn_precompile_12) + CLASS_MEMBER_FIELD(__vwsn_precompile_13) + CLASS_MEMBER_FIELD(__vwsn_precompile_14) + CLASS_MEMBER_FIELD(__vwsn_precompile_15) + CLASS_MEMBER_FIELD(__vwsn_precompile_16) + CLASS_MEMBER_FIELD(__vwsn_precompile_17) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(__vwsn_precompile_3) + CLASS_MEMBER_FIELD(__vwsn_precompile_4) + CLASS_MEMBER_FIELD(__vwsn_precompile_5) + CLASS_MEMBER_FIELD(__vwsn_precompile_6) + CLASS_MEMBER_FIELD(__vwsn_precompile_7) + CLASS_MEMBER_FIELD(__vwsn_precompile_8) + CLASS_MEMBER_FIELD(__vwsn_precompile_9) + CLASS_MEMBER_FIELD(ViewModel) + CLASS_MEMBER_FIELD(textBoxA) + CLASS_MEMBER_FIELD(textBoxB) + CLASS_MEMBER_FIELD(textBoxC) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::IViewModel) + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoReflection.h new file mode 100644 index 00000000..03f07924 --- /dev/null +++ b/Tutorial/GacUI_Xml/Event_ViewModel/UI/Source/DemoReflection.h @@ -0,0 +1,66 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::IViewModel) + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) + + BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(::demo::IViewModel) + ::vl::vint Add(::vl::vint a, ::vl::vint b) override + { + INVOKEGET_INTERFACE_PROXY(Add, a, b); + } + ::vl::WString Error() override + { + INVOKEGET_INTERFACE_PROXY_NOPARAMS(Error); + } + END_INTERFACE_PROXY(::demo::IViewModel) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Instance_Control/Main.cpp b/Tutorial/GacUI_Xml/Instance_Control/Main.cpp index cd26118e..445e89d6 100644 --- a/Tutorial/GacUI_Xml/Instance_Control/Main.cpp +++ b/Tutorial/GacUI_Xml/Instance_Control/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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() { { diff --git a/Tutorial/GacUI_Xml/Instance_Control/UI/Codegen.bat b/Tutorial/GacUI_Xml/Instance_Control/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Instance_Control/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Instance_Control/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Instance_Control/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Instance_Control/UI/Source/Demo.h index 15b96805..7566a5bb 100644 --- a/Tutorial/GacUI_Xml/Instance_Control/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Instance_Control/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -12,26 +12,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) - DECL_TYPE_INFO(::demo::MyControl) - DECL_TYPE_INFO(::demo::MyControlConstructor) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Instance_Control/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Instance_Control/UI/Source/DemoPartialClasses.cpp index 113d2b66..326467ea 100644 --- a/Tutorial/GacUI_Xml/Instance_Control/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Instance_Control/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -213,17 +219,17 @@ namespace demo (this->__vwsn_precompile_0 = __vwsn_this_); (this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Instance_Control", false)); } (this->__vwsn_precompile_1 = new ::demo::MyControl()); { - ::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 = static_cast<::vl::vint32_t>(32); __vwsn_temp__.antialias = true; return __vwsn_temp__; }()); + ::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 = static_cast<::vl::vint>(32); __vwsn_temp__.antialias = true; return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetText(::vl::WString(L"This is a control!", false)); @@ -252,7 +258,7 @@ Class (::demo::MainWindow) MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } /*********************************************************************** @@ -272,7 +278,7 @@ Class (::demo::MyControlConstructor) } (this->__vwsn_precompile_1 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->self)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->__vwsn_precompile_0)); @@ -308,7 +314,7 @@ Class (::demo::MyControl) MyControl::~MyControl() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiCustomControl*>(this)); } } @@ -317,80 +323,6 @@ Class (::demo::MyControl) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - IMPL_CPP_TYPE_INFO(demo::MyControl) - IMPL_CPP_TYPE_INFO(demo::MyControlConstructor) - -#define _ , - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - - BEGIN_CLASS_MEMBER(::demo::MyControl) - CLASS_MEMBER_CONSTRUCTOR(::demo::MyControl*(), NO_PARAMETER) - END_CLASS_MEMBER(::demo::MyControl) - - BEGIN_CLASS_MEMBER(::demo::MyControlConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MyControlConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(self) - END_CLASS_MEMBER(::demo::MyControlConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - ADD_TYPE_INFO(::demo::MyControl) - ADD_TYPE_INFO(::demo::MyControlConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Instance_Control/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Instance_Control/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..467828bf --- /dev/null +++ b/Tutorial/GacUI_Xml/Instance_Control/UI/Source/DemoReflection.cpp @@ -0,0 +1,103 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + IMPL_CPP_TYPE_INFO(demo::MyControl) + IMPL_CPP_TYPE_INFO(demo::MyControlConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + + BEGIN_CLASS_MEMBER(::demo::MyControl) + CLASS_MEMBER_CONSTRUCTOR(::demo::MyControl*(), NO_PARAMETER) + END_CLASS_MEMBER(::demo::MyControl) + + BEGIN_CLASS_MEMBER(::demo::MyControlConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MyControlConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(self) + END_CLASS_MEMBER(::demo::MyControlConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + ADD_TYPE_INFO(::demo::MyControl) + ADD_TYPE_INFO(::demo::MyControlConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Instance_Control/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Instance_Control/UI/Source/DemoReflection.h new file mode 100644 index 00000000..9a75911b --- /dev/null +++ b/Tutorial/GacUI_Xml/Instance_Control/UI/Source/DemoReflection.h @@ -0,0 +1,56 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) + DECL_TYPE_INFO(::demo::MyControl) + DECL_TYPE_INFO(::demo::MyControlConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Instance_MultipleWindows/Main.cpp b/Tutorial/GacUI_Xml/Instance_MultipleWindows/Main.cpp index d47b62f1..274dc670 100644 --- a/Tutorial/GacUI_Xml/Instance_MultipleWindows/Main.cpp +++ b/Tutorial/GacUI_Xml/Instance_MultipleWindows/Main.cpp @@ -1,15 +1,8 @@ #define GAC_HEADER_USE_NAMESPACE #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() { { diff --git a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Codegen.bat b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/Demo.h index 36638563..3cd0ec2e 100644 --- a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -13,26 +13,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" #include "MainWindow.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::AnotherWindow) - DECL_TYPE_INFO(::demo::AnotherWindowConstructor) - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoPartialClasses.cpp index 022b5f5e..ebcb933d 100644 --- a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -75,10 +81,10 @@ namespace demo (this->__vwsn_precompile_0 = __vwsn_this_); (this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(320); __vwsn_temp__.y = static_cast<::vl::vint32_t>(280); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(320); __vwsn_temp__.y = static_cast<::vl::vint>(280); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(320); __vwsn_temp__.y = static_cast<::vl::vint32_t>(280); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(320); __vwsn_temp__.y = static_cast<::vl::vint>(280); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Another Window", false)); @@ -88,7 +94,7 @@ namespace demo (this->__vwsn_precompile_1 = new ::vl::presentation::controls::GuiLabel(__vwsn_controlStyle_)); } { - ::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 = static_cast<::vl::vint32_t>(32); __vwsn_temp__.antialias = true; return __vwsn_temp__; }()); + ::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 = static_cast<::vl::vint>(32); __vwsn_temp__.antialias = true; return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetText(::vl::WString(L"This is another window!", false)); @@ -117,7 +123,7 @@ Class (::demo::AnotherWindow) AnotherWindow::~AnotherWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } /*********************************************************************** @@ -129,10 +135,10 @@ Class (::demo::MainWindowConstructor) (this->__vwsn_precompile_0 = __vwsn_this_); (this->__vwsn_precompile_3 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_3)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_3)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Instance_MultipleWindows", false)); @@ -143,7 +149,7 @@ Class (::demo::MainWindowConstructor) } (this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->__vwsn_precompile_1)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(20); __vwsn_temp__.top = static_cast<::vl::vint32_t>(20); __vwsn_temp__.right = (- static_cast<::vl::vint32_t>(1)); __vwsn_temp__.bottom = (- static_cast<::vl::vint32_t>(1)); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(20); __vwsn_temp__.top = static_cast<::vl::vint>(20); __vwsn_temp__.right = (- static_cast<::vl::vint>(1)); __vwsn_temp__.bottom = (- static_cast<::vl::vint>(1)); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetText(::vl::WString(L"Click me to show another window!", false)); @@ -166,81 +172,6 @@ Class (::demo::MainWindowConstructor) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::AnotherWindow) - IMPL_CPP_TYPE_INFO(demo::AnotherWindowConstructor) - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_CLASS_MEMBER(::demo::AnotherWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::AnotherWindow*(), NO_PARAMETER) - END_CLASS_MEMBER(::demo::AnotherWindow) - - BEGIN_CLASS_MEMBER(::demo::AnotherWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::AnotherWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - END_CLASS_MEMBER(::demo::AnotherWindowConstructor) - - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) - CLASS_MEMBER_METHOD(buttonShowWindow_Clicked, { L"sender" _ L"arguments" }) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(__vwsn_precompile_3) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::AnotherWindow) - ADD_TYPE_INFO(::demo::AnotherWindowConstructor) - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..9a9614be --- /dev/null +++ b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoReflection.cpp @@ -0,0 +1,104 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::AnotherWindow) + IMPL_CPP_TYPE_INFO(demo::AnotherWindowConstructor) + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::AnotherWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::AnotherWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(::demo::AnotherWindow) + + BEGIN_CLASS_MEMBER(::demo::AnotherWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::AnotherWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + END_CLASS_MEMBER(::demo::AnotherWindowConstructor) + + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + CLASS_MEMBER_METHOD(buttonShowWindow_Clicked, { L"sender" _ L"arguments" }) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(__vwsn_precompile_3) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::AnotherWindow) + ADD_TYPE_INFO(::demo::AnotherWindowConstructor) + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoReflection.h new file mode 100644 index 00000000..9182578c --- /dev/null +++ b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoReflection.h @@ -0,0 +1,56 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::AnotherWindow) + DECL_TYPE_INFO(::demo::AnotherWindowConstructor) + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/MainWindow.cpp b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/MainWindow.cpp index 8d609970..e4a7e0b0 100644 --- a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/MainWindow.cpp +++ b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/MainWindow.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -50,7 +56,7 @@ namespace demo MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } } diff --git a/Tutorial/GacUI_Xml/Instance_Window/Main.cpp b/Tutorial/GacUI_Xml/Instance_Window/Main.cpp index 8c61dd5c..e202c12d 100644 --- a/Tutorial/GacUI_Xml/Instance_Window/Main.cpp +++ b/Tutorial/GacUI_Xml/Instance_Window/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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() { { diff --git a/Tutorial/GacUI_Xml/Instance_Window/UI/Codegen.bat b/Tutorial/GacUI_Xml/Instance_Window/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Instance_Window/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Instance_Window/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Instance_Window/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Instance_Window/UI/Source/Demo.h index a12c85a4..7566a5bb 100644 --- a/Tutorial/GacUI_Xml/Instance_Window/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Instance_Window/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -12,24 +12,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Instance_Window/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Instance_Window/UI/Source/DemoPartialClasses.cpp index f1841a0b..829bfb82 100644 --- a/Tutorial/GacUI_Xml/Instance_Window/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Instance_Window/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -58,10 +64,10 @@ namespace demo (this->__vwsn_precompile_0 = __vwsn_this_); (this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Instance_Window", false)); @@ -71,7 +77,7 @@ namespace demo (this->__vwsn_precompile_1 = new ::vl::presentation::controls::GuiLabel(__vwsn_controlStyle_)); } { - ::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 = static_cast<::vl::vint32_t>(32); __vwsn_temp__.antialias = true; return __vwsn_temp__; }()); + ::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 = static_cast<::vl::vint>(32); __vwsn_temp__.antialias = true; return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetText(::vl::WString(L"This is a window!", false)); @@ -100,7 +106,7 @@ Class (::demo::MainWindow) MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } } @@ -109,63 +115,6 @@ Class (::demo::MainWindow) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Instance_Window/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Instance_Window/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..cf4a4ea6 --- /dev/null +++ b/Tutorial/GacUI_Xml/Instance_Window/UI/Source/DemoReflection.cpp @@ -0,0 +1,86 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Instance_Window/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Instance_Window/UI/Source/DemoReflection.h new file mode 100644 index 00000000..7ed53165 --- /dev/null +++ b/Tutorial/GacUI_Xml/Instance_Window/UI/Source/DemoReflection.h @@ -0,0 +1,54 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Member_Field/Main.cpp b/Tutorial/GacUI_Xml/Member_Field/Main.cpp index 80317676..978ec864 100644 --- a/Tutorial/GacUI_Xml/Member_Field/Main.cpp +++ b/Tutorial/GacUI_Xml/Member_Field/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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() { { diff --git a/Tutorial/GacUI_Xml/Member_Field/UI/Codegen.bat b/Tutorial/GacUI_Xml/Member_Field/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Member_Field/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Member_Field/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Member_Field/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Member_Field/UI/Source/Demo.h index b364bcac..3cd0ec2e 100644 --- a/Tutorial/GacUI_Xml/Member_Field/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Member_Field/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -13,24 +13,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" #include "MainWindow.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Member_Field/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Member_Field/UI/Source/DemoPartialClasses.cpp index 95247166..4bebd316 100644 --- a/Tutorial/GacUI_Xml/Member_Field/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Member_Field/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -77,7 +83,7 @@ Closures void __vwsnf2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const { - (::vl::__vwsn::This(__vwsnthis_0->self)->integerState = ::vl::__vwsn::Parse<::vl::vint32_t>(::vl::__vwsn::This(__vwsnthis_0->textBoxA)->GetText())); + (::vl::__vwsn::This(__vwsnthis_0->self)->integerState = ::vl::__vwsn::Parse<::vl::vint>(::vl::__vwsn::This(__vwsnthis_0->textBoxA)->GetText())); } //------------------------------------------------------------------- @@ -163,10 +169,10 @@ namespace demo (this->self = __vwsn_this_); (this->__vwsn_precompile_11 = ::vl::__vwsn::This(this->self)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_11)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_11)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->self)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->self)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->self)->SetText(::vl::WString(L"Member_Field", false)); @@ -176,23 +182,23 @@ namespace demo ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"5", false))); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"5", false))); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowsAndColumns(static_cast<::vl::vint32_t>(3), static_cast<::vl::vint32_t>(3)); - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint32_t>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint32_t>(100); return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint32_t>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint32_t>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowsAndColumns(static_cast<::vl::vint>(3), static_cast<::vl::vint>(3)); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint>(100); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); } (this->__vwsn_precompile_1 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -200,7 +206,7 @@ namespace demo } (this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->textBoxA)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxA)->SetText(::vl::WString(L"12345", false)); @@ -213,7 +219,7 @@ namespace demo } (this->__vwsn_precompile_3 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_3)->SetSite(static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_3)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateButtonStyle(); @@ -221,7 +227,7 @@ namespace demo } (this->__vwsn_precompile_5 = ::vl::__vwsn::This(this->__vwsn_precompile_4)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetText(::vl::WString(L"Copy in Script", false)); @@ -234,7 +240,7 @@ namespace demo } (this->__vwsn_precompile_6 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(0), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle(); @@ -242,7 +248,7 @@ namespace demo } (this->__vwsn_precompile_7 = ::vl::__vwsn::This(this->textBoxB)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_7)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_7)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textBoxB)->SetText(::vl::WString(L"", false)); @@ -255,7 +261,7 @@ namespace demo } (this->__vwsn_precompile_8 = new ::vl::presentation::compositions::GuiCellComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetSite(static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1), static_cast<::vl::vint32_t>(1)); + ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateButtonStyle(); @@ -263,7 +269,7 @@ namespace demo } (this->__vwsn_precompile_10 = ::vl::__vwsn::This(this->__vwsn_precompile_9)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(0); __vwsn_temp__.top = static_cast<::vl::vint32_t>(0); __vwsn_temp__.right = static_cast<::vl::vint32_t>(0); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(0); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetText(::vl::WString(L"Paste in C++", false)); @@ -301,77 +307,6 @@ namespace demo #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) - CLASS_MEMBER_METHOD(buttonPaste_Clicked, { L"sender" _ L"arguments" }) - CLASS_MEMBER_FIELD(integerState) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_10) - CLASS_MEMBER_FIELD(__vwsn_precompile_11) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(__vwsn_precompile_3) - CLASS_MEMBER_FIELD(__vwsn_precompile_4) - CLASS_MEMBER_FIELD(__vwsn_precompile_5) - CLASS_MEMBER_FIELD(__vwsn_precompile_6) - CLASS_MEMBER_FIELD(__vwsn_precompile_7) - CLASS_MEMBER_FIELD(__vwsn_precompile_8) - CLASS_MEMBER_FIELD(__vwsn_precompile_9) - CLASS_MEMBER_FIELD(self) - CLASS_MEMBER_FIELD(textBoxA) - CLASS_MEMBER_FIELD(textBoxB) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Member_Field/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Member_Field/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..2c4e64db --- /dev/null +++ b/Tutorial/GacUI_Xml/Member_Field/UI/Source/DemoReflection.cpp @@ -0,0 +1,100 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + CLASS_MEMBER_METHOD(buttonPaste_Clicked, { L"sender" _ L"arguments" }) + CLASS_MEMBER_FIELD(integerState) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_10) + CLASS_MEMBER_FIELD(__vwsn_precompile_11) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(__vwsn_precompile_3) + CLASS_MEMBER_FIELD(__vwsn_precompile_4) + CLASS_MEMBER_FIELD(__vwsn_precompile_5) + CLASS_MEMBER_FIELD(__vwsn_precompile_6) + CLASS_MEMBER_FIELD(__vwsn_precompile_7) + CLASS_MEMBER_FIELD(__vwsn_precompile_8) + CLASS_MEMBER_FIELD(__vwsn_precompile_9) + CLASS_MEMBER_FIELD(self) + CLASS_MEMBER_FIELD(textBoxA) + CLASS_MEMBER_FIELD(textBoxB) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Member_Field/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Member_Field/UI/Source/DemoReflection.h new file mode 100644 index 00000000..7ed53165 --- /dev/null +++ b/Tutorial/GacUI_Xml/Member_Field/UI/Source/DemoReflection.h @@ -0,0 +1,54 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Member_Field/UI/Source/MainWindow.cpp b/Tutorial/GacUI_Xml/Member_Field/UI/Source/MainWindow.cpp index 4ceb167e..badb581d 100644 --- a/Tutorial/GacUI_Xml/Member_Field/UI/Source/MainWindow.cpp +++ b/Tutorial/GacUI_Xml/Member_Field/UI/Source/MainWindow.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -48,7 +54,7 @@ namespace demo MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } } diff --git a/Tutorial/GacUI_Xml/Member_Field/UI/Source/MainWindow.h b/Tutorial/GacUI_Xml/Member_Field/UI/Source/MainWindow.h index 48b85a46..956a3cb9 100644 --- a/Tutorial/GacUI_Xml/Member_Field/UI/Source/MainWindow.h +++ b/Tutorial/GacUI_Xml/Member_Field/UI/Source/MainWindow.h @@ -36,7 +36,7 @@ namespace demo friend struct ::vl::reflection::description::CustomTypeDescriptorSelector; #endif protected: - ::vl::vint32_t integerState = static_cast<::vl::vint32_t>(0); + ::vl::vint integerState = static_cast<::vl::vint>(0); void buttonPaste_Clicked(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments); public: MainWindow(); diff --git a/Tutorial/GacUI_Xml/Member_Parameter/Main.cpp b/Tutorial/GacUI_Xml/Member_Parameter/Main.cpp index 3298250a..72ac7b15 100644 --- a/Tutorial/GacUI_Xml/Member_Parameter/Main.cpp +++ b/Tutorial/GacUI_Xml/Member_Parameter/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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(); -} - class ViewModelImpl : public Object, public virtual demo::IViewModel { public: diff --git a/Tutorial/GacUI_Xml/Member_Parameter/UI/Codegen.bat b/Tutorial/GacUI_Xml/Member_Parameter/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Member_Parameter/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Member_Parameter/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/Demo.h index 125ccf24..7566a5bb 100644 --- a/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -12,32 +12,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::IViewModel) - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) - - BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(::demo::IViewModel) - ::vl::WString GetText() override - { - INVOKEGET_INTERFACE_PROXY_NOPARAMS(GetText); - } - END_INTERFACE_PROXY(::demo::IViewModel) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/DemoPartialClasses.cpp index f7823b36..3707887e 100644 --- a/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -59,10 +65,10 @@ namespace demo (this->ViewModel = ::vl::__vwsn::This(__vwsn_this_)->GetViewModel()); (this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Member_Parameter", false)); @@ -72,7 +78,7 @@ namespace demo (this->__vwsn_precompile_1 = new ::vl::presentation::controls::GuiLabel(__vwsn_controlStyle_)); } { - ::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 = static_cast<::vl::vint32_t>(32); __vwsn_temp__.antialias = true; return __vwsn_temp__; }()); + ::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 = static_cast<::vl::vint>(32); __vwsn_temp__.antialias = true; return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->__vwsn_precompile_1)); @@ -107,7 +113,7 @@ Class (::demo::MainWindow) MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } /*********************************************************************** @@ -120,73 +126,6 @@ Class (::demo::IViewModel) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::IViewModel) - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - -#define _ , - BEGIN_INTERFACE_MEMBER(::demo::IViewModel) - CLASS_MEMBER_METHOD(GetText, NO_PARAMETER) - END_INTERFACE_MEMBER(::demo::IViewModel) - - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(::vl::Ptr<::demo::IViewModel>), { L"__vwsn_ctor_parameter_ViewModel" }) - CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER) - CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel) - CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(ViewModel) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::IViewModel) - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..818a3c44 --- /dev/null +++ b/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/DemoReflection.cpp @@ -0,0 +1,96 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::IViewModel) + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_INTERFACE_MEMBER(::demo::IViewModel) + CLASS_MEMBER_METHOD(GetText, NO_PARAMETER) + END_INTERFACE_MEMBER(::demo::IViewModel) + + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(::vl::Ptr<::demo::IViewModel>), { L"__vwsn_ctor_parameter_ViewModel" }) + CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER) + CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel) + CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(ViewModel) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::IViewModel) + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/DemoReflection.h new file mode 100644 index 00000000..0107e3db --- /dev/null +++ b/Tutorial/GacUI_Xml/Member_Parameter/UI/Source/DemoReflection.h @@ -0,0 +1,62 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::IViewModel) + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) + + BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(::demo::IViewModel) + ::vl::WString GetText() override + { + INVOKEGET_INTERFACE_PROXY_NOPARAMS(GetText); + } + END_INTERFACE_PROXY(::demo::IViewModel) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Xml/Member_Property/Main.cpp b/Tutorial/GacUI_Xml/Member_Property/Main.cpp index 504a44a9..8069f93e 100644 --- a/Tutorial/GacUI_Xml/Member_Property/Main.cpp +++ b/Tutorial/GacUI_Xml/Member_Property/Main.cpp @@ -1,15 +1,9 @@ #define GAC_HEADER_USE_NAMESPACE #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() { { diff --git a/Tutorial/GacUI_Xml/Member_Property/UI/Codegen.bat b/Tutorial/GacUI_Xml/Member_Property/UI/Codegen.bat index 27f6654b..c10d1c79 100644 --- a/Tutorial/GacUI_Xml/Member_Property/UI/Codegen.bat +++ b/Tutorial/GacUI_Xml/Member_Property/UI/Codegen.bat @@ -1 +1 @@ -..\..\..\..\Tools\GacGen.exe Resource.xml \ No newline at end of file +%~dp0..\..\..\..\Tools\GacGen Resource.xml diff --git a/Tutorial/GacUI_Xml/Member_Property/UI/Source/Demo.h b/Tutorial/GacUI_Xml/Member_Property/UI/Source/Demo.h index 15b96805..7566a5bb 100644 --- a/Tutorial/GacUI_Xml/Member_Property/UI/Source/Demo.h +++ b/Tutorial/GacUI_Xml/Member_Property/UI/Source/Demo.h @@ -1,4 +1,4 @@ -/*********************************************************************** +/*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! GacGen.exe Resource.xml @@ -12,26 +12,4 @@ https://github.com/vczh-libraries #include "DemoPartialClasses.h" -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - DECL_TYPE_INFO(::demo::MainWindow) - DECL_TYPE_INFO(::demo::MainWindowConstructor) - DECL_TYPE_INFO(::demo::MyControl) - DECL_TYPE_INFO(::demo::MyControlConstructor) -#endif - - extern bool LoadDemoTypes(); - } - } -} - #endif diff --git a/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoPartialClasses.cpp index e4d1c180..4c2aa1a5 100644 --- a/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoPartialClasses.cpp @@ -8,6 +8,12 @@ https://github.com/vczh-libraries ***********************************************************************/ #include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.h" +#endif +/* CodePack:EndIgnore() */ #if defined( _MSC_VER) #pragma warning(push) @@ -237,10 +243,10 @@ namespace demo (this->__vwsn_precompile_0 = __vwsn_this_); (this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { - ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint32_t>(480); __vwsn_temp__.y = static_cast<::vl::vint32_t>(320); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(480); __vwsn_temp__.y = static_cast<::vl::vint>(320); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetText(::vl::WString(L"Member_Property", false)); @@ -248,7 +254,7 @@ namespace demo (this->myControl = new ::demo::MyControl()); (this->__vwsn_precompile_1 = ::vl::__vwsn::This(this->myControl)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(10); __vwsn_temp__.top = static_cast<::vl::vint32_t>(10); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(10); __vwsn_temp__.top = static_cast<::vl::vint>(10); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->myControl)); @@ -279,7 +285,7 @@ Class (::demo::MainWindow) MainWindow::~MainWindow() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } /*********************************************************************** @@ -310,13 +316,13 @@ Class (::demo::MyControlConstructor) ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetPadding(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"10", false))); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetPadding(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"10", false))); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetDirection(::vl::presentation::compositions::GuiStackComposition::Direction::Vertical); } { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint32_t>(5); __vwsn_temp__.top = static_cast<::vl::vint32_t>(5); __vwsn_temp__.right = static_cast<::vl::vint32_t>(5); __vwsn_temp__.bottom = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(5); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(5); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } (this->__vwsn_precompile_2 = new ::vl::presentation::compositions::GuiStackItemComposition()); { @@ -408,7 +414,7 @@ Class (::demo::MyControl) MyControl::~MyControl() { - this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControl*>(this)); + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiCustomControl*>(this)); } } @@ -417,92 +423,6 @@ Class (::demo::MyControl) #undef GLOBAL_OBJ #undef USERIMPL -/*********************************************************************** -Reflection -***********************************************************************/ - -namespace vl -{ - namespace reflection - { - namespace description - { -#ifndef VCZH_DEBUG_NO_REFLECTION - IMPL_CPP_TYPE_INFO(demo::MainWindow) - IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) - IMPL_CPP_TYPE_INFO(demo::MyControl) - IMPL_CPP_TYPE_INFO(demo::MyControlConstructor) - -#define _ , - BEGIN_CLASS_MEMBER(::demo::MainWindow) - CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) - END_CLASS_MEMBER(::demo::MainWindow) - - BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(myControl) - END_CLASS_MEMBER(::demo::MainWindowConstructor) - - BEGIN_CLASS_MEMBER(::demo::MyControl) - CLASS_MEMBER_CONSTRUCTOR(::demo::MyControl*(), NO_PARAMETER) - CLASS_MEMBER_METHOD(GetSelectedOption, NO_PARAMETER) - CLASS_MEMBER_METHOD(SetSelectedOption, { L"__vwsn_value_" }) - CLASS_MEMBER_EVENT(SelectedOptionChanged) - CLASS_MEMBER_FIELD(__vwsn_prop_SelectedOption) - CLASS_MEMBER_PROPERTY_EVENT(SelectedOption, GetSelectedOption, SetSelectedOption, SelectedOptionChanged) - END_CLASS_MEMBER(::demo::MyControl) - - BEGIN_CLASS_MEMBER(::demo::MyControlConstructor) - CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MyControlConstructor>(), NO_PARAMETER) - CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) - CLASS_MEMBER_FIELD(__vwsn_precompile_0) - CLASS_MEMBER_FIELD(__vwsn_precompile_1) - CLASS_MEMBER_FIELD(__vwsn_precompile_2) - CLASS_MEMBER_FIELD(__vwsn_precompile_3) - CLASS_MEMBER_FIELD(__vwsn_precompile_4) - CLASS_MEMBER_FIELD(__vwsn_precompile_5) - CLASS_MEMBER_FIELD(__vwsn_precompile_6) - CLASS_MEMBER_FIELD(__vwsn_precompile_7) - CLASS_MEMBER_FIELD(optionGroup) - CLASS_MEMBER_FIELD(self) - END_CLASS_MEMBER(::demo::MyControlConstructor) - -#undef _ - class DemoTypeLoader : public Object, public ITypeLoader - { - public: - void Load(ITypeManager* manager) - { - ADD_TYPE_INFO(::demo::MainWindow) - ADD_TYPE_INFO(::demo::MainWindowConstructor) - ADD_TYPE_INFO(::demo::MyControl) - ADD_TYPE_INFO(::demo::MyControlConstructor) - } - - void Unload(ITypeManager* manager) - { - } - }; -#endif - - bool LoadDemoTypes() - { -#ifndef VCZH_DEBUG_NO_REFLECTION - if (auto manager = GetGlobalTypeManager()) - { - return manager->AddTypeLoader(MakePtr()); - } -#endif - return false; - } - } - } -} - #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__GNUC__) diff --git a/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..4a198e71 --- /dev/null +++ b/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoReflection.cpp @@ -0,0 +1,115 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + IMPL_CPP_TYPE_INFO(demo::MyControl) + IMPL_CPP_TYPE_INFO(demo::MyControlConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + END_CLASS_MEMBER(::demo::MainWindow) + + BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(myControl) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + + BEGIN_CLASS_MEMBER(::demo::MyControl) + CLASS_MEMBER_CONSTRUCTOR(::demo::MyControl*(), NO_PARAMETER) + CLASS_MEMBER_METHOD(GetSelectedOption, NO_PARAMETER) + CLASS_MEMBER_METHOD(SetSelectedOption, { L"__vwsn_value_" }) + CLASS_MEMBER_EVENT(SelectedOptionChanged) + CLASS_MEMBER_FIELD(__vwsn_prop_SelectedOption) + CLASS_MEMBER_PROPERTY_EVENT(SelectedOption, GetSelectedOption, SetSelectedOption, SelectedOptionChanged) + END_CLASS_MEMBER(::demo::MyControl) + + BEGIN_CLASS_MEMBER(::demo::MyControlConstructor) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MyControlConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + CLASS_MEMBER_FIELD(__vwsn_precompile_1) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(__vwsn_precompile_3) + CLASS_MEMBER_FIELD(__vwsn_precompile_4) + CLASS_MEMBER_FIELD(__vwsn_precompile_5) + CLASS_MEMBER_FIELD(__vwsn_precompile_6) + CLASS_MEMBER_FIELD(__vwsn_precompile_7) + CLASS_MEMBER_FIELD(optionGroup) + CLASS_MEMBER_FIELD(self) + END_CLASS_MEMBER(::demo::MyControlConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + ADD_TYPE_INFO(::demo::MyControl) + ADD_TYPE_INFO(::demo::MyControlConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif + + bool LoadDemoTypes() + { +#ifndef VCZH_DEBUG_NO_REFLECTION + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoReflection.h b/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoReflection.h new file mode 100644 index 00000000..9a75911b --- /dev/null +++ b/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoReflection.h @@ -0,0 +1,56 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#include "Demo.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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) + DECL_TYPE_INFO(::demo::MyControl) + DECL_TYPE_INFO(::demo::MyControlConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif