/*********************************************************************** THIS FILE IS AUTOMATICALLY GENERATED. DO NOT MODIFY DEVELOPER: Zihan Chen(vczh) ***********************************************************************/ #include "GacUI.UnitTest.UI.h" #ifndef VCZH_DEBUG_NO_REFLECTION #include "GacUI.UnitTest.UIReflection.h" #endif /*********************************************************************** .\APPLICATION\GUIUNITTESTSNAPSHOTVIEWERAPP.CPP ***********************************************************************/ namespace gaclib_controls { using namespace vl; using namespace vl::collections; using namespace vl::filesystem; using namespace vl::presentation; using namespace vl::presentation::elements; using namespace vl::presentation::compositions; using namespace vl::presentation::controls; using namespace vl::presentation::unittest; using namespace gaclib_controls; /*********************************************************************** Helper Functions ***********************************************************************/ Alignment GetAlignment(remoteprotocol::ElementHorizontalAlignment alignment) { switch (alignment) { case remoteprotocol::ElementHorizontalAlignment::Left: return Alignment::Left; case remoteprotocol::ElementHorizontalAlignment::Right: return Alignment::Right; default: return Alignment::Center; } } Alignment GetAlignment(remoteprotocol::ElementVerticalAlignment alignment) { switch (alignment) { case remoteprotocol::ElementVerticalAlignment::Top: return Alignment::Top; case remoteprotocol::ElementVerticalAlignment::Bottom: return Alignment::Bottom; default: return Alignment::Center; } } void InstallDom( const remoteprotocol::UnitTest_RenderingTrace& trace, const remoteprotocol::UnitTest_RenderingFrame& frame, GuiGraphicsComposition* container, vint x, vint y, Ptr dom, vint& cursorCounter) { auto bounds = new GuiBoundsComposition; container->AddChild(bounds); bounds->SetExpectedBounds(Rect({ dom->content.bounds.x1 - x,dom->content.bounds.y1 - y }, { dom->content.bounds.Width(),dom->content.bounds.Height() })); auto cursor = dom->content.cursor; if (dom->content.cursor) { cursorCounter++; } if (dom->content.hitTestResult && cursorCounter == 0) { switch (dom->content.hitTestResult.Value()) { case INativeWindowListener::BorderLeft: case INativeWindowListener::BorderRight: cursor = INativeCursor::SizeWE; break; case INativeWindowListener::BorderTop: case INativeWindowListener::BorderBottom: cursor = INativeCursor::SizeNS; break; case INativeWindowListener::BorderLeftTop: case INativeWindowListener::BorderRightBottom: cursor = INativeCursor::SizeNWSE; break; case INativeWindowListener::BorderRightTop: case INativeWindowListener::BorderLeftBottom: cursor = INativeCursor::SizeNESW; break; case INativeWindowListener::Icon: case INativeWindowListener::ButtonMinimum: case INativeWindowListener::ButtonMaximum: case INativeWindowListener::ButtonClose: cursor = INativeCursor::Hand; break; case INativeWindowListener::Title: cursor = INativeCursor::SizeAll; break; } } if (cursor) { bounds->SetAssociatedCursor(GetCurrentController()->ResourceService()->GetSystemCursor(cursor.Value())); } if (dom->content.element) { switch (trace.createdElements->Get(dom->content.element.Value())) { case remoteprotocol::RendererType::FocusRectangle: { auto element = Ptr(GuiFocusRectangleElement::Create()); bounds->SetOwnedElement(element); } break; case remoteprotocol::RendererType::SolidBorder: { auto element = Ptr(GuiSolidBorderElement::Create()); bounds->SetOwnedElement(element); auto& desc = frame.elements->Get(dom->content.element.Value()).Get(); element->SetColor(desc.borderColor); element->SetShape(desc.shape); } break; case remoteprotocol::RendererType::SinkBorder: { auto element = Ptr(Gui3DBorderElement::Create()); bounds->SetOwnedElement(element); auto& desc = frame.elements->Get(dom->content.element.Value()).Get(); element->SetColors(desc.leftTopColor, desc.rightBottomColor); } break; case remoteprotocol::RendererType::SinkSplitter: { auto element = Ptr(Gui3DSplitterElement::Create()); bounds->SetOwnedElement(element); auto& desc = frame.elements->Get(dom->content.element.Value()).Get(); element->SetColors(desc.leftTopColor, desc.rightBottomColor); element->SetDirection(desc.direction); } break; case remoteprotocol::RendererType::SolidBackground: { auto element = Ptr(GuiSolidBackgroundElement::Create()); bounds->SetOwnedElement(element); auto& desc = frame.elements->Get(dom->content.element.Value()).Get(); element->SetColor(desc.backgroundColor); element->SetShape(desc.shape); } break; case remoteprotocol::RendererType::GradientBackground: { auto element = Ptr(GuiGradientBackgroundElement::Create()); bounds->SetOwnedElement(element); auto& desc = frame.elements->Get(dom->content.element.Value()).Get(); element->SetColors(desc.leftTopColor, desc.rightBottomColor); element->SetDirection(desc.direction); element->SetShape(desc.shape); } break; case remoteprotocol::RendererType::InnerShadow: { auto element = Ptr(GuiInnerShadowElement::Create()); bounds->SetOwnedElement(element); auto& desc = frame.elements->Get(dom->content.element.Value()).Get(); element->SetColor(desc.shadowColor); element->SetThickness(desc.thickness); } break; case remoteprotocol::RendererType::SolidLabel: { auto element = Ptr(GuiSolidLabelElement::Create()); bounds->SetOwnedElement(element); auto& desc = frame.elements->Get(dom->content.element.Value()).Get(); element->SetColor(desc.textColor); element->SetAlignments(GetAlignment(desc.horizontalAlignment), GetAlignment(desc.verticalAlignment)); element->SetWrapLine(desc.wrapLine); element->SetWrapLineHeightCalculation(desc.wrapLineHeightCalculation); element->SetEllipse(desc.ellipse); element->SetMultiline(desc.multiline); element->SetFont(desc.font.Value()); element->SetText(desc.text.Value()); } break; case remoteprotocol::RendererType::Polygon: { auto element = Ptr(GuiPolygonElement::Create()); bounds->SetOwnedElement(element); auto& desc = frame.elements->Get(dom->content.element.Value()).Get(); element->SetSize(desc.size); element->SetBorderColor(desc.borderColor); element->SetBackgroundColor(desc.backgroundColor); if (desc.points && desc.points->Count() > 0) { element->SetPoints(&desc.points->Get(0), desc.points->Count()); } } break; case remoteprotocol::RendererType::ImageFrame: { auto element = Ptr(GuiImageFrameElement::Create()); bounds->SetOwnedElement(element); auto& desc = frame.elements->Get(dom->content.element.Value()).Get(); element->SetAlignments(GetAlignment(desc.horizontalAlignment), GetAlignment(desc.verticalAlignment)); element->SetStretch(desc.stretch); element->SetEnabled(desc.enabled); if (desc.imageId) { vint index = trace.imageCreations->Keys().IndexOf(desc.imageId.Value()); if (index != -1) { auto binary = trace.imageCreations->Values()[index].imageData; binary->SeekFromBegin(0); element->SetImage(GetCurrentController()->ImageService()->CreateImageFromStream(*binary.Obj()), desc.imageFrame); } } } break; default: CHECK_FAIL(L"This element is not supported yet."); break; } } if(dom->children) { for (auto child : *dom->children.Obj()) { InstallDom(trace, frame, bounds, dom->content.bounds.x1, dom->content.bounds.y1, child, cursorCounter); } } if (dom->content.cursor) { cursorCounter--; } } GuiBoundsComposition* BuildRootComposition(const remoteprotocol::UnitTest_RenderingTrace& trace, const remoteprotocol::UnitTest_RenderingFrame& frame) { vint w = frame.windowSize.clientBounds.Width().value; vint h = frame.windowSize.clientBounds.Height().value; auto focusComposition = new GuiBoundsComposition; { focusComposition->SetExpectedBounds(Rect({ 5,5 }, { w + 2,h + 2 })); auto element = Ptr(GuiFocusRectangleElement::Create()); focusComposition->SetOwnedElement(element); } auto canvasComposition = new GuiBoundsComposition; { focusComposition->AddChild(canvasComposition); canvasComposition->SetExpectedBounds(Rect({ 1,1 }, { w,h })); } if (frame.root && frame.root->children) { vint cursorCounter = 0; for (auto child : *frame.root->children.Obj()) { InstallDom(trace, frame, canvasComposition, 0, 0, child, cursorCounter); } } return focusComposition; } /*********************************************************************** UnitTestSnapshotViewerAppWindow ***********************************************************************/ void UnitTestSnapshotViewerAppWindow::textListFrames_SelectionChanged(GuiGraphicsComposition* sender, GuiEventArgs& arguments) { if (rootComposition) { SafeDeleteComposition(rootComposition); rootComposition = nullptr; } auto nodeObj = treeViewFileNodes->GetSelectedItem(); if (!nodeObj.GetSharedPtr()) return; auto node = nodeObj.GetSharedPtr().Cast(); auto frameObj = textListFrames->GetSelectedItem(); if (!frameObj.GetSharedPtr()) return; auto frame = frameObj.GetSharedPtr().Cast(); if (node && node->GetNodeType() == UnitTestSnapshotFileNodeType::File && frame) { rootComposition = BuildRootComposition(GetRenderingTrace(node), GetRenderingFrame(frame)); scRendering->GetContainerComposition()->AddChild(rootComposition); } } UnitTestSnapshotViewerAppWindow::UnitTestSnapshotViewerAppWindow(Ptr viewModel) : UnitTestSnapshotViewerWindow(viewModel) { textListFrames->SelectionChanged.AttachMethod(this, &UnitTestSnapshotViewerAppWindow::textListFrames_SelectionChanged); } } /*********************************************************************** .\SOURCE\GUIUNITTESTSNAPSHOTVIEWER.CPP ***********************************************************************/ /*********************************************************************** !!!!!! DO NOT MODIFY !!!!!! Source: GacUI UnitTestSnapshotViewer This file is generated by Workflow compiler https://github.com/vczh-libraries ***********************************************************************/ #if defined( _MSC_VER) #pragma warning(push) #pragma warning(disable:4250) #elif defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wparentheses-equality" #elif defined(__GNUC__) #pragma GCC diagnostic push #endif #define GLOBAL_SYMBOL ::vl_workflow_global::GuiUnitTestSnapshotViewer:: #define GLOBAL_NAME ::vl_workflow_global::GuiUnitTestSnapshotViewer::Instance(). #define GLOBAL_OBJ &::vl_workflow_global::GuiUnitTestSnapshotViewer::Instance() /*********************************************************************** Global Variables ***********************************************************************/ BEGIN_GLOBAL_STORAGE_CLASS(vl_workflow_global_GuiUnitTestSnapshotViewer) vl_workflow_global::GuiUnitTestSnapshotViewer instance; INITIALIZE_GLOBAL_STORAGE_CLASS instance.__vwsn_ls_UnitTestSnapshotViewerStrings = ::vl::reflection::description::IValueDictionary::Create(); ([]() { ::gaclib_controls::UnitTestSnapshotViewerStrings::Install(::vl::__vwsn::Parse<::vl::Locale>(::vl::WString::Unmanaged(L"en-US")), ::gaclib_controls::UnitTestSnapshotViewerStrings::__vwsn_ls_en_US_BuildStrings(::vl::__vwsn::Parse<::vl::Locale>(::vl::WString::Unmanaged(L"en-US")))); } )(); FINALIZE_GLOBAL_STORAGE_CLASS instance.__vwsn_ls_UnitTestSnapshotViewerStrings = nullptr; END_GLOBAL_STORAGE_CLASS(vl_workflow_global_GuiUnitTestSnapshotViewer) namespace vl_workflow_global { /*********************************************************************** Global Functions ***********************************************************************/ GuiUnitTestSnapshotViewer& GuiUnitTestSnapshotViewer::Instance() { return Getvl_workflow_global_GuiUnitTestSnapshotViewer().instance; } /*********************************************************************** Closures ***********************************************************************/ //------------------------------------------------------------------- __vwsnf1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::__vwsnf1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { } ::vl::Ptr<::vl::reflection::description::IValueEnumerable> __vwsnf1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::operator()(const ::vl::reflection::description::Value& __vwsn_item_) const { auto item = ::vl::__vwsn::Unbox<::vl::Ptr<::gaclib_controls::IUnitTestSnapshotFileNode>>(__vwsn_item_); return ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueEnumerable>(::vl::__vwsn::This(item.Obj())->GetChildren()); } //------------------------------------------------------------------- __vwsnf2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::__vwsnf2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { } ::vl::WString __vwsnf2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::operator()(const ::vl::reflection::description::Value& __vwsn_item_) const { auto item = ::vl::__vwsn::Unbox<::vl::Ptr<::gaclib_controls::IUnitTestSnapshotFileNode>>(__vwsn_item_); return ::vl::__vwsn::This(item.Obj())->GetName(); } //------------------------------------------------------------------- __vwsnf3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::__vwsnf3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { } ::vl::WString __vwsnf3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::operator()(const ::vl::reflection::description::Value& __vwsn_item_) const { auto item = ::vl::__vwsn::Unbox<::vl::Ptr<::gaclib_controls::IUnitTestSnapshotFrame>>(__vwsn_item_); return ::vl::__vwsn::This(item.Obj())->GetName(); } //------------------------------------------------------------------- __vwsnf5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::__vwsnf5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { } void __vwsnf5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::operator()(const ::vl::reflection::description::Value& __vwsn_value_) const { auto __vwsn_old_ = ::vl::__vwsn::This(__vwsnthis_0->textListFrames)->GetItemSource(); auto __vwsn_new_ = ::vl::__vwsn::Unbox<::vl::Ptr<::vl::reflection::description::IValueEnumerable>>(__vwsn_value_); if ((__vwsn_old_.Obj() == __vwsn_new_.Obj())) { return; } ::vl::__vwsn::This(__vwsnthis_0->textListFrames)->SetItemSource(__vwsn_new_); } //------------------------------------------------------------------- __vwsnf6_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::__vwsnf6_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { } void __vwsnf6_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::operator()(const ::vl::reflection::description::Value& __vwsn_value_) const { auto __vwsn_old_ = ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_16)->GetText(); auto __vwsn_new_ = ::vl::__vwsn::Unbox<::vl::WString>(__vwsn_value_); if ((__vwsn_old_ == __vwsn_new_)) { return; } ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_16)->SetText(__vwsn_new_); } //------------------------------------------------------------------- __vwsnf7_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::__vwsnf7_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { } void __vwsnf7_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::operator()(const ::vl::reflection::description::Value& __vwsn_value_) const { auto __vwsn_old_ = ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_19)->GetText(); auto __vwsn_new_ = ::vl::__vwsn::Unbox<::vl::WString>(__vwsn_value_); if ((__vwsn_old_ == __vwsn_new_)) { return; } ::vl::__vwsn::This(__vwsnthis_0->__vwsn_precompile_19)->SetText(__vwsn_new_); } //------------------------------------------------------------------- __vwsnf8_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::__vwsnf8_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { } void __vwsnf8_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::operator()(const ::vl::reflection::description::Value& __vwsn_value_) const { auto __vwsn_old_ = ::vl::__vwsn::This(__vwsnthis_0->self)->GetText(); auto __vwsn_new_ = ::vl::__vwsn::Unbox<::vl::WString>(__vwsn_value_); if ((__vwsn_old_ == __vwsn_new_)) { return; } ::vl::__vwsn::This(__vwsnthis_0->self)->SetText(__vwsn_new_); } //------------------------------------------------------------------- __vwsnf9_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::__vwsnf9_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { } void __vwsnf9_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::operator()(const ::vl::reflection::description::Value& __vwsn_value_) const { auto __vwsn_old_ = ::vl::__vwsn::This(__vwsnthis_0->self)->GetStrings(); auto __vwsn_new_ = ::vl::__vwsn::Unbox<::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerStringsStrings>>(__vwsn_value_); if ((__vwsn_old_.Obj() == __vwsn_new_.Obj())) { return; } ::vl::__vwsn::This(__vwsnthis_0->self)->SetStrings(__vwsn_new_); } //------------------------------------------------------------------- __vwsno4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::__vwsno4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { } ::vl::Ptr<::vl::presentation::GuiImageData> __vwsno4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_::operator()(const ::vl::reflection::description::Value& __vwsno_1) const { return ::vl::__vwsn::This(__vwsnthis_0->self)->GetImageFromType(::vl::__vwsn::This(::vl::__vwsn::Unbox<::vl::Ptr<::gaclib_controls::IUnitTestSnapshotFileNode>>(__vwsno_1).Obj())->GetNodeType()); } //------------------------------------------------------------------- __vwsnc1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsnc1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { this->__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiBindableTreeView*>(nullptr); this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); this->__vwsn_bind_opened_ = false; this->__vwsn_bind_closed_ = false; } void __vwsnc1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_activator_() { auto __vwsn_bind_activator_result_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueEnumerable>([&](){ try{ return ::vl::__vwsn::This(::vl::__vwsn::Unbox<::vl::Ptr<::gaclib_controls::IUnitTestSnapshotFileNode>>(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetSelectedItem()).Obj())->GetFrames(); } catch(...){ return ::vl::collections::LazyList<::vl::Ptr<::gaclib_controls::IUnitTestSnapshotFrame>>(); } }()); ::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_)); } void __vwsnc1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0(::vl::presentation::compositions::GuiGraphicsComposition* __vwsn_bind_callback_argument_0, ::vl::presentation::compositions::GuiEventArgs* __vwsn_bind_callback_argument_1) { this->__vwsn_bind_activator_(); } bool __vwsnc1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Open() { if ((! __vwsn_bind_opened_)) { (__vwsn_bind_opened_ = true); (__vwsn_bind_cache_0 = [&](){ try{ return __vwsnthis_0->treeViewFileNodes; } catch(...){ return static_cast<::vl::presentation::controls::GuiBindableTreeView*>(nullptr); } }()); (__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->SelectionChanged, ::vl::Func(this, &__vwsnc1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }()); return true; } return false; } bool __vwsnc1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Update() { if ((__vwsn_bind_opened_ && (! __vwsn_bind_closed_))) { this->__vwsn_bind_activator_(); return true; } return false; } bool __vwsnc1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Close() { if ((! __vwsn_bind_closed_)) { (__vwsn_bind_closed_ = true); if (static_cast(__vwsn_bind_handler_0_0)) { ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->SelectionChanged, __vwsn_bind_handler_0_0); (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); } (__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiBindableTreeView*>(nullptr)); (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); return true; } return false; } //------------------------------------------------------------------- __vwsnc2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsnc2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { this->__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiBindableTextList*>(nullptr); this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); this->__vwsn_bind_opened_ = false; this->__vwsn_bind_closed_ = false; } void __vwsnc2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_activator_() { auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(::vl::__vwsn::Unbox<::vl::Ptr<::gaclib_controls::IUnitTestSnapshotFrame>>(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetSelectedItem()).Obj())->GetDomAsJsonText(); } catch(...){ return ::vl::WString::Unmanaged(L""); } }(); ::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_)); } void __vwsnc2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0(::vl::presentation::compositions::GuiGraphicsComposition* __vwsn_bind_callback_argument_0, ::vl::presentation::compositions::GuiEventArgs* __vwsn_bind_callback_argument_1) { this->__vwsn_bind_activator_(); } bool __vwsnc2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Open() { if ((! __vwsn_bind_opened_)) { (__vwsn_bind_opened_ = true); (__vwsn_bind_cache_0 = [&](){ try{ return __vwsnthis_0->textListFrames; } catch(...){ return static_cast<::vl::presentation::controls::GuiBindableTextList*>(nullptr); } }()); (__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->SelectionChanged, ::vl::Func(this, &__vwsnc2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }()); return true; } return false; } bool __vwsnc2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Update() { if ((__vwsn_bind_opened_ && (! __vwsn_bind_closed_))) { this->__vwsn_bind_activator_(); return true; } return false; } bool __vwsnc2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Close() { if ((! __vwsn_bind_closed_)) { (__vwsn_bind_closed_ = true); if (static_cast(__vwsn_bind_handler_0_0)) { ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->SelectionChanged, __vwsn_bind_handler_0_0); (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); } (__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiBindableTextList*>(nullptr)); (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); return true; } return false; } //------------------------------------------------------------------- __vwsnc3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsnc3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { this->__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiBindableTextList*>(nullptr); this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); this->__vwsn_bind_opened_ = false; this->__vwsn_bind_closed_ = false; } void __vwsnc3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_activator_() { auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(::vl::__vwsn::Unbox<::vl::Ptr<::gaclib_controls::IUnitTestSnapshotFrame>>(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetSelectedItem()).Obj())->GetElementsAsJsonText(); } catch(...){ return ::vl::WString::Unmanaged(L""); } }(); ::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_)); } void __vwsnc3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0(::vl::presentation::compositions::GuiGraphicsComposition* __vwsn_bind_callback_argument_0, ::vl::presentation::compositions::GuiEventArgs* __vwsn_bind_callback_argument_1) { this->__vwsn_bind_activator_(); } bool __vwsnc3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Open() { if ((! __vwsn_bind_opened_)) { (__vwsn_bind_opened_ = true); (__vwsn_bind_cache_0 = [&](){ try{ return __vwsnthis_0->textListFrames; } catch(...){ return static_cast<::vl::presentation::controls::GuiBindableTextList*>(nullptr); } }()); (__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->SelectionChanged, ::vl::Func(this, &__vwsnc3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }()); return true; } return false; } bool __vwsnc3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Update() { if ((__vwsn_bind_opened_ && (! __vwsn_bind_closed_))) { this->__vwsn_bind_activator_(); return true; } return false; } bool __vwsnc3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Close() { if ((! __vwsn_bind_closed_)) { (__vwsn_bind_closed_ = true); if (static_cast(__vwsn_bind_handler_0_0)) { ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->SelectionChanged, __vwsn_bind_handler_0_0); (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); } (__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiBindableTextList*>(nullptr)); (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); return true; } return false; } //------------------------------------------------------------------- __vwsnc4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsnc4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription(::gaclib_controls::UnitTestSnapshotViewerWindow* __vwsnctor___vwsn_this_, ::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsn_this_(__vwsnctor___vwsn_this_) , __vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { this->__vwsn_bind_cache_0 = static_cast<::gaclib_controls::UnitTestSnapshotViewerWindow*>(nullptr); this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); this->__vwsn_bind_opened_ = false; this->__vwsn_bind_closed_ = false; } void __vwsnc4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_activator_() { auto __vwsn_bind_activator_result_ = ::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetStrings().Obj())->WindowTitle(); ::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_)); } void __vwsnc4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0() { this->__vwsn_bind_activator_(); } bool __vwsnc4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Open() { if ((! __vwsn_bind_opened_)) { (__vwsn_bind_opened_ = true); (__vwsn_bind_cache_0 = [&](){ try{ return __vwsn_this_; } catch(...){ return static_cast<::gaclib_controls::UnitTestSnapshotViewerWindow*>(nullptr); } }()); (__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->StringsChanged, ::vl::Func(this, &__vwsnc4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }()); return true; } return false; } bool __vwsnc4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Update() { if ((__vwsn_bind_opened_ && (! __vwsn_bind_closed_))) { this->__vwsn_bind_activator_(); return true; } return false; } bool __vwsnc4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Close() { if ((! __vwsn_bind_closed_)) { (__vwsn_bind_closed_ = true); if (static_cast(__vwsn_bind_handler_0_0)) { ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->StringsChanged, __vwsn_bind_handler_0_0); (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); } (__vwsn_bind_cache_0 = static_cast<::gaclib_controls::UnitTestSnapshotViewerWindow*>(nullptr)); (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); return true; } return false; } //------------------------------------------------------------------- __vwsnc5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsnc5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription(::gaclib_controls::UnitTestSnapshotViewerWindowConstructor* __vwsnctorthis_0) :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) { this->__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiApplication*>(nullptr); this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>(); this->__vwsn_bind_opened_ = false; this->__vwsn_bind_closed_ = false; } void __vwsnc5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_activator_() { auto __vwsn_bind_activator_result_ = ::gaclib_controls::UnitTestSnapshotViewerStrings::Get(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetLocale()); ::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_)); } void __vwsnc5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0() { this->__vwsn_bind_activator_(); } bool __vwsnc5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Open() { if ((! __vwsn_bind_opened_)) { (__vwsn_bind_opened_ = true); (__vwsn_bind_cache_0 = [&](){ try{ return ::vl::presentation::controls::GetApplication(); } catch(...){ return static_cast<::vl::presentation::controls::GuiApplication*>(nullptr); } }()); (__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->LocaleChanged, ::vl::Func(this, &__vwsnc5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }()); return true; } return false; } bool __vwsnc5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Update() { if ((__vwsn_bind_opened_ && (! __vwsn_bind_closed_))) { this->__vwsn_bind_activator_(); return true; } return false; } bool __vwsnc5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription::Close() { if ((! __vwsn_bind_closed_)) { (__vwsn_bind_closed_ = true); if (static_cast(__vwsn_bind_handler_0_0)) { ::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->LocaleChanged, __vwsn_bind_handler_0_0); (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); } (__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiApplication*>(nullptr)); (__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>()); return true; } return false; } //------------------------------------------------------------------- __vwsnc6_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerStrings___vwsn_ls_en_US_BuildStrings__gaclib_controls_IUnitTestSnapshotViewerStringsStrings::__vwsnc6_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerStrings___vwsn_ls_en_US_BuildStrings__gaclib_controls_IUnitTestSnapshotViewerStringsStrings() { } ::vl::WString __vwsnc6_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerStrings___vwsn_ls_en_US_BuildStrings__gaclib_controls_IUnitTestSnapshotViewerStringsStrings::WindowTitle() { return ::vl::WString::Unmanaged(L"Unit Test Snapshot Viewer"); } } /*********************************************************************** Class (::gaclib_controls::IUnitTestSnapshotFileNode) ***********************************************************************/ namespace gaclib_controls { /*********************************************************************** Class (::gaclib_controls::IUnitTestSnapshotFrame) ***********************************************************************/ /*********************************************************************** Class (::gaclib_controls::IUnitTestSnapshotViewerStringsStrings) ***********************************************************************/ /*********************************************************************** Class (::gaclib_controls::IUnitTestSnapshotViewerViewModel) ***********************************************************************/ /*********************************************************************** Class (::gaclib_controls::UnitTestSnapshotViewerStrings) ***********************************************************************/ ::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerStringsStrings> UnitTestSnapshotViewerStrings::__vwsn_ls_en_US_BuildStrings(::vl::Locale __vwsn_ls_locale) { return ::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerStringsStrings>(new ::vl_workflow_global::__vwsnc6_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerStrings___vwsn_ls_en_US_BuildStrings__gaclib_controls_IUnitTestSnapshotViewerStringsStrings()); } void UnitTestSnapshotViewerStrings::Install(::vl::Locale __vwsn_ls_locale, ::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerStringsStrings> __vwsn_ls_impl) { if (::vl::__vwsn::This(::vl::__vwsn::This(GLOBAL_NAME __vwsn_ls_UnitTestSnapshotViewerStrings.Obj())->GetKeys().Obj())->Contains(::vl::__vwsn::Box(__vwsn_ls_locale))) { throw ::vl::Exception(((::vl::WString::Unmanaged(L"Localized strings \"gaclib_controls::UnitTestSnapshotViewerStrings\" has already registered for locale \"") + ::vl::__vwsn::ToString(__vwsn_ls_locale)) + ::vl::WString::Unmanaged(L"\"."))); } ::vl::__vwsn::This(GLOBAL_NAME __vwsn_ls_UnitTestSnapshotViewerStrings.Obj())->Set(::vl::__vwsn::Box(__vwsn_ls_locale), ::vl::__vwsn::Box(__vwsn_ls_impl)); } ::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerStringsStrings> UnitTestSnapshotViewerStrings::Get(::vl::Locale __vwsn_ls_locale) { if (::vl::__vwsn::This(::vl::__vwsn::This(GLOBAL_NAME __vwsn_ls_UnitTestSnapshotViewerStrings.Obj())->GetKeys().Obj())->Contains(::vl::__vwsn::Box(__vwsn_ls_locale))) { return ::vl::__vwsn::Unbox<::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerStringsStrings>>(::vl::__vwsn::This(GLOBAL_NAME __vwsn_ls_UnitTestSnapshotViewerStrings.Obj())->Get(::vl::__vwsn::Box(__vwsn_ls_locale))); } return ::vl::__vwsn::Unbox<::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerStringsStrings>>(::vl::__vwsn::This(GLOBAL_NAME __vwsn_ls_UnitTestSnapshotViewerStrings.Obj())->Get(::vl::__vwsn::Box(::vl::__vwsn::Parse<::vl::Locale>(::vl::WString::Unmanaged(L"en-US"))))); } UnitTestSnapshotViewerStrings::UnitTestSnapshotViewerStrings() { } /*********************************************************************** Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor) ***********************************************************************/ void UnitTestSnapshotViewerWindowConstructor::__vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize(::gaclib_controls::UnitTestSnapshotViewerWindow* __vwsn_this_) { (this->self = __vwsn_this_); (this->ViewModel = ::vl::__vwsn::This(__vwsn_this_)->GetViewModel()); { ::vl::__vwsn::This(this->self)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(1920); __vwsn_temp__.y = static_cast<::vl::vint>(1080); return __vwsn_temp__; }()); } (this->__vwsn_precompile_0 = new ::vl::presentation::compositions::GuiTableComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetCellPadding(static_cast<::vl::vint>(5)); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowsAndColumns(static_cast<::vl::vint>(1), static_cast<::vl::vint>(4)); ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetRowOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint>(0), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint>(200); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint>(1), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint>(100); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint>(2), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = static_cast<::vl::vint>(200); return __vwsn_temp__; }()); ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetColumnOption(static_cast<::vl::vint>(3), [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = static_cast(1.0); return __vwsn_temp__; }()); } (this->__vwsn_precompile_1 = new ::vl::presentation::compositions::GuiColumnSplitterComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetColumnsToTheLeft(static_cast<::vl::vint>(2)); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_1)); } (this->__vwsn_precompile_2 = new ::vl::presentation::compositions::GuiColumnSplitterComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetColumnsToTheLeft(static_cast<::vl::vint>(3)); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_2)); } (this->__vwsn_precompile_3 = new ::vl::presentation::compositions::GuiCellComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_3)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(2)); } { (this->treeViewFileNodes = new ::vl::presentation::controls::GuiBindableTreeView(::vl::presentation::theme::ThemeName::TreeView)); ::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"treeViewFileNodes"), ::vl::__vwsn::Box(this->treeViewFileNodes)); } { ::vl::__vwsn::This(this->treeViewFileNodes)->SetChildrenProperty(vl::Func(::vl_workflow_global::__vwsnf1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(this))); } { ::vl::__vwsn::This(this->treeViewFileNodes)->SetTextProperty(vl::Func(::vl_workflow_global::__vwsnf2_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(this))); } (this->__vwsn_precompile_4 = ::vl::__vwsn::This(this->treeViewFileNodes)->GetBoundsComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_4)->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->treeViewFileNodes)->SetHorizontalAlwaysVisible(false); } { ::vl::__vwsn::This(this->treeViewFileNodes)->SetVerticalAlwaysVisible(false); } { ::vl::__vwsn::This(this->__vwsn_precompile_3)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->treeViewFileNodes)->GetBoundsComposition())); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_3)); } (this->__vwsn_precompile_5 = new ::vl::presentation::compositions::GuiCellComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(2), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { (this->__vwsn_precompile_6 = new ::vl::presentation::controls::GuiTab(::vl::presentation::theme::ThemeName::Tab)); } { (this->__vwsn_precompile_8 = new ::vl::presentation::controls::GuiTabPage(::vl::presentation::theme::ThemeName::CustomControl)); } { ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetText(::vl::WString::Unmanaged(L"Frames")); } { (this->textListFrames = new ::vl::presentation::controls::GuiBindableTextList(::vl::presentation::theme::ThemeName::TextList)); ::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"textListFrames"), ::vl::__vwsn::Box(this->textListFrames)); } { ::vl::__vwsn::This(this->textListFrames)->SetTextProperty(vl::Func(::vl_workflow_global::__vwsnf3_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(this))); } (this->__vwsn_precompile_9 = ::vl::__vwsn::This(this->textListFrames)->GetBoundsComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->textListFrames)->SetHorizontalAlwaysVisible(false); } { ::vl::__vwsn::This(this->textListFrames)->SetVerticalAlwaysVisible(false); } { ::vl::__vwsn::This(this->__vwsn_precompile_8)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->textListFrames)); } { auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueObservableList>(::vl::__vwsn::This(this->__vwsn_precompile_6)->GetPages()); ::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_8)); } (this->__vwsn_precompile_7 = ::vl::__vwsn::This(this->__vwsn_precompile_6)->GetBoundsComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_7)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_5)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->__vwsn_precompile_6)->GetBoundsComposition())); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_5)); } (this->__vwsn_precompile_10 = new ::vl::presentation::compositions::GuiCellComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_10)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(3), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1)); } { (this->__vwsn_precompile_11 = new ::vl::presentation::controls::GuiTab(::vl::presentation::theme::ThemeName::Tab)); } { (this->__vwsn_precompile_13 = new ::vl::presentation::controls::GuiTabPage(::vl::presentation::theme::ThemeName::CustomControl)); } { ::vl::__vwsn::This(this->__vwsn_precompile_13)->SetText(::vl::WString::Unmanaged(L"Rendering")); } { (this->scRendering = new ::vl::presentation::controls::GuiScrollContainer(::vl::presentation::theme::ThemeName::ScrollView)); ::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"scRendering"), ::vl::__vwsn::Box(this->scRendering)); } (this->__vwsn_precompile_14 = ::vl::__vwsn::This(this->scRendering)->GetBoundsComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_14)->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->scRendering)->SetHorizontalAlwaysVisible(false); } { ::vl::__vwsn::This(this->scRendering)->SetVerticalAlwaysVisible(false); } { ::vl::__vwsn::This(this->__vwsn_precompile_13)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->scRendering)); } { auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueObservableList>(::vl::__vwsn::This(this->__vwsn_precompile_11)->GetPages()); ::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_13)); } { (this->__vwsn_precompile_15 = new ::vl::presentation::controls::GuiTabPage(::vl::presentation::theme::ThemeName::CustomControl)); } { ::vl::__vwsn::This(this->__vwsn_precompile_15)->SetText(::vl::WString::Unmanaged(L"DOM")); } { (this->__vwsn_precompile_16 = new ::vl::presentation::controls::GuiMultilineTextBox(::vl::presentation::theme::ThemeName::MultilineTextBox)); } (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>(5); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(5); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_16)->SetHorizontalAlwaysVisible(false); } { ::vl::__vwsn::This(this->__vwsn_precompile_16)->SetVerticalAlwaysVisible(false); } { ::vl::__vwsn::This(this->__vwsn_precompile_15)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->__vwsn_precompile_16)); } { auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueObservableList>(::vl::__vwsn::This(this->__vwsn_precompile_11)->GetPages()); ::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_15)); } { (this->__vwsn_precompile_18 = new ::vl::presentation::controls::GuiTabPage(::vl::presentation::theme::ThemeName::CustomControl)); } { ::vl::__vwsn::This(this->__vwsn_precompile_18)->SetText(::vl::WString::Unmanaged(L"Elements")); } { (this->__vwsn_precompile_19 = new ::vl::presentation::controls::GuiMultilineTextBox(::vl::presentation::theme::ThemeName::MultilineTextBox)); } (this->__vwsn_precompile_20 = ::vl::__vwsn::This(this->__vwsn_precompile_19)->GetBoundsComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_20)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(5); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(5); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_19)->SetHorizontalAlwaysVisible(false); } { ::vl::__vwsn::This(this->__vwsn_precompile_19)->SetVerticalAlwaysVisible(false); } { ::vl::__vwsn::This(this->__vwsn_precompile_18)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->__vwsn_precompile_19)); } { auto __vwsn_collection_ = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueObservableList>(::vl::__vwsn::This(this->__vwsn_precompile_11)->GetPages()); ::vl::__vwsn::This(__vwsn_collection_.Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_18)); } (this->__vwsn_precompile_12 = ::vl::__vwsn::This(this->__vwsn_precompile_11)->GetBoundsComposition()); { ::vl::__vwsn::This(this->__vwsn_precompile_12)->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)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->__vwsn_precompile_11)->GetBoundsComposition())); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_10)); } { ::vl::__vwsn::This(::vl::__vwsn::This(this->self)->GetContainerComposition())->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_0)); } { ::vl::__vwsn::This(this->treeViewFileNodes)->SetItemSource(::vl::__vwsn::Box(::vl::__vwsn::This(this->ViewModel.Obj())->GetRootNode())); } { ::vl::__vwsn::This(this->treeViewFileNodes)->SetImageProperty(vl::Func(::vl_workflow_global::__vwsno4_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(this))); } { auto __vwsn_created_subscription_ = ::vl::Ptr<::vl::reflection::description::IValueSubscription>(new ::vl_workflow_global::__vwsnc1_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription(this)); ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, vl::Func(::vl_workflow_global::__vwsnf5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(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_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription(this)); ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, vl::Func(::vl_workflow_global::__vwsnf6_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(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_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription(this)); ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, vl::Func(::vl_workflow_global::__vwsnf7_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(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_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription(__vwsn_this_, this)); ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, vl::Func(::vl_workflow_global::__vwsnf8_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(this))); ::vl::__vwsn::This(__vwsn_this_)->AddSubscription(__vwsn_created_subscription_); } { auto __vwsn_created_subscription_ = ::vl::Ptr<::vl::reflection::description::IValueSubscription>(new ::vl_workflow_global::__vwsnc5_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize__vl_reflection_description_IValueSubscription(this)); ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, vl::Func(::vl_workflow_global::__vwsnf9_GuiUnitTestSnapshotViewer_gaclib_controls_UnitTestSnapshotViewerWindowConstructor___vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize_(this))); ::vl::__vwsn::This(__vwsn_this_)->AddSubscription(__vwsn_created_subscription_); } } UnitTestSnapshotViewerWindowConstructor::UnitTestSnapshotViewerWindowConstructor() : ViewModel(::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerViewModel>()) , self(static_cast<::gaclib_controls::UnitTestSnapshotViewerWindow*>(nullptr)) , treeViewFileNodes(static_cast<::vl::presentation::controls::GuiBindableTreeView*>(nullptr)) , textListFrames(static_cast<::vl::presentation::controls::GuiBindableTextList*>(nullptr)) , scRendering(static_cast<::vl::presentation::controls::GuiScrollContainer*>(nullptr)) , __vwsn_precompile_0(static_cast<::vl::presentation::compositions::GuiTableComposition*>(nullptr)) , __vwsn_precompile_1(static_cast<::vl::presentation::compositions::GuiColumnSplitterComposition*>(nullptr)) , __vwsn_precompile_2(static_cast<::vl::presentation::compositions::GuiColumnSplitterComposition*>(nullptr)) , __vwsn_precompile_3(static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr)) , __vwsn_precompile_4(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) , __vwsn_precompile_5(static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr)) , __vwsn_precompile_6(static_cast<::vl::presentation::controls::GuiTab*>(nullptr)) , __vwsn_precompile_7(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) , __vwsn_precompile_8(static_cast<::vl::presentation::controls::GuiTabPage*>(nullptr)) , __vwsn_precompile_9(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) , __vwsn_precompile_10(static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr)) , __vwsn_precompile_11(static_cast<::vl::presentation::controls::GuiTab*>(nullptr)) , __vwsn_precompile_12(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) , __vwsn_precompile_13(static_cast<::vl::presentation::controls::GuiTabPage*>(nullptr)) , __vwsn_precompile_14(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) , __vwsn_precompile_15(static_cast<::vl::presentation::controls::GuiTabPage*>(nullptr)) , __vwsn_precompile_16(static_cast<::vl::presentation::controls::GuiMultilineTextBox*>(nullptr)) , __vwsn_precompile_17(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) , __vwsn_precompile_18(static_cast<::vl::presentation::controls::GuiTabPage*>(nullptr)) , __vwsn_precompile_19(static_cast<::vl::presentation::controls::GuiMultilineTextBox*>(nullptr)) , __vwsn_precompile_20(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) { } /*********************************************************************** Class (::gaclib_controls::UnitTestSnapshotViewerWindow) ***********************************************************************/ ::vl::Ptr<::vl::presentation::GuiImageData> UnitTestSnapshotViewerWindow::GetImageFromType(::gaclib_controls::UnitTestSnapshotFileNodeType nodeType) { if ((! static_cast(this->imageFolder))) { (this->imageFolder = ::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(this->ResolveResource(::vl::WString::Unmanaged(L"import-res"), ::vl::WString::Unmanaged(L"GuiFakeDialogServiceUI/Images/Folder"), true).Obj()))); } if ((! static_cast(this->imageFile))) { (this->imageFile = ::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(this->ResolveResource(::vl::WString::Unmanaged(L"import-res"), ::vl::WString::Unmanaged(L"GuiFakeDialogServiceUI/Images/File"), true).Obj()))); } { auto __vwsn_switch_0 = nodeType; if ((__vwsn_switch_0 == ::gaclib_controls::UnitTestSnapshotFileNodeType::File)) { return this->imageFile; } else if ((__vwsn_switch_0 == ::gaclib_controls::UnitTestSnapshotFileNodeType::Folder)) { return this->imageFolder; } else { throw ::vl::Exception(::vl::WString::Unmanaged(L"Unknown value of UnitTestSnapshotFileNodeType")); } } } ::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerStringsStrings> UnitTestSnapshotViewerWindow::GetStrings() { return this->__vwsn_prop_Strings; } void UnitTestSnapshotViewerWindow::SetStrings(::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerStringsStrings> __vwsn_value_) { if ((this->__vwsn_prop_Strings.Obj() != __vwsn_value_.Obj())) { (this->__vwsn_prop_Strings = __vwsn_value_); ::vl::__vwsn::EventInvoke(this->StringsChanged)(); } } ::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerViewModel> UnitTestSnapshotViewerWindow::GetViewModel() { return this->__vwsn_parameter_ViewModel; } UnitTestSnapshotViewerWindow::UnitTestSnapshotViewerWindow(::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerViewModel> __vwsn_ctor_parameter_ViewModel) : ::vl::presentation::controls::GuiWindow(::vl::presentation::theme::ThemeName::Window) , imageFolder(::vl::Ptr<::vl::presentation::GuiImageData>()) , imageFile(::vl::Ptr<::vl::presentation::GuiImageData>()) , __vwsn_prop_Strings(::gaclib_controls::UnitTestSnapshotViewerStrings::Get(::vl::__vwsn::Parse<::vl::Locale>(::vl::WString::Unmanaged(L"en-US")))) , __vwsn_parameter_ViewModel(::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerViewModel>()) { (this->__vwsn_parameter_ViewModel = __vwsn_ctor_parameter_ViewModel); auto __vwsn_resource_ = ::vl::__vwsn::This(::vl::presentation::GetResourceManager())->GetResourceFromClassName(::vl::WString::Unmanaged(L"gaclib_controls::UnitTestSnapshotViewerWindow")); 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_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize(this); } UnitTestSnapshotViewerWindow::~UnitTestSnapshotViewerWindow() { this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); } } #undef GLOBAL_SYMBOL #undef GLOBAL_NAME #undef GLOBAL_OBJ #if defined( _MSC_VER) #pragma warning(pop) #elif defined(__clang__) #pragma clang diagnostic pop #elif defined(__GNUC__) #pragma GCC diagnostic pop #endif /*********************************************************************** .\SOURCE\GUIUNITTESTSNAPSHOTVIEWERRESOURCE.CPP ***********************************************************************/ namespace vl { namespace presentation { namespace user_resource { using namespace collections; using namespace stream; using namespace controls; class GuiUnitTestSnapshotViewerResourceReader { public: static const vint parserBufferLength = 480; // 830 bytes before compressing static const vint parserBufferBlock = 1024; static const vint parserBufferRemain = 480; static const vint parserBufferRows = 1; static const char* parserBuffer[1]; static void ReadToStream(vl::stream::MemoryStream& stream) { DecompressStream(parserBuffer, true, parserBufferRows, parserBufferBlock, parserBufferRemain, stream); } }; const char* GuiUnitTestSnapshotViewerResourceReader::parserBuffer[] = { "\x3E\x03\x00\x00\xD8\x01\x00\x00\x63\x00\x01\x82\x80\x00\x81\x80\x1E\x29\x65\x73\x2F\x35\x32\x3B\x31\x33\x26\x65\x74\x21\x24\x31\x32\x88\x10\x27\x61\x6D\x25\x3D\x12\x17\x21\x3B\x34\x55\x6E\x29\x34\x34\x29\x84\x3B\x29\x6E\x61\x30\x33\x38\x37\x34\x3A\x2B\x69\x65\x37\x25\x32\x3A\x10\x10\x2B\x34\xF3\x29\x2F\x3E\x34\x8D\x18\x17\x30\x22\x3E\x1C\x14\x25\x30\x39\x32\x6E\x64\x08\xA3\x31\x9B\x3B\x17\xA1\x2F\x08\x8A\x8C\x8E\x80\x8A\x88\x8A\x12\xBE\x05\x03\x82\x80\x08\xAF\x80\x5E\x81\x8C\x2F\x33\x31\x30\x37\x34\x7A\x65\x24\x33\x24\x3A\x39\x34\x37\x67\x73\x06\x1F\xA0\x03\xB9\x81\x29\x63\x6E\xB0\x34\x38\x04\xB9\xBF\x80\x49\x6E\x33\x32\x8E\x36\x84\x02\xBA\x87\x81\xA5\x98\x34\x3F\x04\xBA\xC7\x01\xC3\x2C\x21\x33\x3B\x38\x8C\x8D\x08\xE3\x2F\x32\x34\x34\xB8\x00\x01\x74\x8C\x21\xC2\x87\x21\x33\x31\x23\x48\xC3\x3C\x86\x39\x37\x32\xCE\xCF\x01\x74\x83\x12\xD2\x83\x20\x38\x38\x9E\xDB\x9F\xB3\xDF\xAD\x04\xBA\xDF\x91\xB7\xEA\xCD\x30\x3A\x39\x85\x39\x6A\x9D\x34\xAA\xE1\x86\x8C\x90\x91\x24\xA6\xA8\x8A\x9C\x96\x94\x98\x99\x34\xAE\x23\x37\xDC\xDC\xAD\xC4\xEF\x02\x97\xE5\x39\x04\xBC\xF1\xE7\x8F\x21\xA3\xA5\x83\xC3\xEB\x95\x97\x97\x31\xB3\xB2\x3D\xE3\x80\xE0\xAE\xFB\x4E\x1B\xED\x26\xB1\xC3\x30\x37\x3A\x4A\x61\x5C\x56\x80\x2E\x2E\x0F\x09\x81\x07\x86\x85\x6B\x18\x55\x09\x1E\x08\x1A\xF4\x42\x41\x04\x5D\x13\x81\x48\x42\x19\x6C\x25\x13\x18\x1D\x3B\x6E\x1D\x7F\x7F\x4A\x79\x04\x5E\x88\x01\x48\x86\x8A\x81\x17\x99\x8B\x85\x87\x2F\x14\x19\x1F\x51\x45\x73\x19\x5D\x1A\x7B\x5B\x6E\x52\x73\x29\x9A\x8C\x84\x4F\x50\x3F\x77\x1B\x5B\x0F\x91\x81\x42\x68\x5F\x44\x90\x03\x14\x0B\x4D\x45\x1A\x11\x6F\x2C\x1A\x52\x1C\x76\x5C\x51\x94\x92\x54\x65\x1E\x67\x02\x74\x58\x91\x40\x14\xC6\x5A\x64\x71\x1A\x19\x9D\x64\x5D\x6C\x5F\x5F\x73\x40\x64\x5C\x68\x92\x64\x65\x96\x59\x45\x19\x66\x9B\x64\x14\x98\x57\x2D\x34\x55\x9D\x40\x67\x26\x67\x5A\x18\x5F\x1A\x6E\x19\x5B\x4D\xB3\x1A\x0E\x0E\xE9\x51\x7C\x79\x4A\xEE\x56\x71\x7C\x4D\x57\x2F\x54\x1B\x1B\x77\x1E\x60", }; class GuiUnitTestSnapshotViewerResourceLoaderPlugin : public Object, public IGuiPlugin { public: GUI_PLUGIN_NAME(GacGen_GuiUnitTestSnapshotViewerResourceLoader) { GUI_PLUGIN_DEPEND(GacUI_Res_Resource); GUI_PLUGIN_DEPEND(GacUI_Res_TypeResolvers); #ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA GUI_PLUGIN_DEPEND(GacUI_Instance_Reflection); GUI_PLUGIN_DEPEND(GacUI_Compiler_WorkflowTypeResolvers); #endif } void Load(bool controllerUnrelatedPlugins, bool controllerRelatedPlugins)override { if (controllerRelatedPlugins) { List errors; MemoryStream resourceStream; GuiUnitTestSnapshotViewerResourceReader::ReadToStream(resourceStream); resourceStream.SeekFromBegin(0); GetResourceManager()->LoadResourceOrPending(resourceStream, GuiResourceUsage::InstanceClass); } } void Unload(bool controllerUnrelatedPlugins, bool controllerRelatedPlugins)override { } }; GUI_REGISTER_PLUGIN(GuiUnitTestSnapshotViewerResourceLoaderPlugin) } } } /*********************************************************************** .\VIEWMODEL\GUIUNITTESTSNAPSHOTVIEWERVIEWMODEL.CPP ***********************************************************************/ namespace vl::presentation::unittest { using namespace collections; using namespace filesystem; using namespace gaclib_controls; using namespace glr::json; using namespace vl::presentation::remoteprotocol; /*********************************************************************** UnitTestSnapshotFrame ***********************************************************************/ class UnitTestSnapshotFrame : public Object, public virtual IUnitTestSnapshotFrame { friend const remoteprotocol::UnitTest_RenderingFrame& GetRenderingFrame(Ptr frame); protected: vint index; UnitTest_RenderingFrame frame; WString elements; WString commands; WString dom; JsonFormatting formatting; public: UnitTestSnapshotFrame(vint _index, UnitTest_RenderingFrame _frame) : index(_index) , frame(_frame) { formatting.spaceAfterColon = true; formatting.spaceAfterComma = true; formatting.crlf = true; formatting.compact = true; } WString GetName() override { if (frame.frameName) { return frame.frameName.Value(); } else { return itow(index); } } WString GetElementsAsJsonText() override { if (elements == L"") { elements = JsonToString(ConvertCustomTypeToJson(frame.elements), formatting); } return elements; } WString GetDomAsJsonText() override { if (dom == L"") { dom = JsonToString(ConvertCustomTypeToJson(frame.root), formatting); } return dom; } }; const remoteprotocol::UnitTest_RenderingFrame& GetRenderingFrame(Ptr frame) { return frame.Cast()->frame; } /*********************************************************************** UnitTestSnapshotFileNode ***********************************************************************/ class UnitTestSnapshotFileNode : public Object, public virtual IUnitTestSnapshotFileNode { friend const remoteprotocol::UnitTest_RenderingTrace& GetRenderingTrace(Ptr node); protected: File file; Ptr renderingTrace; List> frames; void EnsureLoaded() { if (!renderingTrace) { WString jsonText = file.ReadAllTextByBom(); Ptr jsonNode; { glr::json::Parser parser; jsonNode = JsonParse(jsonText, parser); } renderingTrace = Ptr(new UnitTest_RenderingTrace); ConvertJsonToCustomType(jsonNode, *renderingTrace.Obj()); frames.Clear(); if (renderingTrace->frames) { for (auto [frame, index] : indexed(*renderingTrace->frames.Obj())) { frames.Add(Ptr(new UnitTestSnapshotFrame(index, frame))); } } } } public: UnitTestSnapshotFileNode(FilePath _filePath) : file(_filePath) { #define ERROR_MESSAGE_PREFIX L"vl::presentation::unittest::UnitTestSnapshotFileNode::UnitTestSnapshotFileNode(FilePath)#" CHECK_ERROR(file.Exists(), ERROR_MESSAGE_PREFIX L"File does not exist."); #undef ERROR_MESSAGE_PREFIX } UnitTestSnapshotFileNodeType GetNodeType() override { return UnitTestSnapshotFileNodeType::File; } WString GetName() override { auto name = file.GetFilePath().GetName(); return name.Left(name.Length() - 5); } LazyList> GetChildren() override { return {}; } LazyList> GetFrames() override { EnsureLoaded(); return From(frames).Cast(); } void Refresh() override { CHECK_FAIL(L"Not Implemented!"); } }; const remoteprotocol::UnitTest_RenderingTrace& GetRenderingTrace(Ptr node) { return *node.Cast()->renderingTrace.Obj(); } /*********************************************************************** UnitTestSnapshotFolderNode ***********************************************************************/ class UnitTestSnapshotFolderNode : public Object, public virtual IUnitTestSnapshotFileNode { protected: Folder folder; Ptr>> children; public: UnitTestSnapshotFolderNode(FilePath _filePath) : folder(_filePath) { #define ERROR_MESSAGE_PREFIX L"vl::presentation::unittest::UnitTestSnapshotFolderNode::UnitTestSnapshotFolderNode(FilePath)#" CHECK_ERROR(folder.Exists(), ERROR_MESSAGE_PREFIX L"Folder does not exist."); #undef ERROR_MESSAGE_PREFIX } UnitTestSnapshotFileNodeType GetNodeType() override { return UnitTestSnapshotFileNodeType::Folder; } WString GetName() override { return folder.GetFilePath().GetName(); } LazyList> GetChildren() override { if (!children) { children = Ptr(new List>); { List folders; folder.GetFolders(folders); for (auto name : From(folders) .Select([](auto&& folder) {return folder.GetFilePath().GetName(); }) .OrderBySelf()) { children->Add(Ptr(new UnitTestSnapshotFolderNode(folder.GetFilePath() / name))); } } { List files; folder.GetFiles(files); for (auto name : From(files) .Select([](auto&& file) {return file.GetFilePath().GetName(); }) .OrderBySelf()) { if (name.Length() > 5 && name.Right(5) == L".json") { children->Add(Ptr(new UnitTestSnapshotFileNode(folder.GetFilePath() / name))); } } } } return children; } LazyList> GetFrames() override { return {}; } void Refresh() override { CHECK_FAIL(L"Not Implemented!"); } }; /*********************************************************************** UnitTestSnapshotViewerViewModel ***********************************************************************/ UnitTestSnapshotViewerViewModel::UnitTestSnapshotViewerViewModel(FilePath snapshotFolderPath) : rootNode(Ptr(new UnitTestSnapshotFolderNode(snapshotFolderPath))) { } UnitTestSnapshotViewerViewModel::~UnitTestSnapshotViewerViewModel() { } Ptr UnitTestSnapshotViewerViewModel::GetRootNode() { return rootNode; } }