Skip to content

Commit

Permalink
Update release
Browse files Browse the repository at this point in the history
  • Loading branch information
vczh committed Jul 19, 2024
1 parent 97ba49e commit 7038b05
Show file tree
Hide file tree
Showing 27 changed files with 316 additions and 81 deletions.
83 changes: 49 additions & 34 deletions Import/GacUI.UnitTest.UI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,21 @@ Helper Functions
auto element = Ptr(GuiImageFrameElement::Create());
bounds->SetOwnedElement(element);
auto& desc = frame.elements->Get(dom->element.Value()).Get<remoteprotocol::ElementDesc_ImageFrame>();

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:
Expand Down Expand Up @@ -956,15 +971,15 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
::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)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren);
}
{
::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<double>(1.0); return __vwsn_temp__; }());
Expand Down Expand Up @@ -999,17 +1014,17 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
::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)));
::vl::__vwsn::This(this->treeViewFileNodes)->SetHorizontalAlwaysVisible(false);
}
(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)->SetVerticalAlwaysVisible(false);
}
{
::vl::__vwsn::This(this->treeViewFileNodes)->SetHorizontalAlwaysVisible(false);
::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->treeViewFileNodes)->SetVerticalAlwaysVisible(false);
::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->__vwsn_precompile_3)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this->treeViewFileNodes)->GetBoundsComposition()));
Expand All @@ -1035,17 +1050,17 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
::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)));
::vl::__vwsn::This(this->textListFrames)->SetHorizontalAlwaysVisible(false);
}
(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)->SetVerticalAlwaysVisible(false);
}
{
::vl::__vwsn::This(this->textListFrames)->SetHorizontalAlwaysVisible(false);
::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->textListFrames)->SetVerticalAlwaysVisible(false);
::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->__vwsn_precompile_8)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->textListFrames));
Expand Down Expand Up @@ -1081,16 +1096,16 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
(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);
}
(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->__vwsn_precompile_13)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->scRendering));
}
Expand All @@ -1107,16 +1122,16 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
{
(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);
}
(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_15)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->__vwsn_precompile_16));
}
Expand All @@ -1133,16 +1148,16 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
{
(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);
}
(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_18)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->__vwsn_precompile_19));
}
Expand All @@ -1159,16 +1174,16 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
{
(this->__vwsn_precompile_22 = new ::vl::presentation::controls::GuiMultilineTextBox(::vl::presentation::theme::ThemeName::MultilineTextBox));
}
(this->__vwsn_precompile_23 = ::vl::__vwsn::This(this->__vwsn_precompile_22)->GetBoundsComposition());
{
::vl::__vwsn::This(this->__vwsn_precompile_23)->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_22)->SetHorizontalAlwaysVisible(false);
}
{
::vl::__vwsn::This(this->__vwsn_precompile_22)->SetVerticalAlwaysVisible(false);
}
(this->__vwsn_precompile_23 = ::vl::__vwsn::This(this->__vwsn_precompile_22)->GetBoundsComposition());
{
::vl::__vwsn::This(this->__vwsn_precompile_23)->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_21)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->__vwsn_precompile_22));
}
Expand Down Expand Up @@ -1228,11 +1243,8 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
}

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))
: self(static_cast<::gaclib_controls::UnitTestSnapshotViewerWindow*>(nullptr))
, ViewModel(::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerViewModel>())
, __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))
Expand All @@ -1257,6 +1269,9 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
, __vwsn_precompile_21(static_cast<::vl::presentation::controls::GuiTabPage*>(nullptr))
, __vwsn_precompile_22(static_cast<::vl::presentation::controls::GuiMultilineTextBox*>(nullptr))
, __vwsn_precompile_23(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(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))
{
}

Expand Down
10 changes: 6 additions & 4 deletions Import/GacUI.UnitTest.UI.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,8 @@ namespace gaclib_controls
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<UnitTestSnapshotViewerWindowConstructor>;
#endif
protected:
::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerViewModel> ViewModel;
::gaclib_controls::UnitTestSnapshotViewerWindow* self;
::vl::presentation::controls::GuiBindableTreeView* treeViewFileNodes;
::vl::presentation::controls::GuiBindableTextList* textListFrames;
::vl::presentation::controls::GuiScrollContainer* scRendering;
::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerViewModel> ViewModel;
::vl::presentation::compositions::GuiTableComposition* __vwsn_precompile_0;
::vl::presentation::compositions::GuiColumnSplitterComposition* __vwsn_precompile_1;
::vl::presentation::compositions::GuiColumnSplitterComposition* __vwsn_precompile_2;
Expand All @@ -187,6 +184,9 @@ namespace gaclib_controls
::vl::presentation::controls::GuiTabPage* __vwsn_precompile_21;
::vl::presentation::controls::GuiMultilineTextBox* __vwsn_precompile_22;
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_23;
::vl::presentation::controls::GuiBindableTreeView* treeViewFileNodes;
::vl::presentation::controls::GuiBindableTextList* textListFrames;
::vl::presentation::controls::GuiScrollContainer* scRendering;
void __vwsn_gaclib_controls_UnitTestSnapshotViewerWindow_Initialize(::gaclib_controls::UnitTestSnapshotViewerWindow* __vwsn_this_);
public:
UnitTestSnapshotViewerWindowConstructor();
Expand Down Expand Up @@ -223,7 +223,9 @@ namespace gaclib_controls
::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerStringsStrings> GetStrings();
void SetStrings(::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerStringsStrings> __vwsn_value_);
::vl::Event<void()> StringsChanged;
private:
::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerViewModel> __vwsn_parameter_ViewModel;
public:
::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerViewModel> GetViewModel();
UnitTestSnapshotViewerWindow(::vl::Ptr<::gaclib_controls::IUnitTestSnapshotViewerViewModel> __vwsn_ctor_parameter_ViewModel);
~UnitTestSnapshotViewerWindow();
Expand Down
3 changes: 1 addition & 2 deletions Import/GacUI.UnitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,11 @@ Ptr<GuiResource> GacUIUnitTest_CompileAndLoad(const WString& xmlResource)
GuiResourceError::List errors;
{
auto resourcePath = (GetUnitTestFrameworkConfig().resourceFolder / L"Resource.xml").GetFullPath();
auto resourceFolder = GetUnitTestFrameworkConfig().resourceFolder.GetFullPath();
auto parser = GetParserManager()->GetParser<glr::xml::XmlDocument>(L"XML");
auto xml = parser->Parse({ WString::Empty,resourcePath }, xmlResource, errors);
CHECK_ERROR(xml && errors.Count() == 0, ERROR_MESSAGE_PREFIX L"Failed to parse XML resource.");

resource = GuiResource::LoadFromXml(xml, resourcePath, resourceFolder, errors);
resource = GuiResource::LoadFromXml(xml, resourcePath, GetFolderPath(resourcePath), errors);
CHECK_ERROR(resource && errors.Count() == 0, ERROR_MESSAGE_PREFIX L"Failed to load XML resource.");
}

Expand Down
Loading

0 comments on commit 7038b05

Please sign in to comment.