diff --git a/Tutorial/GacUI_Controls/Animation/Animation.vcxproj b/Tutorial/GacUI_Controls/Animation/Animation.vcxproj new file mode 100644 index 00000000..e27244da --- /dev/null +++ b/Tutorial/GacUI_Controls/Animation/Animation.vcxproj @@ -0,0 +1,172 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + {96c559ca-9718-4bec-a053-28a0ab6a8ca2} + + + + + + + + + + + 15.0 + {2D3277A7-05CC-4F4C-B12D-DAEDA13B4E5E} + Win32Proj + Animation + 10.0.16299.0 + + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + true + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + false + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + false + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + + NotUsing + Level3 + Disabled + true + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION + true + + + Windows + true + + + + + NotUsing + Level3 + Disabled + true + _DEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION + true + + + Windows + true + + + + + NotUsing + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION + true + + + Windows + true + true + true + + + + + NotUsing + Level3 + MaxSpeed + true + true + true + NDEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION + true + + + Windows + true + true + true + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Controls/Animation/Animation.vcxproj.filters b/Tutorial/GacUI_Controls/Animation/Animation.vcxproj.filters new file mode 100644 index 00000000..38aef8e7 --- /dev/null +++ b/Tutorial/GacUI_Controls/Animation/Animation.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {c6d9102a-e2a6-44ec-a08e-9ba5baff739d} + + + + + Source Files + + + UI + + + + + Resource Files + + + + + UI + + + UI + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Controls/Animation/Main.cpp b/Tutorial/GacUI_Controls/Animation/Main.cpp new file mode 100644 index 00000000..f09f4c61 --- /dev/null +++ b/Tutorial/GacUI_Controls/Animation/Main.cpp @@ -0,0 +1,17 @@ +#define GAC_HEADER_USE_NAMESPACE +#include "UI/Source/Demo.h" + +using namespace vl::collections; +using namespace vl::stream; + +void GuiMain() +{ + { + FileStream fileStream(L"../UIRes/Animation.bin", FileStream::ReadOnly); + auto resource = GuiResource::LoadPrecompiledBinary(fileStream); + GetResourceManager()->SetResource(L"Resource", resource); + } + demo::MainWindow window; + window.MoveToScreenCenter(); + GetApplication()->Run(&window); +} \ No newline at end of file diff --git a/Tutorial/GacUI_Controls/Animation/UI/Resource.xml b/Tutorial/GacUI_Controls/Animation/UI/Resource.xml new file mode 100644 index 00000000..f691a713 --- /dev/null +++ b/Tutorial/GacUI_Controls/Animation/UI/Resource.xml @@ -0,0 +1,265 @@ + + + + + Source + ..\..\UIRes\Animation.bin + GacUI.h + GacUIReflection.h + Demo + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.95) + { + alpha = (1 - circleRatio) * 20; + } + + var element = cast (SolidBackground^) ball.OwnedElement; + var color = element.Color; + element.Color = {r:color.r g:color.g b:color.b a:(cast UInt8 Math::Round(alpha * 255))}; + + if (not ball.Visible) + { + ball.Visible = true; + } + }, cast UInt64 2000); + } + + @cpp:Private + static func BallAnimationWithDelay(container: GuiBoundsComposition*, ball: GuiBoundsComposition*, delay: int): IGuiAnimation^ + ${ + $Wait (cast UInt64 delay); + $PlayAndWait BallAnimation(container, ball); + ball.Visible = false; + } + + @cpp:Private + static func WaitingAnimation(container: GuiBoundsComposition*): IGuiAnimation^ + ${ + var balls = {} of GuiBoundsComposition*[]; + for (i in range [0, 8)) + { + var ball = new GuiBoundsComposition*(); + balls.Add(ball); + + ball.Visible = false; + ball.PreferredMinSize = {x:16 y:16}; + + var element = new SolidBackground^(); + element.Shape = {shapeType:Ellipse}; + element.Color = cast Color "#3F48CC"; + ball.OwnedElement = element; + + container.AddChild(ball); + } + + while (true) + { + $Wait (cast UInt64 500); + for (i in range [0, balls.Count)) + { + $PlayInGroup BallAnimationWithDelay(container, balls[i], 150 * i), 0; + } + $WaitForGroup 0; + } + } + + @cpp:Private + var gradientColorDef : ColorAnimation^ = new ColorAnimation^(ColorDef::Dark()); + + @cpp:Private + var lastGradientAnimation : IGuiAnimation^ = null; + + func PerformGradientAnimation(target: ColorDef^): void + { + KillAnimation(lastGradientAnimation); + lastGradientAnimation = gradientColorDef.CreateAnimation(target, (cast UInt64 500)); + AddAnimation(lastGradientAnimation); + } + + var counter : int = 0; + ]]> + + + + + + + + + + + + + + + <_>composeType:MinSize + <_>composeType:MinSize + <_>composeType:MinSize + <_>composeType:Percentage percentage:1.0 + + + + <_>composeType:MinSize + <_>composeType:Absolute absolute:100 + <_>composeType:Percentage percentage:1.0 + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
+
+
+
+
\ No newline at end of file diff --git a/Tutorial/GacUI_Controls/Animation/UI/Source/Demo.h b/Tutorial/GacUI_Controls/Animation/UI/Source/Demo.h new file mode 100644 index 00000000..7566a5bb --- /dev/null +++ b/Tutorial/GacUI_Controls/Animation/UI/Source/Demo.h @@ -0,0 +1,15 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMO +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMO + +#include "DemoPartialClasses.h" + +#endif diff --git a/Tutorial/GacUI_Controls/Animation/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Controls/Animation/UI/Source/DemoPartialClasses.cpp new file mode 100644 index 00000000..434a6d7e --- /dev/null +++ b/Tutorial/GacUI_Controls/Animation/UI/Source/DemoPartialClasses.cpp @@ -0,0 +1,1460 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +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) +#pragma warning(disable:4250) +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wparentheses-equality" +#elif defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wparentheses-equality" +#endif + +#define GLOBAL_SYMBOL ::vl_workflow_global::Demo:: +#define GLOBAL_NAME ::vl_workflow_global::Demo::Instance(). +#define GLOBAL_OBJ &::vl_workflow_global::Demo::Instance() +#define USERIMPL(...) + +/*********************************************************************** +Global Variables +***********************************************************************/ + +BEGIN_GLOBAL_STORAGE_CLASS(vl_workflow_global_Demo) + vl_workflow_global::Demo instance; + INITIALIZE_GLOBAL_STORAGE_CLASS + FINALIZE_GLOBAL_STORAGE_CLASS +END_GLOBAL_STORAGE_CLASS(vl_workflow_global_Demo) + +namespace vl_workflow_global +{ +/*********************************************************************** +Global Functions +***********************************************************************/ + + double Demo::F(double x) + { + auto y = ((x * x) * static_cast(static_cast<::vl::vint>(2))); + return y; + } + + double Demo::G(double x) + { + if ((x < static_cast(0.5))) + { + return GLOBAL_NAME F(x); + } + else + { + return (static_cast(static_cast<::vl::vint>(1)) - GLOBAL_NAME F((static_cast(static_cast<::vl::vint>(1)) - x))); + } + } + + Demo& Demo::Instance() + { + return Getvl_workflow_global_Demo().instance; + } + +/*********************************************************************** +Closures +***********************************************************************/ + + //------------------------------------------------------------------- + + __vwsnf10_Demo_demo_MainWindow_BallAnimation_::__vwsnf10_Demo_demo_MainWindow_BallAnimation_(::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_ball, ::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_container) + :ball(__vwsnctor_ball) + , container(__vwsnctor_container) + { + } + + void __vwsnf10_Demo_demo_MainWindow_BallAnimation_::operator()(::vl::vuint64_t time) const + { + auto circleRatio = GLOBAL_NAME G((static_cast(time) / static_cast(static_cast<::vl::vint>(2000)))); + auto angle = (((circleRatio * ::vl::reflection::description::Math::Pi()) * static_cast(static_cast<::vl::vint>(2))) + (::vl::reflection::description::Math::Pi() * static_cast(1.5))); + auto sin = ::vl::reflection::description::Math::Sin(angle); + auto cos = ::vl::reflection::description::Math::Cos(angle); + auto cx = ((::vl::__vwsn::This(container)->GetBounds().x2 - ::vl::__vwsn::This(container)->GetBounds().x1) / static_cast<::vl::vint>(2)); + auto cy = ((::vl::__vwsn::This(container)->GetBounds().y2 - ::vl::__vwsn::This(container)->GetBounds().y1) / static_cast<::vl::vint>(2)); + auto radiusBall = ((::vl::__vwsn::This(ball)->GetBounds().x2 - ::vl::__vwsn::This(ball)->GetBounds().x1) / static_cast<::vl::vint>(2)); + auto radiusOrbit = (::vl::reflection::description::Math::Min(cx, cy) - radiusBall); + auto x = static_cast<::vl::vint>(::vl::reflection::description::Math::Round(((cos * static_cast(radiusOrbit)) + static_cast(cx)))); + auto y = static_cast<::vl::vint>(::vl::reflection::description::Math::Round(((sin * static_cast(radiusOrbit)) + static_cast(cx)))); + ::vl::__vwsn::This(ball)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = (x - radiusBall); __vwsn_temp__.top = (y - radiusBall); __vwsn_temp__.right = (- static_cast<::vl::vint>(1)); __vwsn_temp__.bottom = (- static_cast<::vl::vint>(1)); return __vwsn_temp__; }()); + auto alpha = static_cast(1.0); + if ((circleRatio < static_cast(0.05))) + { + (alpha = (circleRatio * static_cast(static_cast<::vl::vint>(20)))); + } + else if ((circleRatio > static_cast(0.95))) + { + (alpha = ((static_cast(static_cast<::vl::vint>(1)) - circleRatio) * static_cast(static_cast<::vl::vint>(20)))); + } + auto element = ::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::elements::GuiSolidBackgroundElement>(::vl::__vwsn::This(ball)->GetOwnedElement().Obj())); + auto color = ::vl::__vwsn::This(element.Obj())->GetColor(); + ::vl::__vwsn::This(element.Obj())->SetColor([&](){ ::vl::presentation::Color __vwsn_temp__; __vwsn_temp__.r = color.r; __vwsn_temp__.g = color.g; __vwsn_temp__.b = color.b; __vwsn_temp__.a = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round((alpha * static_cast(static_cast<::vl::vint>(255))))); return __vwsn_temp__; }()); + if ((! ::vl::__vwsn::This(ball)->GetVisible())) + { + ::vl::__vwsn::This(ball)->SetVisible(true); + } + } + + //------------------------------------------------------------------- + + __vwsnf11_Demo_demo_MainWindow_BallAnimationWithDelay_::__vwsnf11_Demo_demo_MainWindow_BallAnimationWithDelay_(::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_ball, ::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_container, ::vl::vint __vwsnctor_delay) + :ball(__vwsnctor_ball) + , container(__vwsnctor_container) + , delay(__vwsnctor_delay) + { + } + + ::vl::Ptr<::vl::reflection::description::ICoroutine> __vwsnf11_Demo_demo_MainWindow_BallAnimationWithDelay_::operator()(::vl::presentation::controls::IGuiAnimationCoroutine::IImpl* __vwsn_co_impl_) const + { + return ::vl::Ptr<::vl::reflection::description::ICoroutine>(new ::vl_workflow_global::__vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine(__vwsn_co_impl_, ball, container, delay)); + } + + //------------------------------------------------------------------- + + __vwsnf12_Demo_demo_MainWindow_WaitingAnimation_::__vwsnf12_Demo_demo_MainWindow_WaitingAnimation_(::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_container) + :container(__vwsnctor_container) + { + } + + ::vl::Ptr<::vl::reflection::description::ICoroutine> __vwsnf12_Demo_demo_MainWindow_WaitingAnimation_::operator()(::vl::presentation::controls::IGuiAnimationCoroutine::IImpl* __vwsn_co_impl_) const + { + return ::vl::Ptr<::vl::reflection::description::ICoroutine>(new ::vl_workflow_global::__vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine(__vwsn_co_impl_, container)); + } + + //------------------------------------------------------------------- + + __vwsnf2_Demo_demo_ColorAnimation_CreateAnimation_::__vwsnf2_Demo_demo_ColorAnimation_CreateAnimation_(::vl::vuint64_t __vwsnctor___vwsn_ani_time, ::demo::ColorAnimation* __vwsnctorthis_0) + :__vwsn_ani_time(__vwsnctor___vwsn_ani_time) + , __vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + } + + void __vwsnf2_Demo_demo_ColorAnimation_CreateAnimation_::operator()(::vl::vuint64_t __vwsn_ani_currentTime) const + { + __vwsnthis_0->Interpolate((static_cast(__vwsn_ani_currentTime) / static_cast(__vwsn_ani_time))); + } + + //------------------------------------------------------------------- + + __vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + } + + void __vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(const ::vl::reflection::description::Value& __vwsn_value_) const + { + auto __vwsn_old_ = ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_6.Obj())->GetColor1(); + auto __vwsn_new_ = ::vl::__vwsn::Unbox<::vl::presentation::Color>(__vwsn_value_); + if ((__vwsn_old_ == __vwsn_new_)) + { + return; + } + ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_6.Obj())->SetColor1(__vwsn_new_); + } + + //------------------------------------------------------------------- + + __vwsnf4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::__vwsnf4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + } + + void __vwsnf4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(const ::vl::reflection::description::Value& __vwsn_value_) const + { + auto __vwsn_old_ = ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_6.Obj())->GetColor2(); + auto __vwsn_new_ = ::vl::__vwsn::Unbox<::vl::presentation::Color>(__vwsn_value_); + if ((__vwsn_old_ == __vwsn_new_)) + { + return; + } + ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_6.Obj())->SetColor2(__vwsn_new_); + } + + //------------------------------------------------------------------- + + __vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::__vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + } + + void __vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(const ::vl::reflection::description::Value& __vwsn_value_) const + { + auto __vwsn_old_ = ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_8.Obj())->GetColor(); + auto __vwsn_new_ = ::vl::__vwsn::Unbox<::vl::presentation::Color>(__vwsn_value_); + if ((__vwsn_old_ == __vwsn_new_)) + { + return; + } + ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_8.Obj())->SetColor(__vwsn_new_); + } + + //------------------------------------------------------------------- + + __vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + } + + void __vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(const ::vl::reflection::description::Value& __vwsn_value_) const + { + auto __vwsn_old_ = ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_8.Obj())->GetThickness(); + auto __vwsn_new_ = ::vl::__vwsn::Unbox<::vl::vint>(__vwsn_value_); + if ((__vwsn_old_ == __vwsn_new_)) + { + return; + } + ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_8.Obj())->SetThickness(__vwsn_new_); + } + + //------------------------------------------------------------------- + + __vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::__vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + } + + void __vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const + { + ::vl::__vwsn::This(__vwsnthis_0->self)->PerformGradientAnimation(::demo::ColorDef::Dark()); + } + + //------------------------------------------------------------------- + + __vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + } + + void __vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const + { + ::vl::__vwsn::This(__vwsnthis_0->self)->PerformGradientAnimation(::demo::ColorDef::Light()); + } + + //------------------------------------------------------------------- + + __vwsnf9_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::__vwsnf9_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + } + + void __vwsnf9_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const + { + ::vl::__vwsn::This(__vwsnthis_0->self)->PerformGradientAnimation(::demo::ColorDef::Sink()); + } + + //------------------------------------------------------------------- + + __vwsno1_Demo_demo_ColorAnimation_::__vwsno1_Demo_demo_ColorAnimation_() + { + } + + double __vwsno1_Demo_demo_ColorAnimation_::operator()(double __vwsno_1) const + { + return __vwsno_1; + } + + //------------------------------------------------------------------- + + __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + this->__vwsn_bind_cache_0 = ::vl::Ptr<::demo::ColorAnimation>(); + this->__vwsn_bind_cache_1 = ::vl::Ptr<::demo::ColorDef>(); + this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); + this->__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); + this->__vwsn_bind_opened_ = false; + this->__vwsn_bind_closed_ = false; + } + + void __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_() + { + auto __vwsn_bind_activator_result_ = ::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->GetTop(); + ::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_)); + } + + void __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0() + { + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->TopChanged, __vwsn_bind_handler_1_0); + (__vwsn_bind_cache_1 = ::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->GetCurrent()); + (__vwsn_bind_handler_1_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->TopChanged, ::vl::Func(this, &__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0))); + this->__vwsn_bind_activator_(); + } + + void __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0() + { + this->__vwsn_bind_activator_(); + } + + bool __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Open() + { + if ((! __vwsn_bind_opened_)) + { + (__vwsn_bind_opened_ = true); + (__vwsn_bind_cache_0 = ::vl::__vwsn::This(__vwsnthis_0->self)->gradientColorDef); + (__vwsn_bind_cache_1 = ::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->GetCurrent()); + (__vwsn_bind_handler_0_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->CurrentChanged, ::vl::Func(this, &__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0))); + (__vwsn_bind_handler_1_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->TopChanged, ::vl::Func(this, &__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0))); + return true; + } + return false; + } + + bool __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Update() + { + if ((__vwsn_bind_opened_ && (! __vwsn_bind_closed_))) + { + this->__vwsn_bind_activator_(); + return true; + } + return false; + } + + bool __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Close() + { + if ((! __vwsn_bind_closed_)) + { + (__vwsn_bind_closed_ = true); + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->CurrentChanged, __vwsn_bind_handler_0_0); + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->TopChanged, __vwsn_bind_handler_1_0); + (__vwsn_bind_cache_0 = ::vl::Ptr<::demo::ColorAnimation>()); + (__vwsn_bind_cache_1 = ::vl::Ptr<::demo::ColorDef>()); + (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); + (__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); + return true; + } + return false; + } + + //------------------------------------------------------------------- + + __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + this->__vwsn_bind_cache_0 = ::vl::Ptr<::demo::ColorAnimation>(); + this->__vwsn_bind_cache_1 = ::vl::Ptr<::demo::ColorDef>(); + this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); + this->__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); + this->__vwsn_bind_opened_ = false; + this->__vwsn_bind_closed_ = false; + } + + void __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_() + { + auto __vwsn_bind_activator_result_ = ::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->GetBottom(); + ::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_)); + } + + void __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0() + { + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->BottomChanged, __vwsn_bind_handler_1_0); + (__vwsn_bind_cache_1 = ::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->GetCurrent()); + (__vwsn_bind_handler_1_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->BottomChanged, ::vl::Func(this, &__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0))); + this->__vwsn_bind_activator_(); + } + + void __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0() + { + this->__vwsn_bind_activator_(); + } + + bool __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Open() + { + if ((! __vwsn_bind_opened_)) + { + (__vwsn_bind_opened_ = true); + (__vwsn_bind_cache_0 = ::vl::__vwsn::This(__vwsnthis_0->self)->gradientColorDef); + (__vwsn_bind_cache_1 = ::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->GetCurrent()); + (__vwsn_bind_handler_0_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->CurrentChanged, ::vl::Func(this, &__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0))); + (__vwsn_bind_handler_1_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->BottomChanged, ::vl::Func(this, &__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0))); + return true; + } + return false; + } + + bool __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Update() + { + if ((__vwsn_bind_opened_ && (! __vwsn_bind_closed_))) + { + this->__vwsn_bind_activator_(); + return true; + } + return false; + } + + bool __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Close() + { + if ((! __vwsn_bind_closed_)) + { + (__vwsn_bind_closed_ = true); + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->CurrentChanged, __vwsn_bind_handler_0_0); + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->BottomChanged, __vwsn_bind_handler_1_0); + (__vwsn_bind_cache_0 = ::vl::Ptr<::demo::ColorAnimation>()); + (__vwsn_bind_cache_1 = ::vl::Ptr<::demo::ColorDef>()); + (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); + (__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); + return true; + } + return false; + } + + //------------------------------------------------------------------- + + __vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + this->__vwsn_bind_cache_0 = ::vl::Ptr<::demo::ColorAnimation>(); + this->__vwsn_bind_cache_1 = ::vl::Ptr<::demo::ColorDef>(); + this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); + this->__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); + this->__vwsn_bind_opened_ = false; + this->__vwsn_bind_closed_ = false; + } + + void __vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_() + { + auto __vwsn_bind_activator_result_ = ::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->GetShadow(); + ::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_)); + } + + void __vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0() + { + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ShadowChanged, __vwsn_bind_handler_1_0); + (__vwsn_bind_cache_1 = ::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->GetCurrent()); + (__vwsn_bind_handler_1_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ShadowChanged, ::vl::Func(this, &__vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0))); + this->__vwsn_bind_activator_(); + } + + void __vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0() + { + this->__vwsn_bind_activator_(); + } + + bool __vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Open() + { + if ((! __vwsn_bind_opened_)) + { + (__vwsn_bind_opened_ = true); + (__vwsn_bind_cache_0 = ::vl::__vwsn::This(__vwsnthis_0->self)->gradientColorDef); + (__vwsn_bind_cache_1 = ::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->GetCurrent()); + (__vwsn_bind_handler_0_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->CurrentChanged, ::vl::Func(this, &__vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0))); + (__vwsn_bind_handler_1_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ShadowChanged, ::vl::Func(this, &__vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0))); + return true; + } + return false; + } + + bool __vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Update() + { + if ((__vwsn_bind_opened_ && (! __vwsn_bind_closed_))) + { + this->__vwsn_bind_activator_(); + return true; + } + return false; + } + + bool __vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Close() + { + if ((! __vwsn_bind_closed_)) + { + (__vwsn_bind_closed_ = true); + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->CurrentChanged, __vwsn_bind_handler_0_0); + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ShadowChanged, __vwsn_bind_handler_1_0); + (__vwsn_bind_cache_0 = ::vl::Ptr<::demo::ColorAnimation>()); + (__vwsn_bind_cache_1 = ::vl::Ptr<::demo::ColorDef>()); + (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); + (__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); + return true; + } + return false; + } + + //------------------------------------------------------------------- + + __vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + this->__vwsn_bind_cache_0 = ::vl::Ptr<::demo::ColorAnimation>(); + this->__vwsn_bind_cache_1 = ::vl::Ptr<::demo::ColorDef>(); + this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); + this->__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); + this->__vwsn_bind_opened_ = false; + this->__vwsn_bind_closed_ = false; + } + + void __vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_() + { + auto __vwsn_bind_activator_result_ = ::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->GetThickness(); + ::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_)); + } + + void __vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0() + { + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ThicknessChanged, __vwsn_bind_handler_1_0); + (__vwsn_bind_cache_1 = ::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->GetCurrent()); + (__vwsn_bind_handler_1_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ThicknessChanged, ::vl::Func(this, &__vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0))); + this->__vwsn_bind_activator_(); + } + + void __vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0() + { + this->__vwsn_bind_activator_(); + } + + bool __vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Open() + { + if ((! __vwsn_bind_opened_)) + { + (__vwsn_bind_opened_ = true); + (__vwsn_bind_cache_0 = ::vl::__vwsn::This(__vwsnthis_0->self)->gradientColorDef); + (__vwsn_bind_cache_1 = ::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->GetCurrent()); + (__vwsn_bind_handler_0_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->CurrentChanged, ::vl::Func(this, &__vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0))); + (__vwsn_bind_handler_1_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ThicknessChanged, ::vl::Func(this, &__vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0))); + return true; + } + return false; + } + + bool __vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Update() + { + if ((__vwsn_bind_opened_ && (! __vwsn_bind_closed_))) + { + this->__vwsn_bind_activator_(); + return true; + } + return false; + } + + bool __vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Close() + { + if ((! __vwsn_bind_closed_)) + { + (__vwsn_bind_closed_ = true); + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->CurrentChanged, __vwsn_bind_handler_0_0); + ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ThicknessChanged, __vwsn_bind_handler_1_0); + (__vwsn_bind_cache_0 = ::vl::Ptr<::demo::ColorAnimation>()); + (__vwsn_bind_cache_1 = ::vl::Ptr<::demo::ColorDef>()); + (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); + (__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); + return true; + } + return false; + } + + //------------------------------------------------------------------- + + __vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine::__vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine(::vl::presentation::controls::IGuiAnimationCoroutine::IImpl* __vwsnctor___vwsn_co_impl_, ::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_ball, ::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_container, ::vl::vint __vwsnctor_delay) + :__vwsn_co_impl_(__vwsnctor___vwsn_co_impl_) + , ball(__vwsnctor_ball) + , container(__vwsnctor_container) + , delay(__vwsnctor_delay) + { + this->__vwsn_co_state_ = static_cast<::vl::vint>(0); + this->__vwsn_co_state_before_pause_ = (- static_cast<::vl::vint>(1)); + this->__vwsn_prop_Failure = ::vl::Ptr<::vl::reflection::description::IValueException>(); + this->__vwsn_prop_Status = ::vl::reflection::description::CoroutineStatus::Waiting; + } + + ::vl::Ptr<::vl::reflection::description::IValueException> __vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine::GetFailure() + { + return __vwsn_prop_Failure; + } + void __vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine::SetFailure(::vl::Ptr<::vl::reflection::description::IValueException> __vwsn_value_) + { + (__vwsn_prop_Failure = __vwsn_value_); + } + + ::vl::reflection::description::CoroutineStatus __vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine::GetStatus() + { + return __vwsn_prop_Status; + } + void __vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine::SetStatus(::vl::reflection::description::CoroutineStatus __vwsn_value_) + { + (__vwsn_prop_Status = __vwsn_value_); + } + + void __vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine::Resume(bool __vwsn_raise_exception_, ::vl::Ptr<::vl::reflection::description::CoroutineResult> __vwsn_co_result_) + { + if ((this->GetStatus() != ::vl::reflection::description::CoroutineStatus::Waiting)) + { + throw ::vl::Exception(::vl::WString(L"Resume should be called only when the coroutine is in the waiting status.", false)); + } + this->SetStatus(::vl::reflection::description::CoroutineStatus::Executing); + try + { + { + if ((__vwsn_co_state_before_pause_ != (- static_cast<::vl::vint>(1)))) + { + if ((! static_cast(__vwsn_co_result_))) + { + (__vwsn_co_state_before_pause_ = (- static_cast<::vl::vint>(1))); + } + else if ((! static_cast(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure()))) + { + (__vwsn_co_state_before_pause_ = (- static_cast<::vl::vint>(1))); + } + else + { + { + (__vwsn_co_state_before_pause_ = (- static_cast<::vl::vint>(1))); + throw ::vl::Exception(::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure().Obj())->GetMessage()); + } + } + } + while (true) + { + if ((__vwsn_co_state_ == static_cast<::vl::vint>(0))) + { + this->SetStatus(::vl::reflection::description::CoroutineStatus::Waiting); + (__vwsn_co_state_before_pause_ = __vwsn_co_state_); + (__vwsn_co_state_ = static_cast<::vl::vint>(2)); + { + ::vl::presentation::controls::IGuiAnimationCoroutine::WaitAndPause(__vwsn_co_impl_, static_cast<::vl::vuint64_t>(delay)); + } + return; + } + if ((__vwsn_co_state_ == static_cast<::vl::vint>(1))) + { + if (static_cast(__vwsn_co_result_)) + { + if (static_cast(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure())) + { + throw ::vl::Exception(::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure().Obj())->GetMessage()); + } + } + ::vl::__vwsn::This(ball)->SetVisible(false); + this->SetStatus(::vl::reflection::description::CoroutineStatus::Stopped); + return; + } + if ((__vwsn_co_state_ == static_cast<::vl::vint>(2))) + { + if (static_cast(__vwsn_co_result_)) + { + if (static_cast(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure())) + { + throw ::vl::Exception(::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure().Obj())->GetMessage()); + } + } + (__vwsn_co_state_ = static_cast<::vl::vint>(3)); + continue; + } + if ((__vwsn_co_state_ == static_cast<::vl::vint>(3))) + { + this->SetStatus(::vl::reflection::description::CoroutineStatus::Waiting); + (__vwsn_co_state_before_pause_ = __vwsn_co_state_); + (__vwsn_co_state_ = static_cast<::vl::vint>(1)); + { + ::vl::presentation::controls::IGuiAnimationCoroutine::PlayAndWaitAndPause(__vwsn_co_impl_, ::demo::MainWindow::BallAnimation(container, ball)); + } + return; + } + } + } + } + catch(const ::vl::Exception& __vwsne_0) + { + auto __vwsn_co_ex_ = ::vl::reflection::description::IValueException::Create(__vwsne_0.Message()); + { + this->SetFailure(__vwsn_co_ex_); + this->SetStatus(::vl::reflection::description::CoroutineStatus::Stopped); + if (__vwsn_raise_exception_) + { + throw; + } + } + } + } + + //------------------------------------------------------------------- + + __vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine::__vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine(::vl::presentation::controls::IGuiAnimationCoroutine::IImpl* __vwsnctor___vwsn_co_impl_, ::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_container) + :__vwsn_co_impl_(__vwsnctor___vwsn_co_impl_) + , container(__vwsnctor_container) + { + this->__vwsn_co0_for_begin_i = static_cast<::vl::vint>(0); + this->__vwsn_co1_for_end_i = static_cast<::vl::vint>(0); + this->__vwsn_co2_i = static_cast<::vl::vint>(0); + this->__vwsn_co3_balls = ::vl::Ptr<::vl::reflection::description::IValueList>(); + this->__vwsn_co_state_ = static_cast<::vl::vint>(0); + this->__vwsn_co_state_before_pause_ = (- static_cast<::vl::vint>(1)); + this->__vwsn_prop_Failure = ::vl::Ptr<::vl::reflection::description::IValueException>(); + this->__vwsn_prop_Status = ::vl::reflection::description::CoroutineStatus::Waiting; + } + + ::vl::Ptr<::vl::reflection::description::IValueException> __vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine::GetFailure() + { + return __vwsn_prop_Failure; + } + void __vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine::SetFailure(::vl::Ptr<::vl::reflection::description::IValueException> __vwsn_value_) + { + (__vwsn_prop_Failure = __vwsn_value_); + } + + ::vl::reflection::description::CoroutineStatus __vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine::GetStatus() + { + return __vwsn_prop_Status; + } + void __vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine::SetStatus(::vl::reflection::description::CoroutineStatus __vwsn_value_) + { + (__vwsn_prop_Status = __vwsn_value_); + } + + void __vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine::Resume(bool __vwsn_raise_exception_, ::vl::Ptr<::vl::reflection::description::CoroutineResult> __vwsn_co_result_) + { + if ((this->GetStatus() != ::vl::reflection::description::CoroutineStatus::Waiting)) + { + throw ::vl::Exception(::vl::WString(L"Resume should be called only when the coroutine is in the waiting status.", false)); + } + this->SetStatus(::vl::reflection::description::CoroutineStatus::Executing); + try + { + { + if ((__vwsn_co_state_before_pause_ != (- static_cast<::vl::vint>(1)))) + { + if ((! static_cast(__vwsn_co_result_))) + { + (__vwsn_co_state_before_pause_ = (- static_cast<::vl::vint>(1))); + } + else if ((! static_cast(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure()))) + { + (__vwsn_co_state_before_pause_ = (- static_cast<::vl::vint>(1))); + } + else + { + { + (__vwsn_co_state_before_pause_ = (- static_cast<::vl::vint>(1))); + throw ::vl::Exception(::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure().Obj())->GetMessage()); + } + } + } + while (true) + { + if ((__vwsn_co_state_ == static_cast<::vl::vint>(0))) + { + (__vwsn_co3_balls = ::vl::reflection::description::IValueList::Create()); + { + auto __vwsn_for_begin_i = static_cast<::vl::vint>(0); + auto __vwsn_for_end_i = (static_cast<::vl::vint>(8) - static_cast<::vl::vint>(1)); + auto i = __vwsn_for_begin_i; + while ((i <= __vwsn_for_end_i)) + { + { + auto ball = new ::vl::presentation::compositions::GuiBoundsComposition(); + ::vl::__vwsn::This(__vwsn_co3_balls.Obj())->Add(::vl::__vwsn::Box(ball)); + ::vl::__vwsn::This(ball)->SetVisible(false); + ::vl::__vwsn::This(ball)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(16); __vwsn_temp__.y = static_cast<::vl::vint>(16); return __vwsn_temp__; }()); + auto element = ::vl::Ptr<::vl::presentation::elements::GuiSolidBackgroundElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiSolidBackgroundElement>()); + ::vl::__vwsn::This(element.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::Ellipse; return __vwsn_temp__; }()); + ::vl::__vwsn::This(element.Obj())->SetColor(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#3F48CC", false))); + ::vl::__vwsn::This(ball)->SetOwnedElement(::vl::Ptr<::vl::presentation::elements::IGuiGraphicsElement>(element)); + ::vl::__vwsn::This(container)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(ball)); + } + (i = (i + static_cast<::vl::vint>(1))); + } + } + if (true) + { + (__vwsn_co_state_ = static_cast<::vl::vint>(3)); + continue; + } + (__vwsn_co_state_ = static_cast<::vl::vint>(1)); + continue; + } + if ((__vwsn_co_state_ == static_cast<::vl::vint>(1))) + { + this->SetStatus(::vl::reflection::description::CoroutineStatus::Stopped); + return; + } + if ((__vwsn_co_state_ == static_cast<::vl::vint>(2))) + { + if (static_cast(__vwsn_co_result_)) + { + if (static_cast(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure())) + { + throw ::vl::Exception(::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure().Obj())->GetMessage()); + } + } + if (true) + { + (__vwsn_co_state_ = static_cast<::vl::vint>(3)); + continue; + } + (__vwsn_co_state_ = static_cast<::vl::vint>(1)); + continue; + } + if ((__vwsn_co_state_ == static_cast<::vl::vint>(3))) + { + this->SetStatus(::vl::reflection::description::CoroutineStatus::Waiting); + (__vwsn_co_state_before_pause_ = __vwsn_co_state_); + (__vwsn_co_state_ = static_cast<::vl::vint>(4)); + { + ::vl::presentation::controls::IGuiAnimationCoroutine::WaitAndPause(__vwsn_co_impl_, static_cast<::vl::vuint64_t>(static_cast<::vl::vint>(500))); + } + return; + } + if ((__vwsn_co_state_ == static_cast<::vl::vint>(4))) + { + if (static_cast(__vwsn_co_result_)) + { + if (static_cast(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure())) + { + throw ::vl::Exception(::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure().Obj())->GetMessage()); + } + } + (__vwsn_co0_for_begin_i = static_cast<::vl::vint>(0)); + (__vwsn_co1_for_end_i = (::vl::__vwsn::This(__vwsn_co3_balls.Obj())->GetCount() - static_cast<::vl::vint>(1))); + (__vwsn_co2_i = __vwsn_co0_for_begin_i); + if ((__vwsn_co2_i <= __vwsn_co1_for_end_i)) + { + (__vwsn_co_state_ = static_cast<::vl::vint>(6)); + continue; + } + (__vwsn_co_state_ = static_cast<::vl::vint>(7)); + continue; + } + if ((__vwsn_co_state_ == static_cast<::vl::vint>(5))) + { + if (static_cast(__vwsn_co_result_)) + { + if (static_cast(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure())) + { + throw ::vl::Exception(::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_co_result_.Obj())->GetFailure().Obj())->GetMessage()); + } + } + (__vwsn_co2_i = (__vwsn_co2_i + static_cast<::vl::vint>(1))); + if ((__vwsn_co2_i <= __vwsn_co1_for_end_i)) + { + (__vwsn_co_state_ = static_cast<::vl::vint>(6)); + continue; + } + (__vwsn_co_state_ = static_cast<::vl::vint>(7)); + continue; + } + if ((__vwsn_co_state_ == static_cast<::vl::vint>(6))) + { + this->SetStatus(::vl::reflection::description::CoroutineStatus::Waiting); + (__vwsn_co_state_before_pause_ = __vwsn_co_state_); + (__vwsn_co_state_ = static_cast<::vl::vint>(5)); + { + ::vl::presentation::controls::IGuiAnimationCoroutine::PlayInGroupAndPause(__vwsn_co_impl_, ::demo::MainWindow::BallAnimationWithDelay(container, ::vl::__vwsn::Unbox<::vl::presentation::compositions::GuiBoundsComposition*>(::vl::__vwsn::This(__vwsn_co3_balls.Obj())->Get(__vwsn_co2_i)), (static_cast<::vl::vint>(150) * __vwsn_co2_i)), static_cast<::vl::vint>(0)); + } + return; + } + if ((__vwsn_co_state_ == static_cast<::vl::vint>(7))) + { + this->SetStatus(::vl::reflection::description::CoroutineStatus::Waiting); + (__vwsn_co_state_before_pause_ = __vwsn_co_state_); + (__vwsn_co_state_ = static_cast<::vl::vint>(2)); + { + ::vl::presentation::controls::IGuiAnimationCoroutine::WaitForGroupAndPause(__vwsn_co_impl_, static_cast<::vl::vint>(0)); + } + return; + } + } + } + } + catch(const ::vl::Exception& __vwsne_0) + { + auto __vwsn_co_ex_ = ::vl::reflection::description::IValueException::Create(__vwsne_0.Message()); + { + this->SetFailure(__vwsn_co_ex_); + this->SetStatus(::vl::reflection::description::CoroutineStatus::Stopped); + if (__vwsn_raise_exception_) + { + throw; + } + } + } + } + +} + +/*********************************************************************** +Class (::demo::ColorAnimation) +***********************************************************************/ + +namespace demo +{ + ::vl::Ptr<::demo::ColorDef> ColorAnimation::GetBegin() + { + return this->__vwsn_prop_Begin; + } + void ColorAnimation::SetBegin(::vl::Ptr<::demo::ColorDef> __vwsn_value_) + { + if ((this->__vwsn_prop_Begin.Obj() != __vwsn_value_.Obj())) + { + (this->__vwsn_prop_Begin = __vwsn_value_); + ::vl::__vwsn::EventInvoke(this->BeginChanged)(); + } + } + + ::vl::Ptr<::demo::ColorDef> ColorAnimation::GetEnd() + { + return this->__vwsn_prop_End; + } + void ColorAnimation::SetEnd(::vl::Ptr<::demo::ColorDef> __vwsn_value_) + { + if ((this->__vwsn_prop_End.Obj() != __vwsn_value_.Obj())) + { + (this->__vwsn_prop_End = __vwsn_value_); + ::vl::__vwsn::EventInvoke(this->EndChanged)(); + } + } + + ::vl::Ptr<::demo::ColorDef> ColorAnimation::GetCurrent() + { + return this->__vwsn_prop_Current; + } + void ColorAnimation::SetCurrent(::vl::Ptr<::demo::ColorDef> __vwsn_value_) + { + if ((this->__vwsn_prop_Current.Obj() != __vwsn_value_.Obj())) + { + (this->__vwsn_prop_Current = __vwsn_value_); + ::vl::__vwsn::EventInvoke(this->CurrentChanged)(); + } + } + + double ColorAnimation::GetTimeScale(::vl::Ptr<::demo::ColorDef> __vwsn_ani_begin, ::vl::Ptr<::demo::ColorDef> __vwsn_ani_end, ::vl::Ptr<::demo::ColorDef> __vwsn_ani_current) + { + auto __vwsn_ani_scale = static_cast(0.0); + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetTop().a) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().a))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetTop().a) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().a))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetTop().b) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().b))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetTop().b) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().b))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetTop().g) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().g))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetTop().g) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().g))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetTop().r) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().r))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetTop().r) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().r))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetBottom().a) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().a))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetBottom().a) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().a))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetBottom().b) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().b))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetBottom().b) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().b))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetBottom().g) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().g))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetBottom().g) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().g))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetBottom().r) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().r))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetBottom().r) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().r))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetShadow().a) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().a))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetShadow().a) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().a))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetShadow().b) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().b))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetShadow().b) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().b))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetShadow().g) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().g))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetShadow().g) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().g))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetShadow().r) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().r))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetShadow().r) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().r))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + { + auto __vwsn_ani_ref = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetThickness()) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetThickness()))); + auto __vwsn_ani_cur = ::vl::reflection::description::Math::Abs((static_cast(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetThickness()) - static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetThickness()))); + (__vwsn_ani_scale = ::vl::reflection::description::Math::Max(__vwsn_ani_scale, (__vwsn_ani_cur / ::vl::reflection::description::Math::Max(__vwsn_ani_ref, static_cast(0.000001))))); + } + return ::vl::reflection::description::Math::Min(static_cast(1.0), __vwsn_ani_scale); + } + + void ColorAnimation::Interpolate(::vl::Ptr<::demo::ColorDef> __vwsn_ani_begin, ::vl::Ptr<::demo::ColorDef> __vwsn_ani_end, ::vl::Ptr<::demo::ColorDef> __vwsn_ani_current, double __vwsn_ani_ratio) + { + auto __vwsn_ani__Top_a = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetTop().a) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().a) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Top_b = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetTop().b) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().b) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Top_g = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetTop().g) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().g) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Top_r = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetTop().r) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetTop().r) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Bottom_a = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetBottom().a) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().a) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Bottom_b = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetBottom().b) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().b) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Bottom_g = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetBottom().g) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().g) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Bottom_r = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetBottom().r) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetBottom().r) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Shadow_a = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetShadow().a) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().a) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Shadow_b = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetShadow().b) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().b) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Shadow_g = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetShadow().g) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().g) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Shadow_r = static_cast<::vl::vuint8_t>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetShadow().r) * (static_cast(1.0) - this->__vwsn_ani_int_(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetShadow().r) * this->__vwsn_ani_int_(__vwsn_ani_ratio))))); + auto __vwsn_ani__Thickness = static_cast<::vl::vint>(::vl::reflection::description::Math::Round(((static_cast(::vl::__vwsn::This(__vwsn_ani_begin.Obj())->GetThickness()) * (static_cast(1.0) - this->__vwsn_ani_int_Thickness(__vwsn_ani_ratio))) + (static_cast(::vl::__vwsn::This(__vwsn_ani_end.Obj())->GetThickness()) * this->__vwsn_ani_int_Thickness(__vwsn_ani_ratio))))); + ::vl::__vwsn::This(__vwsn_ani_current.Obj())->SetTop([&](){ ::vl::presentation::Color __vwsn_temp__; __vwsn_temp__.a = __vwsn_ani__Top_a; __vwsn_temp__.b = __vwsn_ani__Top_b; __vwsn_temp__.g = __vwsn_ani__Top_g; __vwsn_temp__.r = __vwsn_ani__Top_r; return __vwsn_temp__; }()); + ::vl::__vwsn::This(__vwsn_ani_current.Obj())->SetBottom([&](){ ::vl::presentation::Color __vwsn_temp__; __vwsn_temp__.a = __vwsn_ani__Bottom_a; __vwsn_temp__.b = __vwsn_ani__Bottom_b; __vwsn_temp__.g = __vwsn_ani__Bottom_g; __vwsn_temp__.r = __vwsn_ani__Bottom_r; return __vwsn_temp__; }()); + ::vl::__vwsn::This(__vwsn_ani_current.Obj())->SetShadow([&](){ ::vl::presentation::Color __vwsn_temp__; __vwsn_temp__.a = __vwsn_ani__Shadow_a; __vwsn_temp__.b = __vwsn_ani__Shadow_b; __vwsn_temp__.g = __vwsn_ani__Shadow_g; __vwsn_temp__.r = __vwsn_ani__Shadow_r; return __vwsn_temp__; }()); + ::vl::__vwsn::This(__vwsn_ani_current.Obj())->SetThickness(__vwsn_ani__Thickness); + } + + void ColorAnimation::Interpolate(double __vwsn_ani_ratio) + { + this->Interpolate(this->GetBegin(), this->GetEnd(), this->GetCurrent(), __vwsn_ani_ratio); + } + + ::vl::Ptr<::vl::presentation::controls::IGuiAnimation> ColorAnimation::CreateAnimation(::vl::Ptr<::demo::ColorDef> __vwsn_ani_target, ::vl::vuint64_t __vwsn_ani_time) + { + auto __vwsn_ani_scaledTime = static_cast<::vl::vuint64_t>(::vl::reflection::description::Math::Round((static_cast(__vwsn_ani_time) * this->GetTimeScale(this->GetEnd(), __vwsn_ani_target, this->GetCurrent())))); + ::vl::__vwsn::This(this->GetBegin().Obj())->SetTop(::vl::__vwsn::This(this->GetCurrent().Obj())->GetTop()); + ::vl::__vwsn::This(this->GetBegin().Obj())->SetBottom(::vl::__vwsn::This(this->GetCurrent().Obj())->GetBottom()); + ::vl::__vwsn::This(this->GetBegin().Obj())->SetShadow(::vl::__vwsn::This(this->GetCurrent().Obj())->GetShadow()); + ::vl::__vwsn::This(this->GetBegin().Obj())->SetThickness(::vl::__vwsn::This(this->GetCurrent().Obj())->GetThickness()); + this->SetEnd(__vwsn_ani_target); + return ::vl::presentation::controls::IGuiAnimation::CreateAnimation(LAMBDA(::vl_workflow_global::__vwsnf2_Demo_demo_ColorAnimation_CreateAnimation_(__vwsn_ani_time, this)), __vwsn_ani_time); + } + + ColorAnimation::ColorAnimation(::vl::Ptr<::demo::ColorDef> __vwsn_ani_current) + : __vwsn_prop_Begin(::vl::Ptr<::demo::ColorDef>()) + , __vwsn_prop_End(::vl::Ptr<::demo::ColorDef>()) + , __vwsn_prop_Current(::vl::Ptr<::demo::ColorDef>()) + , __vwsn_ani_int_(::vl::Func(GLOBAL_OBJ, &GLOBAL_SYMBOL G)) + , __vwsn_ani_int_Thickness(LAMBDA(::vl_workflow_global::__vwsno1_Demo_demo_ColorAnimation_())) + { + this->SetBegin(::vl::Ptr<::demo::ColorDef>(new ::demo::ColorDef())); + ::vl::__vwsn::This(this->GetBegin().Obj())->SetTop(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetTop()); + ::vl::__vwsn::This(this->GetBegin().Obj())->SetBottom(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetBottom()); + ::vl::__vwsn::This(this->GetBegin().Obj())->SetShadow(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetShadow()); + ::vl::__vwsn::This(this->GetBegin().Obj())->SetThickness(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetThickness()); + this->SetEnd(::vl::Ptr<::demo::ColorDef>(new ::demo::ColorDef())); + ::vl::__vwsn::This(this->GetEnd().Obj())->SetTop(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetTop()); + ::vl::__vwsn::This(this->GetEnd().Obj())->SetBottom(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetBottom()); + ::vl::__vwsn::This(this->GetEnd().Obj())->SetShadow(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetShadow()); + ::vl::__vwsn::This(this->GetEnd().Obj())->SetThickness(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetThickness()); + this->SetCurrent(::vl::Ptr<::demo::ColorDef>(new ::demo::ColorDef())); + ::vl::__vwsn::This(this->GetCurrent().Obj())->SetTop(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetTop()); + ::vl::__vwsn::This(this->GetCurrent().Obj())->SetBottom(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetBottom()); + ::vl::__vwsn::This(this->GetCurrent().Obj())->SetShadow(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetShadow()); + ::vl::__vwsn::This(this->GetCurrent().Obj())->SetThickness(::vl::__vwsn::This(__vwsn_ani_current.Obj())->GetThickness()); + } + +/*********************************************************************** +Class (::demo::MainWindowConstructor) +***********************************************************************/ + + void MainWindowConstructor::__vwsn_initialize_instance_(::demo::MainWindow* __vwsn_this_) + { + (this->self = __vwsn_this_); + (this->__vwsn_precompile_20 = ::vl::__vwsn::This(this->self)->GetBoundsComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_20)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(640); __vwsn_temp__.y = static_cast<::vl::vint>(480); return __vwsn_temp__; }()); + } + { + ::vl::__vwsn::This(this->self)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(640); __vwsn_temp__.y = static_cast<::vl::vint>(480); return __vwsn_temp__; }()); + } + { + ::vl::__vwsn::This(this->self)->SetText(::vl::WString(L"GacUI XML资源临时测试", false)); + } + { + (this->__vwsn_precompile_0 = new ::vl::presentation::controls::GuiTab(::vl::presentation::theme::ThemeName::Tab)); + } + { + (this->__vwsn_precompile_2 = new ::vl::presentation::controls::GuiTabPage(::vl::presentation::theme::ThemeName::CustomControl)); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetText(::vl::WString(L"Gradient Animation", false)); + } + (this->__vwsn_precompile_3 = new ::vl::presentation::compositions::GuiTableComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_3)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"5", false))); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_3)->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_3)->SetRowsAndColumns(static_cast<::vl::vint>(4), static_cast<::vl::vint>(3)); + ::vl::__vwsn::This(this->__vwsn_precompile_3)->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_3)->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_3)->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_3)->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_3)->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_3)->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_3)->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_4 = new ::vl::presentation::compositions::GuiCellComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(0), static_cast<::vl::vint>(4), static_cast<::vl::vint>(1)); + } + (this->__vwsn_precompile_5 = new ::vl::presentation::compositions::GuiBoundsComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(200); __vwsn_temp__.y = static_cast<::vl::vint>(200); return __vwsn_temp__; }()); + } + (this->__vwsn_precompile_6 = ::vl::Ptr<::vl::presentation::elements::GuiGradientBackgroundElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiGradientBackgroundElement>())); + { + ::vl::__vwsn::This(this->__vwsn_precompile_6.Obj())->SetDirection(::vl::presentation::elements::GuiGradientBackgroundElement::Direction::Slash); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetOwnedElement(::vl::Ptr<::vl::presentation::elements::IGuiGraphicsElement>(this->__vwsn_precompile_6)); + } + (this->__vwsn_precompile_7 = new ::vl::presentation::compositions::GuiBoundsComposition()); + { + ::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__; }()); + } + (this->__vwsn_precompile_8 = ::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiInnerShadowElement>())); + { + ::vl::__vwsn::This(this->__vwsn_precompile_7)->SetOwnedElement(::vl::Ptr<::vl::presentation::elements::IGuiGraphicsElement>(this->__vwsn_precompile_8)); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_5)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_7)); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_4)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_5)); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_3)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_4)); + } + (this->__vwsn_precompile_9 = new ::vl::presentation::compositions::GuiCellComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); + } + { + (this->__vwsn_precompile_10 = new ::vl::presentation::controls::GuiButton(::vl::presentation::theme::ThemeName::Button)); + } + (this->__vwsn_precompile_11 = ::vl::__vwsn::This(this->__vwsn_precompile_10)->GetBoundsComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_11)->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_10)->SetText(::vl::WString(L"Dark", false)); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_9)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->__vwsn_precompile_10)->GetBoundsComposition())); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_3)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_9)); + } + (this->__vwsn_precompile_12 = new ::vl::presentation::compositions::GuiCellComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_12)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); + } + { + (this->__vwsn_precompile_13 = new ::vl::presentation::controls::GuiButton(::vl::presentation::theme::ThemeName::Button)); + } + (this->__vwsn_precompile_14 = ::vl::__vwsn::This(this->__vwsn_precompile_13)->GetBoundsComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_14)->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_13)->SetText(::vl::WString(L"Light", false)); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_12)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->__vwsn_precompile_13)->GetBoundsComposition())); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_3)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_12)); + } + (this->__vwsn_precompile_15 = new ::vl::presentation::compositions::GuiCellComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_15)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); + } + { + (this->__vwsn_precompile_16 = new ::vl::presentation::controls::GuiButton(::vl::presentation::theme::ThemeName::Button)); + } + (this->__vwsn_precompile_17 = ::vl::__vwsn::This(this->__vwsn_precompile_16)->GetBoundsComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_17)->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_16)->SetText(::vl::WString(L"Sink", false)); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_15)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->__vwsn_precompile_16)->GetBoundsComposition())); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_3)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_15)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::This(this->__vwsn_precompile_2)->GetContainerComposition())->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_3)); + } + { + auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueObservableList>(::vl::__vwsn::This(this->__vwsn_precompile_0)->GetPages()); + ::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_2)); + } + { + (this->__vwsn_precompile_18 = new ::vl::presentation::controls::GuiTabPage(::vl::presentation::theme::ThemeName::CustomControl)); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_18)->SetText(::vl::WString(L"Complex Animation", false)); + } + (this->animationBackground = new ::vl::presentation::compositions::GuiBoundsComposition()); + { + ::vl::__vwsn::This(this->animationBackground)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(200); __vwsn_temp__.y = static_cast<::vl::vint>(200); return __vwsn_temp__; }()); + } + { + ::vl::__vwsn::This(this->animationBackground)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(10); __vwsn_temp__.top = static_cast<::vl::vint>(10); __vwsn_temp__.right = (- static_cast<::vl::vint>(1)); __vwsn_temp__.bottom = (- static_cast<::vl::vint>(1)); return __vwsn_temp__; }()); + } + (this->__vwsn_precompile_19 = ::vl::Ptr<::vl::presentation::elements::GuiSolidBackgroundElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiSolidBackgroundElement>())); + { + ::vl::__vwsn::This(this->__vwsn_precompile_19.Obj())->SetColor(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#FFC929", false))); + } + { + ::vl::__vwsn::This(this->animationBackground)->SetOwnedElement(::vl::Ptr<::vl::presentation::elements::IGuiGraphicsElement>(this->__vwsn_precompile_19)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::This(this->__vwsn_precompile_18)->GetContainerComposition())->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->animationBackground)); + } + { + auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueObservableList>(::vl::__vwsn::This(this->__vwsn_precompile_0)->GetPages()); + ::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_18)); + } + (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::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->self)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->__vwsn_precompile_0)); + } + { + auto __vwsn_created_subscription_ = ::vl::Ptr<::vl::reflection::description::IValueSubscription>(new ::vl_workflow_global::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(this)); + ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, LAMBDA(::vl_workflow_global::__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(this))); + ::vl::__vwsn::This(__vwsn_this_)->AddSubscription(__vwsn_created_subscription_); + } + { + auto __vwsn_created_subscription_ = ::vl::Ptr<::vl::reflection::description::IValueSubscription>(new ::vl_workflow_global::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(this)); + ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, LAMBDA(::vl_workflow_global::__vwsnf4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(this))); + ::vl::__vwsn::This(__vwsn_this_)->AddSubscription(__vwsn_created_subscription_); + } + { + auto __vwsn_created_subscription_ = ::vl::Ptr<::vl::reflection::description::IValueSubscription>(new ::vl_workflow_global::__vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(this)); + ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, LAMBDA(::vl_workflow_global::__vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(this))); + ::vl::__vwsn::This(__vwsn_this_)->AddSubscription(__vwsn_created_subscription_); + } + { + auto __vwsn_created_subscription_ = ::vl::Ptr<::vl::reflection::description::IValueSubscription>(new ::vl_workflow_global::__vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(this)); + ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, LAMBDA(::vl_workflow_global::__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(this))); + ::vl::__vwsn::This(__vwsn_this_)->AddSubscription(__vwsn_created_subscription_); + } + { + auto __vwsn_event_handler_ = LAMBDA(::vl_workflow_global::__vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(this)); + ::vl::__vwsn::EventAttach(::vl::__vwsn::This(this->__vwsn_precompile_10)->Clicked, __vwsn_event_handler_); + } + { + auto __vwsn_event_handler_ = LAMBDA(::vl_workflow_global::__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(this)); + ::vl::__vwsn::EventAttach(::vl::__vwsn::This(this->__vwsn_precompile_13)->Clicked, __vwsn_event_handler_); + } + { + auto __vwsn_event_handler_ = LAMBDA(::vl_workflow_global::__vwsnf9_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(this)); + ::vl::__vwsn::EventAttach(::vl::__vwsn::This(this->__vwsn_precompile_16)->Clicked, __vwsn_event_handler_); + } + } + + MainWindowConstructor::MainWindowConstructor() + : self(static_cast<::demo::MainWindow*>(nullptr)) + , animationBackground(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) + , __vwsn_precompile_0(static_cast<::vl::presentation::controls::GuiTab*>(nullptr)) + , __vwsn_precompile_1(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) + , __vwsn_precompile_2(static_cast<::vl::presentation::controls::GuiTabPage*>(nullptr)) + , __vwsn_precompile_3(static_cast<::vl::presentation::compositions::GuiTableComposition*>(nullptr)) + , __vwsn_precompile_4(static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr)) + , __vwsn_precompile_5(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) + , __vwsn_precompile_6(::vl::Ptr<::vl::presentation::elements::GuiGradientBackgroundElement>()) + , __vwsn_precompile_7(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) + , __vwsn_precompile_8(::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement>()) + , __vwsn_precompile_9(static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr)) + , __vwsn_precompile_10(static_cast<::vl::presentation::controls::GuiButton*>(nullptr)) + , __vwsn_precompile_11(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) + , __vwsn_precompile_12(static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr)) + , __vwsn_precompile_13(static_cast<::vl::presentation::controls::GuiButton*>(nullptr)) + , __vwsn_precompile_14(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) + , __vwsn_precompile_15(static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr)) + , __vwsn_precompile_16(static_cast<::vl::presentation::controls::GuiButton*>(nullptr)) + , __vwsn_precompile_17(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) + , __vwsn_precompile_18(static_cast<::vl::presentation::controls::GuiTabPage*>(nullptr)) + , __vwsn_precompile_19(::vl::Ptr<::vl::presentation::elements::GuiSolidBackgroundElement>()) + , __vwsn_precompile_20(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) + { + } + +/*********************************************************************** +Class (::demo::MainWindow) +***********************************************************************/ + + ::vl::Ptr<::vl::presentation::controls::IGuiAnimation> MainWindow::BallAnimation(::vl::presentation::compositions::GuiBoundsComposition* container, ::vl::presentation::compositions::GuiBoundsComposition* ball) + { + return ::vl::presentation::controls::IGuiAnimation::CreateAnimation(LAMBDA(::vl_workflow_global::__vwsnf10_Demo_demo_MainWindow_BallAnimation_(ball, container)), static_cast<::vl::vuint64_t>(static_cast<::vl::vint>(2000))); + } + + ::vl::Ptr<::vl::presentation::controls::IGuiAnimation> MainWindow::BallAnimationWithDelay(::vl::presentation::compositions::GuiBoundsComposition* container, ::vl::presentation::compositions::GuiBoundsComposition* ball, ::vl::vint delay) + { + return ::vl::presentation::controls::IGuiAnimationCoroutine::Create(LAMBDA(::vl_workflow_global::__vwsnf11_Demo_demo_MainWindow_BallAnimationWithDelay_(ball, container, delay))); + } + + ::vl::Ptr<::vl::presentation::controls::IGuiAnimation> MainWindow::WaitingAnimation(::vl::presentation::compositions::GuiBoundsComposition* container) + { + return ::vl::presentation::controls::IGuiAnimationCoroutine::Create(LAMBDA(::vl_workflow_global::__vwsnf12_Demo_demo_MainWindow_WaitingAnimation_(container))); + } + + void MainWindow::PerformGradientAnimation(::vl::Ptr<::demo::ColorDef> target) + { + this->KillAnimation(this->lastGradientAnimation); + (this->lastGradientAnimation = ::vl::__vwsn::This(this->gradientColorDef.Obj())->CreateAnimation(target, static_cast<::vl::vuint64_t>(static_cast<::vl::vint>(500)))); + this->AddAnimation(this->lastGradientAnimation); + } + + MainWindow::MainWindow() + : ::vl::presentation::controls::GuiWindow(::vl::presentation::theme::ThemeName::Window) + , gradientColorDef(::vl::Ptr<::demo::ColorAnimation>(new ::demo::ColorAnimation(::demo::ColorDef::Dark()))) + , lastGradientAnimation(::vl::Ptr<::vl::presentation::controls::IGuiAnimation>()) + , counter(static_cast<::vl::vint>(0)) + { + auto __vwsn_resource_ = ::vl::__vwsn::This(::vl::presentation::GetResourceManager())->GetResourceFromClassName(::vl::WString(L"demo::MainWindow", false)); + auto __vwsn_resolver_ = ::vl::Ptr<::vl::presentation::GuiResourcePathResolver>(new ::vl::presentation::GuiResourcePathResolver(__vwsn_resource_, ::vl::__vwsn::This(__vwsn_resource_.Obj())->GetWorkingDirectory())); + ::vl::__vwsn::This(this)->SetResourceResolver(__vwsn_resolver_); + ::vl::__vwsn::This(this)->__vwsn_initialize_instance_(this); + this->__vwsn_instance_ctor_(); + } + + void MainWindow::__vwsn_instance_ctor_() + { + ::vl::__vwsn::This(this->self)->AddAnimation(::demo::MainWindow::WaitingAnimation(this->animationBackground)); + } + + MainWindow::~MainWindow() + { + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); + } + +/*********************************************************************** +Class (::demo::ColorDef) +***********************************************************************/ + + ::vl::presentation::Color ColorDef::GetTop() + { + return this->__vwsn_prop_Top; + } + + void ColorDef::SetTop(::vl::presentation::Color __vwsn_value_) + { + if ((this->__vwsn_prop_Top != __vwsn_value_)) + { + (this->__vwsn_prop_Top = __vwsn_value_); + ::vl::__vwsn::EventInvoke(this->TopChanged)(); + } + } + + ::vl::presentation::Color ColorDef::GetBottom() + { + return this->__vwsn_prop_Bottom; + } + + void ColorDef::SetBottom(::vl::presentation::Color __vwsn_value_) + { + if ((this->__vwsn_prop_Bottom != __vwsn_value_)) + { + (this->__vwsn_prop_Bottom = __vwsn_value_); + ::vl::__vwsn::EventInvoke(this->BottomChanged)(); + } + } + + ::vl::presentation::Color ColorDef::GetShadow() + { + return this->__vwsn_prop_Shadow; + } + + void ColorDef::SetShadow(::vl::presentation::Color __vwsn_value_) + { + if ((this->__vwsn_prop_Shadow != __vwsn_value_)) + { + (this->__vwsn_prop_Shadow = __vwsn_value_); + ::vl::__vwsn::EventInvoke(this->ShadowChanged)(); + } + } + + ::vl::vint ColorDef::GetThickness() + { + return this->__vwsn_prop_Thickness; + } + + void ColorDef::SetThickness(::vl::vint __vwsn_value_) + { + if ((this->__vwsn_prop_Thickness != __vwsn_value_)) + { + (this->__vwsn_prop_Thickness = __vwsn_value_); + ::vl::__vwsn::EventInvoke(this->ThicknessChanged)(); + } + } + + ::vl::Ptr<::demo::ColorDef> ColorDef::Dark() + { + auto def = ::vl::Ptr<::demo::ColorDef>(new ::demo::ColorDef()); + ::vl::__vwsn::This(def.Obj())->SetTop(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#9999FF", false))); + ::vl::__vwsn::This(def.Obj())->SetBottom(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#5555FF", false))); + ::vl::__vwsn::This(def.Obj())->SetThickness(static_cast<::vl::vint>(0)); + return def; + } + + ::vl::Ptr<::demo::ColorDef> ColorDef::Light() + { + auto def = ::vl::Ptr<::demo::ColorDef>(new ::demo::ColorDef()); + ::vl::__vwsn::This(def.Obj())->SetTop(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#DDDDFF", false))); + ::vl::__vwsn::This(def.Obj())->SetBottom(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#9999FF", false))); + ::vl::__vwsn::This(def.Obj())->SetThickness(static_cast<::vl::vint>(0)); + return def; + } + + ::vl::Ptr<::demo::ColorDef> ColorDef::Sink() + { + auto def = ::vl::Ptr<::demo::ColorDef>(new ::demo::ColorDef()); + ::vl::__vwsn::This(def.Obj())->SetTop(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#5555FF", false))); + ::vl::__vwsn::This(def.Obj())->SetBottom(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#0000FF", false))); + ::vl::__vwsn::This(def.Obj())->SetThickness(static_cast<::vl::vint>(10)); + return def; + } + + ColorDef::ColorDef() + : __vwsn_prop_Top(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#000000", false))) + , __vwsn_prop_Bottom(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#000000", false))) + , __vwsn_prop_Shadow(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#000000A0", false))) + , __vwsn_prop_Thickness(static_cast<::vl::vint>(0)) + { + } + +} +#undef GLOBAL_SYMBOL +#undef GLOBAL_NAME +#undef GLOBAL_OBJ +#undef USERIMPL + +#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_Controls/Animation/UI/Source/DemoPartialClasses.h b/Tutorial/GacUI_Controls/Animation/UI/Source/DemoPartialClasses.h new file mode 100644 index 00000000..299f665d --- /dev/null +++ b/Tutorial/GacUI_Controls/Animation/UI/Source/DemoPartialClasses.h @@ -0,0 +1,470 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES + +#include "GacUI.h" + +#if defined( _MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wparentheses-equality" +#elif defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wparentheses-equality" +#endif + +namespace vl_workflow_global +{ + struct __vwsnf10_Demo_demo_MainWindow_BallAnimation_; + struct __vwsnf11_Demo_demo_MainWindow_BallAnimationWithDelay_; + struct __vwsnf12_Demo_demo_MainWindow_WaitingAnimation_; + struct __vwsnf2_Demo_demo_ColorAnimation_CreateAnimation_; + struct __vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + struct __vwsnf4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + struct __vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + struct __vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + struct __vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + struct __vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + struct __vwsnf9_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + struct __vwsno1_Demo_demo_ColorAnimation_; + class __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + class __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + class __vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + class __vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + class __vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine; + class __vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine; +} + +namespace demo +{ + class ColorAnimation; + class MainWindowConstructor; + class MainWindow; + class ColorDef; + + class ColorAnimation : public ::vl::Object, public ::vl::reflection::Description + { + friend struct ::vl_workflow_global::__vwsnf2_Demo_demo_ColorAnimation_CreateAnimation_; + friend struct ::vl_workflow_global::__vwsno1_Demo_demo_ColorAnimation_; +#ifndef VCZH_DEBUG_NO_REFLECTION + friend struct ::vl::reflection::description::CustomTypeDescriptorSelector; +#endif + public: + ::vl::Ptr<::demo::ColorDef> __vwsn_prop_Begin; + ::vl::Ptr<::demo::ColorDef> GetBegin(); + void SetBegin(::vl::Ptr<::demo::ColorDef> __vwsn_value_); + ::vl::Event BeginChanged; + ::vl::Ptr<::demo::ColorDef> __vwsn_prop_End; + ::vl::Ptr<::demo::ColorDef> GetEnd(); + void SetEnd(::vl::Ptr<::demo::ColorDef> __vwsn_value_); + ::vl::Event EndChanged; + ::vl::Ptr<::demo::ColorDef> __vwsn_prop_Current; + ::vl::Ptr<::demo::ColorDef> GetCurrent(); + void SetCurrent(::vl::Ptr<::demo::ColorDef> __vwsn_value_); + ::vl::Event CurrentChanged; + private: + ::vl::Func __vwsn_ani_int_; + ::vl::Func __vwsn_ani_int_Thickness; + public: + double GetTimeScale(::vl::Ptr<::demo::ColorDef> __vwsn_ani_begin, ::vl::Ptr<::demo::ColorDef> __vwsn_ani_end, ::vl::Ptr<::demo::ColorDef> __vwsn_ani_current); + void Interpolate(::vl::Ptr<::demo::ColorDef> __vwsn_ani_begin, ::vl::Ptr<::demo::ColorDef> __vwsn_ani_end, ::vl::Ptr<::demo::ColorDef> __vwsn_ani_current, double __vwsn_ani_ratio); + void Interpolate(double __vwsn_ani_ratio); + ::vl::Ptr<::vl::presentation::controls::IGuiAnimation> CreateAnimation(::vl::Ptr<::demo::ColorDef> __vwsn_ani_target, ::vl::vuint64_t __vwsn_ani_time); + ColorAnimation(::vl::Ptr<::demo::ColorDef> __vwsn_ani_current); + }; + + class MainWindowConstructor : public ::vl::Object, public ::vl::reflection::Description + { + friend class ::vl_workflow_global::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + friend class ::vl_workflow_global::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + friend class ::vl_workflow_global::__vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + friend class ::vl_workflow_global::__vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + friend struct ::vl_workflow_global::__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf9_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; +#ifndef VCZH_DEBUG_NO_REFLECTION + friend struct ::vl::reflection::description::CustomTypeDescriptorSelector; +#endif + protected: + ::demo::MainWindow* self; + ::vl::presentation::compositions::GuiBoundsComposition* animationBackground; + ::vl::presentation::controls::GuiTab* __vwsn_precompile_0; + ::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_1; + ::vl::presentation::controls::GuiTabPage* __vwsn_precompile_2; + ::vl::presentation::compositions::GuiTableComposition* __vwsn_precompile_3; + ::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_4; + ::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_5; + ::vl::Ptr<::vl::presentation::elements::GuiGradientBackgroundElement> __vwsn_precompile_6; + ::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_7; + ::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement> __vwsn_precompile_8; + ::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_9; + ::vl::presentation::controls::GuiButton* __vwsn_precompile_10; + ::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_11; + ::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_12; + ::vl::presentation::controls::GuiButton* __vwsn_precompile_13; + ::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_14; + ::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_15; + ::vl::presentation::controls::GuiButton* __vwsn_precompile_16; + ::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_17; + ::vl::presentation::controls::GuiTabPage* __vwsn_precompile_18; + ::vl::Ptr<::vl::presentation::elements::GuiSolidBackgroundElement> __vwsn_precompile_19; + ::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_20; + void __vwsn_initialize_instance_(::demo::MainWindow* __vwsn_this_); + public: + MainWindowConstructor(); + }; + + class MainWindow : public ::vl::presentation::controls::GuiWindow, public ::demo::MainWindowConstructor, public ::vl::reflection::Description + { + friend class ::vl_workflow_global::__vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine; + friend class ::vl_workflow_global::__vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine; + friend struct ::vl_workflow_global::__vwsnf10_Demo_demo_MainWindow_BallAnimation_; + friend struct ::vl_workflow_global::__vwsnf11_Demo_demo_MainWindow_BallAnimationWithDelay_; + friend struct ::vl_workflow_global::__vwsnf12_Demo_demo_MainWindow_WaitingAnimation_; + friend class ::demo::MainWindowConstructor; + friend class ::vl_workflow_global::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + friend class ::vl_workflow_global::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + friend class ::vl_workflow_global::__vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + friend class ::vl_workflow_global::__vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription; + friend struct ::vl_workflow_global::__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; + friend struct ::vl_workflow_global::__vwsnf9_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__; +#ifndef VCZH_DEBUG_NO_REFLECTION + friend struct ::vl::reflection::description::CustomTypeDescriptorSelector; +#endif + private: + static ::vl::Ptr<::vl::presentation::controls::IGuiAnimation> BallAnimation(::vl::presentation::compositions::GuiBoundsComposition* container, ::vl::presentation::compositions::GuiBoundsComposition* ball); + static ::vl::Ptr<::vl::presentation::controls::IGuiAnimation> BallAnimationWithDelay(::vl::presentation::compositions::GuiBoundsComposition* container, ::vl::presentation::compositions::GuiBoundsComposition* ball, ::vl::vint delay); + static ::vl::Ptr<::vl::presentation::controls::IGuiAnimation> WaitingAnimation(::vl::presentation::compositions::GuiBoundsComposition* container); + ::vl::Ptr<::demo::ColorAnimation> gradientColorDef; + ::vl::Ptr<::vl::presentation::controls::IGuiAnimation> lastGradientAnimation; + public: + void PerformGradientAnimation(::vl::Ptr<::demo::ColorDef> target); + ::vl::vint counter; + MainWindow(); + void __vwsn_instance_ctor_(); + ~MainWindow(); + }; + + class ColorDef : public ::vl::Object, public ::vl::reflection::Description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + friend struct ::vl::reflection::description::CustomTypeDescriptorSelector; +#endif + private: + ::vl::presentation::Color __vwsn_prop_Top; + public: + ::vl::presentation::Color GetTop(); + void SetTop(::vl::presentation::Color __vwsn_value_); + ::vl::Event TopChanged; + private: + ::vl::presentation::Color __vwsn_prop_Bottom; + public: + ::vl::presentation::Color GetBottom(); + void SetBottom(::vl::presentation::Color __vwsn_value_); + ::vl::Event BottomChanged; + private: + ::vl::presentation::Color __vwsn_prop_Shadow; + public: + ::vl::presentation::Color GetShadow(); + void SetShadow(::vl::presentation::Color __vwsn_value_); + ::vl::Event ShadowChanged; + private: + ::vl::vint __vwsn_prop_Thickness; + public: + ::vl::vint GetThickness(); + void SetThickness(::vl::vint __vwsn_value_); + ::vl::Event ThicknessChanged; + static ::vl::Ptr<::demo::ColorDef> Dark(); + static ::vl::Ptr<::demo::ColorDef> Light(); + static ::vl::Ptr<::demo::ColorDef> Sink(); + ColorDef(); + }; + +} +/*********************************************************************** +Global Variables and Functions +***********************************************************************/ + +namespace vl_workflow_global +{ + class Demo + { + public: + + double F(double x); + double G(double x); + + static Demo& Instance(); + }; + +/*********************************************************************** +Closures +***********************************************************************/ + + struct __vwsnf10_Demo_demo_MainWindow_BallAnimation_ + { + ::vl::presentation::compositions::GuiBoundsComposition* ball; + ::vl::presentation::compositions::GuiBoundsComposition* container; + + __vwsnf10_Demo_demo_MainWindow_BallAnimation_(::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_ball, ::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_container); + + void operator()(::vl::vuint64_t time) const; + }; + + struct __vwsnf11_Demo_demo_MainWindow_BallAnimationWithDelay_ + { + ::vl::presentation::compositions::GuiBoundsComposition* ball; + ::vl::presentation::compositions::GuiBoundsComposition* container; + ::vl::vint delay; + + __vwsnf11_Demo_demo_MainWindow_BallAnimationWithDelay_(::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_ball, ::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_container, ::vl::vint __vwsnctor_delay); + + ::vl::Ptr<::vl::reflection::description::ICoroutine> operator()(::vl::presentation::controls::IGuiAnimationCoroutine::IImpl* __vwsn_co_impl_) const; + }; + + struct __vwsnf12_Demo_demo_MainWindow_WaitingAnimation_ + { + ::vl::presentation::compositions::GuiBoundsComposition* container; + + __vwsnf12_Demo_demo_MainWindow_WaitingAnimation_(::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_container); + + ::vl::Ptr<::vl::reflection::description::ICoroutine> operator()(::vl::presentation::controls::IGuiAnimationCoroutine::IImpl* __vwsn_co_impl_) const; + }; + + struct __vwsnf2_Demo_demo_ColorAnimation_CreateAnimation_ + { + ::vl::vuint64_t __vwsn_ani_time; + ::demo::ColorAnimation* __vwsnthis_0; + + __vwsnf2_Demo_demo_ColorAnimation_CreateAnimation_(::vl::vuint64_t __vwsnctor___vwsn_ani_time, ::demo::ColorAnimation* __vwsnctorthis_0); + + void operator()(::vl::vuint64_t __vwsn_ani_currentTime) const; + }; + + struct __vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__ + { + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0); + + void operator()(const ::vl::reflection::description::Value& __vwsn_value_) const; + }; + + struct __vwsnf4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__ + { + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnf4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0); + + void operator()(const ::vl::reflection::description::Value& __vwsn_value_) const; + }; + + struct __vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__ + { + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0); + + void operator()(const ::vl::reflection::description::Value& __vwsn_value_) const; + }; + + struct __vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__ + { + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0); + + void operator()(const ::vl::reflection::description::Value& __vwsn_value_) const; + }; + + struct __vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__ + { + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0); + + void operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const; + }; + + struct __vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__ + { + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0); + + void operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const; + }; + + struct __vwsnf9_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__ + { + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnf9_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0); + + void operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const; + }; + + struct __vwsno1_Demo_demo_ColorAnimation_ + { + __vwsno1_Demo_demo_ColorAnimation_(); + + double operator()(double __vwsno_1) const; + }; + + class __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription : public ::vl::Object, public virtual ::vl::reflection::description::IValueSubscription + { + public: + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0); + + ::vl::Ptr<::demo::ColorAnimation> __vwsn_bind_cache_0; + ::vl::Ptr<::demo::ColorDef> __vwsn_bind_cache_1; + ::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0; + ::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_1_0; + bool __vwsn_bind_opened_ = false; + bool __vwsn_bind_closed_ = false; + void __vwsn_bind_activator_(); + void __vwsn_bind_callback_0_0(); + void __vwsn_bind_callback_1_0(); + bool Open() override; + bool Update() override; + bool Close() override; + }; + + class __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription : public ::vl::Object, public virtual ::vl::reflection::description::IValueSubscription + { + public: + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0); + + ::vl::Ptr<::demo::ColorAnimation> __vwsn_bind_cache_0; + ::vl::Ptr<::demo::ColorDef> __vwsn_bind_cache_1; + ::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0; + ::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_1_0; + bool __vwsn_bind_opened_ = false; + bool __vwsn_bind_closed_ = false; + void __vwsn_bind_activator_(); + void __vwsn_bind_callback_0_0(); + void __vwsn_bind_callback_1_0(); + bool Open() override; + bool Update() override; + bool Close() override; + }; + + class __vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription : public ::vl::Object, public virtual ::vl::reflection::description::IValueSubscription + { + public: + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnc3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0); + + ::vl::Ptr<::demo::ColorAnimation> __vwsn_bind_cache_0; + ::vl::Ptr<::demo::ColorDef> __vwsn_bind_cache_1; + ::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0; + ::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_1_0; + bool __vwsn_bind_opened_ = false; + bool __vwsn_bind_closed_ = false; + void __vwsn_bind_activator_(); + void __vwsn_bind_callback_0_0(); + void __vwsn_bind_callback_1_0(); + bool Open() override; + bool Update() override; + bool Close() override; + }; + + class __vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription : public ::vl::Object, public virtual ::vl::reflection::description::IValueSubscription + { + public: + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnc4_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0); + + ::vl::Ptr<::demo::ColorAnimation> __vwsn_bind_cache_0; + ::vl::Ptr<::demo::ColorDef> __vwsn_bind_cache_1; + ::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0; + ::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_1_0; + bool __vwsn_bind_opened_ = false; + bool __vwsn_bind_closed_ = false; + void __vwsn_bind_activator_(); + void __vwsn_bind_callback_0_0(); + void __vwsn_bind_callback_1_0(); + bool Open() override; + bool Update() override; + bool Close() override; + }; + + class __vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine : public ::vl::Object, public virtual ::vl::reflection::description::ICoroutine + { + public: + ::vl::presentation::controls::IGuiAnimationCoroutine::IImpl* __vwsn_co_impl_; + ::vl::presentation::compositions::GuiBoundsComposition* ball; + ::vl::presentation::compositions::GuiBoundsComposition* container; + ::vl::vint delay; + + __vwsnc5_Demo_demo_MainWindow_BallAnimationWithDelay___vl_reflection_description_ICoroutine(::vl::presentation::controls::IGuiAnimationCoroutine::IImpl* __vwsnctor___vwsn_co_impl_, ::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_ball, ::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_container, ::vl::vint __vwsnctor_delay); + + ::vl::vint __vwsn_co_state_ = 0; + ::vl::vint __vwsn_co_state_before_pause_ = 0; + ::vl::Ptr<::vl::reflection::description::IValueException> __vwsn_prop_Failure; + ::vl::Ptr<::vl::reflection::description::IValueException> GetFailure() override; + void SetFailure(::vl::Ptr<::vl::reflection::description::IValueException> __vwsn_value_); + ::vl::reflection::description::CoroutineStatus __vwsn_prop_Status = static_cast<::vl::reflection::description::CoroutineStatus>(0); + ::vl::reflection::description::CoroutineStatus GetStatus() override; + void SetStatus(::vl::reflection::description::CoroutineStatus __vwsn_value_); + void Resume(bool __vwsn_raise_exception_, ::vl::Ptr<::vl::reflection::description::CoroutineResult> __vwsn_co_result_) override; + }; + + class __vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine : public ::vl::Object, public virtual ::vl::reflection::description::ICoroutine + { + public: + ::vl::presentation::controls::IGuiAnimationCoroutine::IImpl* __vwsn_co_impl_; + ::vl::presentation::compositions::GuiBoundsComposition* container; + + __vwsnc6_Demo_demo_MainWindow_WaitingAnimation___vl_reflection_description_ICoroutine(::vl::presentation::controls::IGuiAnimationCoroutine::IImpl* __vwsnctor___vwsn_co_impl_, ::vl::presentation::compositions::GuiBoundsComposition* __vwsnctor_container); + + ::vl::vint __vwsn_co0_for_begin_i = 0; + ::vl::vint __vwsn_co1_for_end_i = 0; + ::vl::vint __vwsn_co2_i = 0; + ::vl::Ptr<::vl::reflection::description::IValueList> __vwsn_co3_balls; + ::vl::vint __vwsn_co_state_ = 0; + ::vl::vint __vwsn_co_state_before_pause_ = 0; + ::vl::Ptr<::vl::reflection::description::IValueException> __vwsn_prop_Failure; + ::vl::Ptr<::vl::reflection::description::IValueException> GetFailure() override; + void SetFailure(::vl::Ptr<::vl::reflection::description::IValueException> __vwsn_value_); + ::vl::reflection::description::CoroutineStatus __vwsn_prop_Status = static_cast<::vl::reflection::description::CoroutineStatus>(0); + ::vl::reflection::description::CoroutineStatus GetStatus() override; + void SetStatus(::vl::reflection::description::CoroutineStatus __vwsn_value_); + void Resume(bool __vwsn_raise_exception_, ::vl::Ptr<::vl::reflection::description::CoroutineResult> __vwsn_co_result_) override; + }; +} + +#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_Controls/Animation/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Controls/Animation/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..57a5b458 --- /dev/null +++ b/Tutorial/GacUI_Controls/Animation/UI/Source/DemoReflection.cpp @@ -0,0 +1,170 @@ +/*********************************************************************** +!!!!!! 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::ColorAnimation) + IMPL_CPP_TYPE_INFO(demo::ColorDef) + IMPL_CPP_TYPE_INFO(demo::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + +#define _ , + BEGIN_CLASS_MEMBER(::demo::ColorAnimation) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::ColorAnimation>(::vl::Ptr<::demo::ColorDef>), { L"__vwsn_ani_current" }) + CLASS_MEMBER_METHOD(CreateAnimation, { L"__vwsn_ani_target" _ L"__vwsn_ani_time" }) + CLASS_MEMBER_METHOD(GetBegin, NO_PARAMETER) + CLASS_MEMBER_METHOD(GetCurrent, NO_PARAMETER) + CLASS_MEMBER_METHOD(GetEnd, NO_PARAMETER) + CLASS_MEMBER_METHOD(GetTimeScale, { L"__vwsn_ani_begin" _ L"__vwsn_ani_end" _ L"__vwsn_ani_current" }) + CLASS_MEMBER_METHOD_OVERLOAD(Interpolate, { L"__vwsn_ani_begin" _ L"__vwsn_ani_end" _ L"__vwsn_ani_current" _ L"__vwsn_ani_ratio" }, void(::demo::ColorAnimation::*)(::vl::Ptr<::demo::ColorDef>, ::vl::Ptr<::demo::ColorDef>, ::vl::Ptr<::demo::ColorDef>, double)) + CLASS_MEMBER_METHOD_OVERLOAD(Interpolate, { L"__vwsn_ani_ratio" }, void(::demo::ColorAnimation::*)(double)) + CLASS_MEMBER_METHOD(SetBegin, { L"__vwsn_value_" }) + CLASS_MEMBER_METHOD(SetCurrent, { L"__vwsn_value_" }) + CLASS_MEMBER_METHOD(SetEnd, { L"__vwsn_value_" }) + CLASS_MEMBER_EVENT(BeginChanged) + CLASS_MEMBER_EVENT(CurrentChanged) + CLASS_MEMBER_EVENT(EndChanged) + CLASS_MEMBER_FIELD(__vwsn_ani_int_) + CLASS_MEMBER_FIELD(__vwsn_ani_int_Thickness) + CLASS_MEMBER_FIELD(__vwsn_prop_Begin) + CLASS_MEMBER_FIELD(__vwsn_prop_Current) + CLASS_MEMBER_FIELD(__vwsn_prop_End) + CLASS_MEMBER_PROPERTY_EVENT(Begin, GetBegin, SetBegin, BeginChanged) + CLASS_MEMBER_PROPERTY_EVENT(Current, GetCurrent, SetCurrent, CurrentChanged) + CLASS_MEMBER_PROPERTY_EVENT(End, GetEnd, SetEnd, EndChanged) + END_CLASS_MEMBER(::demo::ColorAnimation) + + BEGIN_CLASS_MEMBER(::demo::ColorDef) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::ColorDef>(), NO_PARAMETER) + CLASS_MEMBER_STATIC_METHOD(Dark, NO_PARAMETER) + CLASS_MEMBER_METHOD(GetBottom, NO_PARAMETER) + CLASS_MEMBER_METHOD(GetShadow, NO_PARAMETER) + CLASS_MEMBER_METHOD(GetThickness, NO_PARAMETER) + CLASS_MEMBER_METHOD(GetTop, NO_PARAMETER) + CLASS_MEMBER_STATIC_METHOD(Light, NO_PARAMETER) + CLASS_MEMBER_METHOD(SetBottom, { L"__vwsn_value_" }) + CLASS_MEMBER_METHOD(SetShadow, { L"__vwsn_value_" }) + CLASS_MEMBER_METHOD(SetThickness, { L"__vwsn_value_" }) + CLASS_MEMBER_METHOD(SetTop, { L"__vwsn_value_" }) + CLASS_MEMBER_STATIC_METHOD(Sink, NO_PARAMETER) + CLASS_MEMBER_EVENT(BottomChanged) + CLASS_MEMBER_EVENT(ShadowChanged) + CLASS_MEMBER_EVENT(ThicknessChanged) + CLASS_MEMBER_EVENT(TopChanged) + CLASS_MEMBER_FIELD(__vwsn_prop_Bottom) + CLASS_MEMBER_FIELD(__vwsn_prop_Shadow) + CLASS_MEMBER_FIELD(__vwsn_prop_Thickness) + CLASS_MEMBER_FIELD(__vwsn_prop_Top) + CLASS_MEMBER_PROPERTY_EVENT(Bottom, GetBottom, SetBottom, BottomChanged) + CLASS_MEMBER_PROPERTY_EVENT(Shadow, GetShadow, SetShadow, ShadowChanged) + CLASS_MEMBER_PROPERTY_EVENT(Thickness, GetThickness, SetThickness, ThicknessChanged) + CLASS_MEMBER_PROPERTY_EVENT(Top, GetTop, SetTop, TopChanged) + END_CLASS_MEMBER(::demo::ColorDef) + + BEGIN_CLASS_MEMBER(::demo::MainWindow) + CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_instance_ctor_, NO_PARAMETER) + CLASS_MEMBER_STATIC_METHOD(BallAnimation, { L"container" _ L"ball" }) + CLASS_MEMBER_STATIC_METHOD(BallAnimationWithDelay, { L"container" _ L"ball" _ L"delay" }) + CLASS_MEMBER_METHOD(PerformGradientAnimation, { L"target" }) + CLASS_MEMBER_STATIC_METHOD(WaitingAnimation, { L"container" }) + CLASS_MEMBER_FIELD(counter) + CLASS_MEMBER_FIELD(gradientColorDef) + CLASS_MEMBER_FIELD(lastGradientAnimation) + 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_18) + CLASS_MEMBER_FIELD(__vwsn_precompile_19) + CLASS_MEMBER_FIELD(__vwsn_precompile_2) + CLASS_MEMBER_FIELD(__vwsn_precompile_20) + 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(animationBackground) + CLASS_MEMBER_FIELD(self) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::ColorAnimation) + ADD_TYPE_INFO(::demo::ColorDef) + 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_Controls/Animation/UI/Source/DemoReflection.h b/Tutorial/GacUI_Controls/Animation/UI/Source/DemoReflection.h new file mode 100644 index 00000000..a4c66373 --- /dev/null +++ b/Tutorial/GacUI_Controls/Animation/UI/Source/DemoReflection.h @@ -0,0 +1,59 @@ +/*********************************************************************** +!!!!!! 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" +#ifndef VCZH_DEBUG_NO_REFLECTION +#include "GacUIReflection.h" +#endif + +#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::ColorAnimation) + DECL_TYPE_INFO(::demo::ColorDef) + 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_Controls/GacUI_Controls.sln b/Tutorial/GacUI_Controls/GacUI_Controls.sln index faa6b400..486f3246 100644 --- a/Tutorial/GacUI_Controls/GacUI_Controls.sln +++ b/Tutorial/GacUI_Controls/GacUI_Controls.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2027 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ContainersAndButtons", "ContainersAndButtons\ContainersAndButtons.vcxproj", "{0C211930-C5DA-4567-A752-1D847CADEC1C}" EndProject @@ -25,6 +25,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocumentEditor", "DocumentE EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CalculatorAndStateMachine", "CalculatorAndStateMachine\CalculatorAndStateMachine.vcxproj", "{7A1792BE-F866-44EE-83BF-E686BDA54B37}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "Animation\Animation.vcxproj", "{2D3277A7-05CC-4F4C-B12D-DAEDA13B4E5E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -103,6 +105,14 @@ Global {7A1792BE-F866-44EE-83BF-E686BDA54B37}.Release|Win32.Build.0 = Release|Win32 {7A1792BE-F866-44EE-83BF-E686BDA54B37}.Release|x64.ActiveCfg = Release|x64 {7A1792BE-F866-44EE-83BF-E686BDA54B37}.Release|x64.Build.0 = Release|x64 + {2D3277A7-05CC-4F4C-B12D-DAEDA13B4E5E}.Debug|Win32.ActiveCfg = Debug|Win32 + {2D3277A7-05CC-4F4C-B12D-DAEDA13B4E5E}.Debug|Win32.Build.0 = Debug|Win32 + {2D3277A7-05CC-4F4C-B12D-DAEDA13B4E5E}.Debug|x64.ActiveCfg = Debug|x64 + {2D3277A7-05CC-4F4C-B12D-DAEDA13B4E5E}.Debug|x64.Build.0 = Debug|x64 + {2D3277A7-05CC-4F4C-B12D-DAEDA13B4E5E}.Release|Win32.ActiveCfg = Release|Win32 + {2D3277A7-05CC-4F4C-B12D-DAEDA13B4E5E}.Release|Win32.Build.0 = Release|Win32 + {2D3277A7-05CC-4F4C-B12D-DAEDA13B4E5E}.Release|x64.ActiveCfg = Release|x64 + {2D3277A7-05CC-4F4C-B12D-DAEDA13B4E5E}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -110,4 +120,7 @@ Global GlobalSection(NestedProjects) = preSolution {96C559CA-9718-4BEC-A053-28A0AB6A8CA2} = {739DADD1-5B91-464A-B477-7581D6323E2B} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7905D32D-3D44-4C67-B616-778937E189F9} + EndGlobalSection EndGlobal diff --git a/Tutorial/GacUI_Controls/UIRes/Animation.bin b/Tutorial/GacUI_Controls/UIRes/Animation.bin new file mode 100644 index 00000000..b07616d0 Binary files /dev/null and b/Tutorial/GacUI_Controls/UIRes/Animation.bin differ