diff --git a/Import/GacUI.Windows.cpp b/Import/GacUI.Windows.cpp index f67c98f7..4c61592f 100644 --- a/Import/GacUI.Windows.cpp +++ b/Import/GacUI.Windows.cpp @@ -4198,86 +4198,102 @@ namespace vl using namespace collections; /*********************************************************************** -IMPLEMENT_BRUSH_ELEMENT_RENDERER +GuiDirect2DElementRendererBase ***********************************************************************/ -#define IMPLEMENT_BRUSH_ELEMENT_RENDERER(TRENDERER)\ - void TRENDERER::InitializeInternal()\ - {\ - }\ - void TRENDERER::FinalizeInternal()\ - {\ - DestroyBrush(renderTarget);\ - }\ - void TRENDERER::RenderTargetChangedInternal(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget)\ - {\ - DestroyBrush(oldRenderTarget);\ - CreateBrush(newRenderTarget);\ - }\ - TRENDERER::TRENDERER()\ - {\ - }\ - void TRENDERER::Render(Rect bounds)\ + template + void GuiDirect2DElementRendererBase::InitializeInternal() + { + } -#define IMPLEMENT_BRUSH_ELEMENT_RENDERER_SOLID_COLOR_BRUSH(TRENDERER)\ - void TRENDERER::CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget)\ - {\ - if(_renderTarget)\ - {\ - oldColor=element->GetColor();\ - brush=_renderTarget->CreateDirect2DBrush(oldColor);\ - }\ - }\ - void TRENDERER::DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget)\ - {\ - if(_renderTarget && brush)\ - {\ - _renderTarget->DestroyDirect2DBrush(oldColor);\ - brush=0;\ - }\ - }\ - void TRENDERER::OnElementStateChanged()\ - {\ - if(renderTarget)\ - {\ - Color color=element->GetColor();\ - if(oldColor!=color)\ - {\ - DestroyBrush(renderTarget);\ - CreateBrush(renderTarget);\ - }\ - }\ - }\ + template + void GuiDirect2DElementRendererBase::FinalizeInternal() + { + static_cast(this)->DestroyBrush(this->renderTarget); + } -#define IMPLEMENT_BRUSH_ELEMENT_RENDERER_LINEAR_GRADIENT_BRUSH(TRENDERER)\ - void TRENDERER::CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget)\ - {\ - if(_renderTarget)\ - {\ - oldColor=Pair(element->GetColor1(), element->GetColor2());\ - brush=_renderTarget->CreateDirect2DLinearBrush(oldColor.key, oldColor.value);\ - }\ - }\ - void TRENDERER::DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget)\ - {\ - if(_renderTarget && brush)\ - {\ - _renderTarget->DestroyDirect2DLinearBrush(oldColor.key, oldColor.value);\ - brush=0;\ - }\ - }\ - void TRENDERER::OnElementStateChanged()\ - {\ - if(renderTarget)\ - {\ - Pair color=Pair(element->GetColor1(), element->GetColor2());\ - if(oldColor!=color)\ - {\ - DestroyBrush(renderTarget);\ - CreateBrush(renderTarget);\ - }\ - }\ - }\ + template + void GuiDirect2DElementRendererBase::RenderTargetChangedInternal(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget) + { + static_cast(this)->DestroyBrush(oldRenderTarget); + static_cast(this)->CreateBrush(newRenderTarget); + } + +/*********************************************************************** +GuiSolidBrushElementRendererBase +***********************************************************************/ + + template + void GuiSolidBrushElementRendererBase::CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget) + { + if (_renderTarget) + { + oldColor = this->element->GetColor(); + brush = _renderTarget->CreateDirect2DBrush(oldColor); + } + } + + template + void GuiSolidBrushElementRendererBase::DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget) + { + if (_renderTarget && brush) + { + _renderTarget->DestroyDirect2DBrush(oldColor); + brush = 0; + } + } + + template + void GuiSolidBrushElementRendererBase::OnElementStateChanged() + { + if (this->renderTarget) + { + Color color = this->element->GetColor(); + if (oldColor != color) + { + DestroyBrush(this->renderTarget); + CreateBrush(this->renderTarget); + } + } + } + +/*********************************************************************** +GuiGradientBrushElementRendererBase +***********************************************************************/ + + template + void GuiGradientBrushElementRendererBase::CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget) + { + if (_renderTarget) + { + oldColor = Pair(this->element->GetColor1(), this->element->GetColor2()); + brush = _renderTarget->CreateDirect2DLinearBrush(oldColor.key, oldColor.value); + } + } + + template + void GuiGradientBrushElementRendererBase::DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget) + { + if (_renderTarget && brush) + { + _renderTarget->DestroyDirect2DLinearBrush(oldColor.key, oldColor.value); + brush = 0; + } + } + + template + void GuiGradientBrushElementRendererBase::OnElementStateChanged() + { + if (this->renderTarget) + { + auto color = Pair(this->element->GetColor1(), this->element->GetColor2()); + if (oldColor != color) + { + DestroyBrush(this->renderTarget); + CreateBrush(this->renderTarget); + } + } + } /*********************************************************************** GuiSolidBorderElementRenderer @@ -4339,8 +4355,11 @@ GuiSolidBorderElementRenderer GuiSolidBorderElementRenderer ***********************************************************************/ - IMPLEMENT_BRUSH_ELEMENT_RENDERER_SOLID_COLOR_BRUSH(GuiSolidBorderElementRenderer) - IMPLEMENT_BRUSH_ELEMENT_RENDERER(GuiSolidBorderElementRenderer) + GuiSolidBorderElementRenderer::GuiSolidBorderElementRenderer() + { + } + + void GuiSolidBorderElementRenderer::Render(Rect bounds) { ID2D1RenderTarget* d2dRenderTarget = renderTarget->GetDirect2DRenderTarget(); auto shape = element->GetShape(); @@ -4546,9 +4565,12 @@ Gui3DSplitterElementRenderer /*********************************************************************** GuiSolidBackgroundElementRenderer ***********************************************************************/ - - IMPLEMENT_BRUSH_ELEMENT_RENDERER_SOLID_COLOR_BRUSH(GuiSolidBackgroundElementRenderer) - IMPLEMENT_BRUSH_ELEMENT_RENDERER(GuiSolidBackgroundElementRenderer) + + GuiSolidBackgroundElementRenderer::GuiSolidBackgroundElementRenderer() + { + } + + void GuiSolidBackgroundElementRenderer::Render(Rect bounds) { ID2D1RenderTarget* d2dRenderTarget=renderTarget->GetDirect2DRenderTarget(); auto shape = element->GetShape(); @@ -4584,8 +4606,11 @@ GuiSolidBackgroundElementRenderer GuiGradientBackgroundElementRenderer ***********************************************************************/ - IMPLEMENT_BRUSH_ELEMENT_RENDERER_LINEAR_GRADIENT_BRUSH(GuiGradientBackgroundElementRenderer) - IMPLEMENT_BRUSH_ELEMENT_RENDERER(GuiGradientBackgroundElementRenderer) + GuiGradientBackgroundElementRenderer::GuiGradientBackgroundElementRenderer() + { + } + + void GuiGradientBackgroundElementRenderer::Render(Rect bounds) { D2D1_POINT_2F points[2]; switch(element->GetDirection()) @@ -5497,6 +5522,7 @@ GuiColorizedTextElementRenderer void GuiColorizedTextElementRenderer::FinalizeInternal() { + element->SetCallback(nullptr); DestroyTextBrush(renderTarget); DestroyCaretBrush(renderTarget); @@ -5678,14 +5704,14 @@ GuiDirect2DElementRenderer { IDWriteFactory* fdw=GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory(); ID2D1Factory* fd2d=GetWindowsDirect2DObjectProvider()->GetDirect2DFactory(); - renderTarget->PushClipper(bounds); + renderTarget->PushClipper(bounds, element); if(!renderTarget->IsClipperCoverWholeTarget()) { ID2D1RenderTarget* rt=renderTarget->GetDirect2DRenderTarget(); GuiDirect2DElementEventArgs arguments(element, rt, fdw, fd2d, bounds); element->Rendering.Execute(arguments); } - renderTarget->PopClipper(); + renderTarget->PopClipper(element); } } @@ -5731,10 +5757,10 @@ GuiDirect2DElement CachedResourceAllocator ***********************************************************************/ - class CachedSolidBrushAllocator - { - DEFINE_CACHED_RESOURCE_ALLOCATOR(Color, ComPtr) + typedef Pair ColorPair; + class CachedSolidBrushAllocator : public GuiCachedResourceAllocatorBase> + { IWindowsDirect2DRenderTarget* guiRenderTarget = nullptr; public: CachedSolidBrushAllocator() @@ -5756,11 +5782,8 @@ CachedResourceAllocator } }; - class CachedLinearBrushAllocator + class CachedLinearBrushAllocator : public GuiCachedResourceAllocatorBase> { - typedef Pair ColorPair; - DEFINE_CACHED_RESOURCE_ALLOCATOR(ColorPair, ComPtr) - IWindowsDirect2DRenderTarget* guiRenderTarget = nullptr; public: CachedLinearBrushAllocator() @@ -5806,11 +5829,8 @@ CachedResourceAllocator } }; - class CachedRadialBrushAllocator + class CachedRadialBrushAllocator : public GuiCachedResourceAllocatorBase> { - typedef Pair ColorPair; - DEFINE_CACHED_RESOURCE_ALLOCATOR(ColorPair, ComPtr) - IWindowsDirect2DRenderTarget* guiRenderTarget = nullptr; public: CachedRadialBrushAllocator() @@ -5856,10 +5876,8 @@ CachedResourceAllocator } }; - class CachedTextFormatAllocator + class CachedTextFormatAllocator : public GuiCachedResourceAllocatorBase> { - private: - DEFINE_CACHED_RESOURCE_ALLOCATOR(FontProperties, Ptr) public: static ComPtr CreateDirect2DFont(const FontProperties& fontProperties) @@ -5895,10 +5913,8 @@ CachedResourceAllocator } }; - class CachedCharMeasurerAllocator + class CachedCharMeasurerAllocator : public GuiCachedResourceAllocatorBase> { - DEFINE_CACHED_RESOURCE_ALLOCATOR(FontProperties, Ptr) - protected: class Direct2DCharMeasurer : public text::CharMeasurer { @@ -6116,7 +6132,7 @@ WindowsDirect2DRenderTarget return window->Convert(window->GetClientSize()); } - void AfterPushedClipper(Rect clipper, Rect validArea) override + void AfterPushedClipper(Rect clipper, Rect validArea, reflection::DescriptableObject* generator) override { d2dRenderTarget->PushAxisAlignedClip( D2D1::RectF((FLOAT)validArea.x1, (FLOAT)validArea.y1, (FLOAT)validArea.x2, (FLOAT)validArea.y2), @@ -6124,15 +6140,15 @@ WindowsDirect2DRenderTarget ); } - void AfterPushedClipperAndBecameInvalid(Rect clipper) override + void AfterPushedClipperAndBecameInvalid(Rect clipper, reflection::DescriptableObject* generator) override { } - void AfterPoppedClipperAndBecameValid(Rect validArea, bool clipperExists) override + void AfterPoppedClipperAndBecameValid(Rect validArea, bool clipperExists, reflection::DescriptableObject* generator) override { } - void AfterPoppedClipper(Rect validArea, bool clipperExists) override + void AfterPoppedClipper(Rect validArea, bool clipperExists, reflection::DescriptableObject* generator) override { d2dRenderTarget->PopAxisAlignedClip(); } @@ -9885,13 +9901,14 @@ GuiColorizedTextElementRenderer void GuiColorizedTextElementRenderer::InitializeInternal() { auto resourceManager=GetWindowsGDIResourceManager(); - element->SetCallback(this); oldCaretColor=element->GetCaretColor(); caretPen=resourceManager->CreateGdiPen(oldCaretColor); + element->SetCallback(this); } void GuiColorizedTextElementRenderer::FinalizeInternal() { + element->SetCallback(nullptr); auto resourceManager=GetWindowsGDIResourceManager(); if(font) { @@ -10048,14 +10065,14 @@ GuiGDIElementRenderer { if(renderTarget) { - renderTarget->PushClipper(bounds); + renderTarget->PushClipper(bounds, element); if(!renderTarget->IsClipperCoverWholeTarget()) { WinDC* dc=renderTarget->GetDC(); GuiGDIElementEventArgs arguments(element, dc, bounds); element->Rendering.Execute(arguments); } - renderTarget->PopClipper(); + renderTarget->PopClipper(element); } } @@ -12623,21 +12640,21 @@ WindowsGDIRenderTarget return window->Convert(window->GetClientSize()); } - void AfterPushedClipper(Rect clipper, Rect validArea) override + void AfterPushedClipper(Rect clipper, Rect validArea, reflection::DescriptableObject* generator) override { ApplyClipper(validArea, true); } - void AfterPushedClipperAndBecameInvalid(Rect clipper) override + void AfterPushedClipperAndBecameInvalid(Rect clipper, reflection::DescriptableObject* generator) override { } - void AfterPoppedClipperAndBecameValid(Rect validArea, bool clipperExists) override + void AfterPoppedClipperAndBecameValid(Rect validArea, bool clipperExists, reflection::DescriptableObject* generator) override { ApplyClipper(validArea, clipperExists); } - void AfterPoppedClipper(Rect validArea, bool clipperExists) override + void AfterPoppedClipper(Rect validArea, bool clipperExists, reflection::DescriptableObject* generator) override { ApplyClipper(validArea, clipperExists); } @@ -12657,9 +12674,8 @@ WindowsGDIRenderTarget CachedResourceAllocator ***********************************************************************/ - class CachedPenAllocator + class CachedPenAllocator : public GuiCachedResourceAllocatorBase> { - DEFINE_CACHED_RESOURCE_ALLOCATOR(Color, Ptr) public: Ptr CreateInternal(Color color) { @@ -12667,9 +12683,8 @@ CachedResourceAllocator } }; - class CachedBrushAllocator + class CachedBrushAllocator : public GuiCachedResourceAllocatorBase> { - DEFINE_CACHED_RESOURCE_ALLOCATOR(Color, Ptr) public: Ptr CreateInternal(Color color) { @@ -12677,9 +12692,8 @@ CachedResourceAllocator } }; - class CachedFontAllocator + class CachedFontAllocator : public GuiCachedResourceAllocatorBase> { - DEFINE_CACHED_RESOURCE_ALLOCATOR(FontProperties, Ptr) public: static Ptr CreateGdiFont(const FontProperties& value) { @@ -12693,10 +12707,8 @@ CachedResourceAllocator } }; - class CachedCharMeasurerAllocator + class CachedCharMeasurerAllocator : public GuiCachedResourceAllocatorBase> { - DEFINE_CACHED_RESOURCE_ALLOCATOR(FontProperties, Ptr) - protected: class GdiCharMeasurer : public text::CharMeasurer { diff --git a/Import/GacUI.Windows.h b/Import/GacUI.Windows.h index 7037ea92..ca2978b8 100644 --- a/Import/GacUI.Windows.h +++ b/Import/GacUI.Windows.h @@ -144,7 +144,8 @@ Raw API Rendering Element /// class GuiDirect2DElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiDirect2DElement, L"Direct2DElement") + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"Direct2DElement"; protected: GuiDirect2DElement(); public: @@ -255,28 +256,53 @@ namespace vl { using namespace elements; -#define DEFINE_BRUSH_ELEMENT_RENDERER(TELEMENT, TRENDERER, TBRUSH, TBRUSHPROPERTY)\ - DEFINE_GUI_GRAPHICS_RENDERER(TELEMENT, TRENDERER, IWindowsDirect2DRenderTarget)\ - protected:\ - TBRUSHPROPERTY oldColor;\ - TBRUSH* brush = nullptr;\ - void CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget);\ - void DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget);\ - void InitializeInternal();\ - void FinalizeInternal();\ - void RenderTargetChangedInternal(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget);\ - public:\ - TRENDERER();\ - void Render(Rect bounds)override;\ - void OnElementStateChanged()override;\ + typedef collections::Pair ColorPair; + + template + class GuiDirect2DElementRendererBase : public GuiElementRendererBase + { + protected: + void InitializeInternal(); + void FinalizeInternal(); + void RenderTargetChangedInternal(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget); + public: + }; + + template + class GuiSolidBrushElementRendererBase : public GuiDirect2DElementRendererBase + { + protected: + Color oldColor; + TBrush* brush = nullptr; + + void CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget); + void DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget); + public: + + void OnElementStateChanged()override; + }; + + template + class GuiGradientBrushElementRendererBase : public GuiDirect2DElementRendererBase + { + protected: + ColorPair oldColor; + TBrush* brush = nullptr; + + void CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget); + void DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget); + public: + + void OnElementStateChanged()override; + }; /*********************************************************************** Renderers ***********************************************************************/ - class GuiFocusRectangleElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiFocusRectangleElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiFocusRectangleElement, GuiFocusRectangleElementRenderer, IWindowsDirect2DRenderTarget) + friend class GuiElementRendererBase; protected: ID2D1Effect* focusRectangleEffect = nullptr; @@ -289,14 +315,19 @@ Renderers void OnElementStateChanged()override; }; - class GuiSolidBorderElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiSolidBorderElementRenderer : public GuiSolidBrushElementRendererBase { - DEFINE_BRUSH_ELEMENT_RENDERER(GuiSolidBorderElement, GuiSolidBorderElementRenderer, ID2D1SolidColorBrush, Color) + friend class GuiElementRendererBase; + friend class GuiDirect2DElementRendererBase; + public: + GuiSolidBorderElementRenderer(); + + void Render(Rect bounds)override; }; - class Gui3DBorderElementRenderer : public Object, public IGuiGraphicsRenderer + class Gui3DBorderElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(Gui3DBorderElement, Gui3DBorderElementRenderer, IWindowsDirect2DRenderTarget) + friend class GuiElementRendererBase; protected: Color oldColor1; Color oldColor2; @@ -315,9 +346,9 @@ Renderers void OnElementStateChanged()override; }; - class Gui3DSplitterElementRenderer : public Object, public IGuiGraphicsRenderer + class Gui3DSplitterElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(Gui3DSplitterElement, Gui3DSplitterElementRenderer, IWindowsDirect2DRenderTarget) + friend class GuiElementRendererBase; protected: Color oldColor1; Color oldColor2; @@ -336,21 +367,29 @@ Renderers void OnElementStateChanged()override; }; - class GuiSolidBackgroundElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiSolidBackgroundElementRenderer : public GuiSolidBrushElementRendererBase { - DEFINE_BRUSH_ELEMENT_RENDERER(GuiSolidBackgroundElement, GuiSolidBackgroundElementRenderer, ID2D1SolidColorBrush, Color) + friend class GuiElementRendererBase; + friend class GuiDirect2DElementRendererBase; + public: + GuiSolidBackgroundElementRenderer(); + + void Render(Rect bounds)override; }; - class GuiGradientBackgroundElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiGradientBackgroundElementRenderer : public GuiGradientBrushElementRendererBase { - typedef collections::Pair ColorPair; - DEFINE_BRUSH_ELEMENT_RENDERER(GuiGradientBackgroundElement, GuiGradientBackgroundElementRenderer, ID2D1LinearGradientBrush, ColorPair) + friend class GuiElementRendererBase; + friend class GuiDirect2DElementRendererBase; + public: + GuiGradientBackgroundElementRenderer(); + + void Render(Rect bounds)override; }; - class GuiInnerShadowElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiInnerShadowElementRenderer : public GuiElementRendererBase { - typedef collections::Pair ColorPair; - DEFINE_GUI_GRAPHICS_RENDERER(GuiInnerShadowElement, GuiInnerShadowElementRenderer, IWindowsDirect2DRenderTarget) + friend class GuiElementRendererBase; protected: Color oldColor; Color transparentColor; @@ -369,9 +408,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiSolidLabelElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiSolidLabelElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiSolidLabelElement, GuiSolidLabelElementRenderer, IWindowsDirect2DRenderTarget) + friend class GuiElementRendererBase; protected: Color oldColor; FontProperties oldFont; @@ -399,9 +438,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiImageFrameElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiImageFrameElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiImageFrameElement, GuiImageFrameElementRenderer, IWindowsDirect2DRenderTarget) + friend class GuiElementRendererBase; protected: ComPtr bitmap; @@ -417,9 +456,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiPolygonElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiPolygonElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiPolygonElement, GuiPolygonElementRenderer, IWindowsDirect2DRenderTarget) + friend class GuiElementRendererBase; protected: Color oldBorderColor; Color oldBackgroundColor; @@ -442,9 +481,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiColorizedTextElementRenderer : public Object, public IGuiGraphicsRenderer, protected GuiColorizedTextElement::ICallback + class GuiColorizedTextElementRenderer : public GuiElementRendererBase, protected GuiColorizedTextElement::ICallback { - DEFINE_GUI_GRAPHICS_RENDERER(GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsDirect2DRenderTarget) + friend class GuiElementRendererBase; public: struct ColorItemResource @@ -490,9 +529,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiDirect2DElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiDirect2DElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiDirect2DElement, GuiDirect2DElementRenderer, IWindowsDirect2DRenderTarget) + friend class GuiElementRendererBase; protected: @@ -1410,7 +1449,8 @@ Raw API Rendering Element /// class GuiGDIElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiGDIElement, L"GDIElement") + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"GDIElement"; protected: GuiGDIElement(); public: @@ -1503,9 +1543,9 @@ namespace vl Renderers ***********************************************************************/ - class GuiFocusRectangleElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiFocusRectangleElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiFocusRectangleElement, GuiFocusRectangleElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; protected: Ptr pen; Ptr brush; @@ -1518,9 +1558,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiSolidBorderElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiSolidBorderElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiSolidBorderElement, GuiSolidBorderElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; protected: Color oldColor; Ptr pen; @@ -1534,9 +1574,9 @@ Renderers void OnElementStateChanged()override; }; - class Gui3DBorderElementRenderer : public Object, public IGuiGraphicsRenderer + class Gui3DBorderElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(Gui3DBorderElement, Gui3DBorderElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; protected: Color oldColor1; Color oldColor2; @@ -1551,9 +1591,9 @@ Renderers void OnElementStateChanged()override; }; - class Gui3DSplitterElementRenderer : public Object, public IGuiGraphicsRenderer + class Gui3DSplitterElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(Gui3DSplitterElement, Gui3DSplitterElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; protected: Color oldColor1; Color oldColor2; @@ -1568,9 +1608,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiSolidBackgroundElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiSolidBackgroundElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiSolidBackgroundElement, GuiSolidBackgroundElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; protected: Color oldColor; Ptr pen; @@ -1584,9 +1624,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiGradientBackgroundElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiGradientBackgroundElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiGradientBackgroundElement, GuiGradientBackgroundElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; protected: void InitializeInternal(); void FinalizeInternal(); @@ -1596,9 +1636,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiInnerShadowElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiInnerShadowElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiInnerShadowElement, GuiInnerShadowElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; protected: void InitializeInternal(); void FinalizeInternal(); @@ -1610,9 +1650,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiSolidLabelElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiSolidLabelElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiSolidLabelElement, GuiSolidLabelElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; protected: FontProperties oldFont; Ptr font; @@ -1630,9 +1670,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiImageFrameElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiImageFrameElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiImageFrameElement, GuiImageFrameElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; protected: Ptr bitmap; @@ -1648,9 +1688,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiPolygonElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiPolygonElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiPolygonElement, GuiPolygonElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; protected: POINT* points; vint pointCount; @@ -1670,9 +1710,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiColorizedTextElementRenderer : public Object, public IGuiGraphicsRenderer, protected GuiColorizedTextElement::ICallback + class GuiColorizedTextElementRenderer : public GuiElementRendererBase, protected GuiColorizedTextElement::ICallback { - DEFINE_GUI_GRAPHICS_RENDERER(GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; public: struct ColorItemResource @@ -1712,9 +1752,9 @@ Renderers void OnElementStateChanged()override; }; - class GuiGDIElementRenderer : public Object, public IGuiGraphicsRenderer + class GuiGDIElementRenderer : public GuiElementRendererBase { - DEFINE_GUI_GRAPHICS_RENDERER(GuiGDIElement, GuiGDIElementRenderer, IWindowsGDIRenderTarget) + friend class GuiElementRendererBase; protected: diff --git a/Import/GacUI.cpp b/Import/GacUI.cpp index 71ac091b..7d5dfc43 100644 --- a/Import/GacUI.cpp +++ b/Import/GacUI.cpp @@ -558,6 +558,7 @@ Helpers GuiApplication* application = nullptr; bool GACUI_UNITTEST_ONLY_SKIP_THREAD_LOCAL_STORAGE_DISPOSE_STORAGES = false; + bool GACUI_UNITTEST_ONLY_SKIP_TYPE_AND_PLUGIN_LOAD_UNLOAD = false; GuiApplication* GetApplication() { @@ -608,14 +609,16 @@ GuiApplicationMain void GuiApplicationInitialize() { - GetCurrentController()->InputService()->StartTimer(); - theme::InitializeTheme(); - + if (!GACUI_UNITTEST_ONLY_SKIP_TYPE_AND_PLUGIN_LOAD_UNLOAD) + { #ifndef VCZH_DEBUG_NO_REFLECTION - GetGlobalTypeManager()->Load(); + GetGlobalTypeManager()->Load(); #endif - GetPluginManager()->Load(); + GetPluginManager()->Load(); + } + theme::InitializeTheme(); + GetCurrentController()->InputService()->StartTimer(); { GuiApplication app; application = &app; @@ -626,19 +629,23 @@ GuiApplicationMain GuiFinalizeUtilities(); IAsyncScheduler::UnregisterDefaultScheduler(); IAsyncScheduler::UnregisterSchedulerForCurrentThread(); + application = nullptr; } - application = nullptr; - - DestroyPluginManager(); + GetCurrentController()->InputService()->StopTimer(); theme::FinalizeTheme(); + FinalizeGlobalStorage(); + + if (!GACUI_UNITTEST_ONLY_SKIP_TYPE_AND_PLUGIN_LOAD_UNLOAD) + { + DestroyPluginManager(); +#ifndef VCZH_DEBUG_NO_REFLECTION + ResetGlobalTypeManager(); +#endif + } if (!GACUI_UNITTEST_ONLY_SKIP_THREAD_LOCAL_STORAGE_DISPOSE_STORAGES) { ThreadLocalStorage::DisposeStorages(); } - FinalizeGlobalStorage(); -#ifndef VCZH_DEBUG_NO_REFLECTION - ResetGlobalTypeManager(); -#endif } } } @@ -1919,7 +1926,7 @@ GuiControlHost GuiControl* GuiControlHost::GetTooltipOwner(Point location) { - GuiGraphicsComposition* composition=this->GetBoundsComposition()->FindComposition(location, true); + GuiGraphicsComposition* composition=this->GetBoundsComposition()->FindVisibleComposition(location, true); if(composition) { GuiControl* control=composition->GetRelatedControl(); @@ -2084,12 +2091,24 @@ GuiControlHost SetNativeWindow(nullptr); } + void GuiControlHost::UpdateClientSize(Size value, bool updateNativeWindowOnly) + { + if (auto window = host->GetNativeWindow()) + { + host->GetNativeWindow()->SetClientSize(window->Convert(value)); + if (!updateNativeWindowOnly) + { + host->RequestUpdateSizeFromNativeWindow(); + } + } + } + void GuiControlHost::UpdateClientSizeAfterRendering(Size preferredSize, Size clientSize) { auto size = GetClientSize(); if (size != clientSize) { - SetClientSize(clientSize); + UpdateClientSize(clientSize, true); } } @@ -2347,10 +2366,7 @@ GuiControlHost void GuiControlHost::SetClientSize(Size value) { - if (auto window = host->GetNativeWindow()) - { - host->GetNativeWindow()->SetClientSize(window->Convert(value)); - } + UpdateClientSize(value, false); } NativePoint GuiControlHost::GetLocation() @@ -3734,9 +3750,9 @@ GuiGraphicsComposition } } - if (children.Count() > 0) + if (children.Count() > 0 || associatedHitTestResult != INativeWindowListener::NoDecision) { - renderTarget->PushClipper(bounds); + renderTarget->PushClipper(bounds, this); if (!renderTarget->IsClipperCoverWholeTarget()) { for (auto child : children) @@ -3744,7 +3760,7 @@ GuiGraphicsComposition child->Render(Size(bounds.x1, bounds.y1)); } } - renderTarget->PopClipper(); + renderTarget->PopClipper(this); } isRendering = false; } @@ -3765,7 +3781,7 @@ GuiGraphicsComposition return eventReceiver; } - GuiGraphicsComposition* GuiGraphicsComposition::FindComposition(Point location, bool forMouseEvent) + GuiGraphicsComposition* GuiGraphicsComposition::FindVisibleComposition(Point location, bool forMouseEvent) { if (!visible) return 0; Rect bounds = GetCachedBounds(); @@ -3778,7 +3794,7 @@ GuiGraphicsComposition GuiGraphicsComposition* child = children[i]; Rect childBounds = child->GetCachedBounds(); Point newLocation = location - Size(childBounds.x1, childBounds.y1); - GuiGraphicsComposition* childResult = child->FindComposition(newLocation, forMouseEvent); + GuiGraphicsComposition* childResult = child->FindVisibleComposition(newLocation, forMouseEvent); if (childResult) { return childResult; @@ -3888,6 +3904,24 @@ GuiGraphicsComposition return nullptr; } + INativeWindowListener::HitTestResult GuiGraphicsComposition::GetRelatedHitTestResult() + { + GuiGraphicsComposition* composition = this; + while (composition) + { + INativeWindowListener::HitTestResult result = composition->GetAssociatedHitTestResult(); + if (result == INativeWindowListener::NoDecision) + { + composition = composition->GetParent(); + } + else + { + return result; + } + } + return INativeWindowListener::NoDecision; + } + Margin GuiGraphicsComposition::GetInternalMargin() { return internalMargin; @@ -4388,7 +4422,7 @@ GuiGraphicsHost { hostRecord.nativeWindow->RequireCapture(); auto point = hostRecord.nativeWindow->Convert(NativePoint(info.x, info.y)); - mouseCaptureComposition = windowComposition->FindComposition(point, true); + mouseCaptureComposition = windowComposition->FindVisibleComposition(point, true); } } } @@ -4532,7 +4566,7 @@ GuiGraphicsHost else { auto point = hostRecord.nativeWindow->Convert(NativePoint(info.x, info.y)); - composition = windowComposition->FindComposition(point, true); + composition = windowComposition->FindVisibleComposition(point, true); } if (release) MouseUncapture(info); @@ -4571,18 +4605,9 @@ GuiGraphicsHost NativeRect clientBounds = hostRecord.nativeWindow->GetClientBoundsInScreen(); NativePoint clientLocation(location.x + bounds.x1 - clientBounds.x1, location.y + bounds.y1 - clientBounds.y1); auto point = hostRecord.nativeWindow->Convert(clientLocation); - GuiGraphicsComposition* hitComposition = windowComposition->FindComposition(point, true); - while (hitComposition) + if (auto hitComposition = windowComposition->FindVisibleComposition(point, true)) { - INativeWindowListener::HitTestResult result = hitComposition->GetAssociatedHitTestResult(); - if (result == INativeWindowListener::NoDecision) - { - hitComposition = hitComposition->GetParent(); - } - else - { - return result; - } + return hitComposition->GetRelatedHitTestResult(); } return INativeWindowListener::NoDecision; } @@ -4632,15 +4657,7 @@ GuiGraphicsHost void GuiGraphicsHost::Moved() { - NativeSize size = hostRecord.nativeWindow->GetClientSize(); - if (previousClientSize != size) - { - previousClientSize = size; - windowComposition->Layout_UpdateMinSize(); - windowComposition->Layout_UpdateBounds(hostRecord.nativeWindow->Convert(size)); - minSize = windowComposition->GetCachedMinSize(); - needRender = true; - } + RequestUpdateSizeFromNativeWindow(); } void GuiGraphicsHost::DpiChanged(bool preparing) @@ -4733,7 +4750,7 @@ GuiGraphicsHost CompositionList newCompositions; { auto point = hostRecord.nativeWindow->Convert(NativePoint(info.x, info.y)); - GuiGraphicsComposition* composition = windowComposition->FindComposition(point, true); + GuiGraphicsComposition* composition = windowComposition->FindVisibleComposition(point, true); while (composition) { newCompositions.Insert(0, composition); @@ -5069,6 +5086,19 @@ GuiGraphicsHost needRender = true; } + void GuiGraphicsHost::RequestUpdateSizeFromNativeWindow() + { + NativeSize size = hostRecord.nativeWindow->GetClientSize(); + if (previousClientSize != size) + { + previousClientSize = size; + windowComposition->Layout_UpdateMinSize(); + windowComposition->Layout_UpdateBounds(hostRecord.nativeWindow->Convert(size)); + minSize = windowComposition->GetCachedMinSize(); + needRender = true; + } + } + void GuiGraphicsHost::InvokeAfterRendering(const Func& proc, ProcKey key) { if (key.key == nullptr) @@ -13071,11 +13101,11 @@ ListViewColumnItemArranger::ColumnItemArrangerRepeatComposition arranger->FixColumnsAfterLayout(); } - Size ListViewColumnItemArranger::ColumnItemArrangerRepeatComposition::Layout_CalculateTotalSize() + void ListViewColumnItemArranger::ColumnItemArrangerRepeatComposition::Layout_CalculateTotalSize(Size& full, Size& minimum) { - auto size = TBase::ArrangerRepeatComposition::Layout_CalculateTotalSize(); - size.x += arranger->SplitterWidth; - return size; + TBase::ArrangerRepeatComposition::Layout_CalculateTotalSize(full, minimum); + full.x += arranger->SplitterWidth; + minimum.x += arranger->SplitterWidth; } ListViewColumnItemArranger::ColumnItemArrangerRepeatComposition::ColumnItemArrangerRepeatComposition(ListViewColumnItemArranger* _arranger) @@ -17388,6 +17418,10 @@ namespace vl } templates.Add(name, theme); + if (!first) + { + first = theme.Obj(); + } if (last) { last->next = theme.Obj(); @@ -25526,9 +25560,10 @@ GalleryItemArrangerRepeatComposition itemWidth = 1; } - Size GalleryItemArrangerRepeatComposition::Layout_CalculateTotalSize() + void GalleryItemArrangerRepeatComposition::Layout_CalculateTotalSize(Size& full, Size& minimum) { - return Size(1, 1); + full = Size(1, 1); + minimum = Size(1, 1); } GalleryItemArrangerRepeatComposition::GalleryItemArrangerRepeatComposition(GuiBindableRibbonGalleryList* _owner) @@ -27992,7 +28027,7 @@ GuiVirtualRepeatCompositionBase } else if (count > visibleCount) { - vint deltaA = expectedSize - count * itemSize; + vint deltaA = expectedSize - visibleCount * itemSize; vint deltaB = itemSize - deltaA; if (deltaB < deltaA) { @@ -28015,6 +28050,14 @@ GuiVirtualRepeatCompositionBase DeleteStyleInternal(style); } + void GuiVirtualRepeatCompositionBase::UpdateFullSize() + { + Size fullSize, minimumSize; + Layout_CalculateTotalSize(fullSize, minimumSize); + realFullSize = axis->VirtualSizeToRealSize(fullSize); + realMinimumFullSize = axis->VirtualSizeToRealSize(minimumSize); + } + void GuiVirtualRepeatCompositionBase::OnViewChangedInternal(Rect oldBounds, Rect newBounds, bool forceUpdateTotalSize) { bool needToUpdateTotalSize = forceUpdateTotalSize; @@ -28091,7 +28134,7 @@ GuiVirtualRepeatCompositionBase if (needToUpdateTotalSize) { - realFullSize = axis->VirtualSizeToRealSize(Layout_CalculateTotalSize()); + UpdateFullSize(); TotalSizeChanged.Execute(GuiEventArgs(this)); AdoptedSizeInvalidated.Execute(GuiEventArgs(this)); } @@ -28132,7 +28175,7 @@ GuiVirtualRepeatCompositionBase Size GuiVirtualRepeatCompositionBase::GetTotalSize() { - return realFullSize; + return useMinimumFullSize ? realMinimumFullSize : realFullSize; } bool GuiVirtualRepeatCompositionBase::GetUseMinimumTotalSize() @@ -28145,7 +28188,7 @@ GuiVirtualRepeatCompositionBase if (useMinimumFullSize != value) { useMinimumFullSize = value; - realFullSize = axis->VirtualSizeToRealSize(Layout_CalculateTotalSize()); + UpdateFullSize(); TotalSizeChanged.Execute(GuiEventArgs(this)); } } @@ -28309,13 +28352,19 @@ GuiRepeatFreeHeightItemComposition } } - Size GuiRepeatFreeHeightItemComposition::Layout_CalculateTotalSize() + void GuiRepeatFreeHeightItemComposition::Layout_CalculateTotalSize(Size& full, Size& minimum) { - if (heights.Count() == 0) return Size(0, 0); + if (heights.Count() == 0) + { + full = minimum = Size(0, 0); + return; + } + EnsureOffsetForItem(heights.Count()); - vint w = useMinimumFullSize ? 0 : viewBounds.Width(); + vint w = viewBounds.Width(); vint h = offsets[heights.Count() - 1] + heights[heights.Count() - 1]; - return Size(w, h); + full = Size(w, h); + minimum = Size(0, h); } void GuiRepeatFreeHeightItemComposition::OnItemChanged(vint start, vint oldCount, vint newCount) @@ -28516,13 +28565,20 @@ GuiRepeatFixedHeightItemComposition rowHeight = 1; } - Size GuiRepeatFixedHeightItemComposition::Layout_CalculateTotalSize() + void GuiRepeatFixedHeightItemComposition::Layout_CalculateTotalSize(Size& full, Size& minimum) { - if (!itemSource || itemSource->GetCount() == 0) return Size(0, 0); + if (!itemSource || itemSource->GetCount() == 0) + { + full = minimum = Size(0, 0); + return; + } - vint width = itemWidth; - if (width == -1) width = useMinimumFullSize ? 0 : viewBounds.Width(); - return Size(width, rowHeight * itemSource->GetCount() + itemYOffset); + vint w = itemWidth; + vint w1 = w == -1 ? viewBounds.Width() : w; + vint w2 = w == -1 ? 0 : w; + vint h = rowHeight * itemSource->GetCount() + itemYOffset; + full = Size(w1, h); + minimum = Size(w2, h); } vint GuiRepeatFixedHeightItemComposition::FindItemByVirtualKeyDirection(vint itemIndex, compositions::KeyDirection key) @@ -28727,16 +28783,22 @@ GuiRepeatFixedSizeMultiColumnItemComposition itemSize = Size(1, 1); } - Size GuiRepeatFixedSizeMultiColumnItemComposition::Layout_CalculateTotalSize() + void GuiRepeatFixedSizeMultiColumnItemComposition::Layout_CalculateTotalSize(Size& full, Size& minimum) { - if (!itemSource || itemSource->GetCount() == 0) return Size(0, 0); + if (!itemSource || itemSource->GetCount() == 0) + { + full = minimum = Size(0, 0); + return; + } vint rowItems = viewBounds.Width() / itemSize.x; if (rowItems < 1) rowItems = 1; vint rows = itemSource->GetCount() / rowItems; if (itemSource->GetCount() % rowItems) rows++; - return Size(itemSize.x * (useMinimumFullSize ? 1 : rowItems), itemSize.y * rows); + vint h = itemSize.y * rows; + full = Size(itemSize.x * rowItems, h); + minimum = Size(itemSize.x, h); } vint GuiRepeatFixedSizeMultiColumnItemComposition::FindItemByVirtualKeyDirection(vint itemIndex, compositions::KeyDirection key) @@ -28842,7 +28904,11 @@ GuiRepeatFixedSizeMultiColumnItemComposition if (!itemSource) return expectedSize; vint count = itemSource->GetCount(); vint columnCount = viewBounds.Width() / itemSize.x; - vint rowCount = viewBounds.Height() / itemSize.y; + vint rowCount = count / columnCount; + if (count % columnCount != 0) rowCount++; + + if (columnCount == 0) columnCount = 1; + if (rowCount == 0) rowCount = 1; return Size( CalculateAdoptedSize(expectedSize.x, columnCount, itemSize.x), CalculateAdoptedSize(expectedSize.y, rowCount, itemSize.y) @@ -29011,15 +29077,22 @@ GuiRepeatFixedHeightMultiColumnItemComposition itemHeight = 1; } - Size GuiRepeatFixedHeightMultiColumnItemComposition::Layout_CalculateTotalSize() + void GuiRepeatFixedHeightMultiColumnItemComposition::Layout_CalculateTotalSize(Size& full, Size& minimum) { - if (!itemSource || itemSource->GetCount() == 0) return Size(0, 0); + if (!itemSource || itemSource->GetCount() == 0) + { + full = minimum = Size(0, 0); + return; + } vint rows = viewBounds.Height() / itemHeight; if (rows < 1) rows = 1; vint columns = (itemSource->GetCount() + rows - 1) / rows; - return Size(viewBounds.Width() * (columns + 1), (useMinimumFullSize ? 0 : rows * itemHeight)); + vint w = viewBounds.Width() * (columns + 1); + vint h = rows * itemHeight; + full = Size(w, h); + minimum = Size(w, 0); } vint GuiRepeatFixedHeightMultiColumnItemComposition::FindItemByVirtualKeyDirection(vint itemIndex, compositions::KeyDirection key) @@ -29104,7 +29177,10 @@ GuiRepeatFixedHeightMultiColumnItemComposition { if (!itemSource) return expectedSize; vint count = itemSource->GetCount(); - return Size(expectedSize.x, CalculateAdoptedSize(expectedSize.y, count, itemHeight)); + vint rowCount = viewBounds.Height() / itemHeight; + if (rowCount > count) rowCount = count; + if (rowCount == 0) rowCount = 1; + return Size(expectedSize.x, CalculateAdoptedSize(expectedSize.y, rowCount, itemHeight)); } } } @@ -32080,7 +32156,7 @@ GuiDocumentElement::GuiDocumentElementRenderer { element->callback->OnStartRender(); } - renderTarget->PushClipper(bounds); + renderTarget->PushClipper(bounds, element); if(!renderTarget->IsClipperCoverWholeTarget()) { vint maxWidth=bounds.Width(); @@ -32145,7 +32221,7 @@ GuiDocumentElement::GuiDocumentElementRenderer y+=paragraphHeight+paragraphDistance; } } - renderTarget->PopClipper(); + renderTarget->PopClipper(element); if (element->callback) { element->callback->OnFinishRender(); @@ -33591,7 +33667,7 @@ GuiGraphicsRenderTarget return RenderTargetFailure::None; } - void GuiGraphicsRenderTarget::PushClipper(Rect clipper) + void GuiGraphicsRenderTarget::PushClipper(Rect clipper, reflection::DescriptableObject* generator) { if (clipperCoverWholeTargetCounter > 0) { @@ -33610,30 +33686,30 @@ GuiGraphicsRenderTarget if (currentClipper.x1 < currentClipper.x2 && currentClipper.y1 < currentClipper.y2) { clippers.Add(currentClipper); - AfterPushedClipper(clipper, currentClipper); + AfterPushedClipper(clipper, currentClipper, generator); } else { clipperCoverWholeTargetCounter++; - AfterPushedClipperAndBecameInvalid(clipper); + AfterPushedClipperAndBecameInvalid(clipper, generator); } } } - void GuiGraphicsRenderTarget::PopClipper() + void GuiGraphicsRenderTarget::PopClipper(reflection::DescriptableObject* generator) { if (clipperCoverWholeTargetCounter > 0) { clipperCoverWholeTargetCounter--; if (clipperCoverWholeTargetCounter == 0) { - AfterPoppedClipperAndBecameValid(GetClipper(), clippers.Count() > 0); + AfterPoppedClipperAndBecameValid(GetClipper(), clippers.Count() > 0, generator); } } else if (clippers.Count() > 0) { clippers.RemoveAt(clippers.Count() - 1); - AfterPoppedClipper(GetClipper(), clippers.Count() > 0); + AfterPoppedClipper(GetClipper(), clippers.Count() > 0, generator); } } @@ -36286,6 +36362,11 @@ GuiHostedController #undef ERROR_MESSAGE_PREFIX } + void GuiHostedController::RequestRefresh() + { + wmManager->needRefresh = true; + } + /*********************************************************************** GuiHostedController::INativeController ***********************************************************************/ @@ -37799,6 +37880,10 @@ GuiRemoteController::INativeWindowService { remoteProtocol->ProcessRemoteEvents(); remoteMessages.Submit(); + if (timerEnabled) + { + callbackService.InvokeGlobalTimer(); + } } return !connectionStopped; } @@ -37817,11 +37902,13 @@ GuiRemoteController (events) remoteScreenConfig = remoteMessages.RetrieveControllerGetScreenConfig(idGetScreenConfig); remoteMessages.ClearResponses(); remoteWindow.OnControllerConnect(); + resourceManager->OnControllerConnect(); } void GuiRemoteController::OnControllerDisconnect() { remoteWindow.OnControllerDisconnect(); + resourceManager->OnControllerDisconnect(); } void GuiRemoteController::OnControllerRequestExit() @@ -37940,18 +38027,20 @@ extern void GuiApplicationMain(); int SetupRemoteNativeController(vl::presentation::IGuiRemoteProtocol* protocol) { GuiRemoteController remoteController(protocol); - GuiRemoteGraphicsResourceManager remoteResourceManager(&remoteController); - GuiHostedController hostedController(&remoteController); + + GuiRemoteGraphicsResourceManager remoteResourceManager(&remoteController, &hostedController); GuiHostedGraphicsResourceManager hostedResourceManager(&hostedController, &remoteResourceManager); SetNativeController(&hostedController); SetGuiGraphicsResourceManager(&hostedResourceManager); remoteController.Initialize(); + remoteResourceManager.Initialize(); hostedController.Initialize(); GuiApplicationMain(); hostedController.Finalize(); + remoteResourceManager.Finalize(); remoteController.Finalize(); SetGuiGraphicsResourceManager(nullptr); @@ -38229,18 +38318,141 @@ GuiRemoteEvents (events) namespace vl::presentation::elements { + using namespace collections; + using namespace compositions; /*********************************************************************** GuiRemoteGraphicsRenderTarget ***********************************************************************/ + GuiRemoteGraphicsRenderTarget::HitTestResult GuiRemoteGraphicsRenderTarget::GetHitTestResultFromGenerator(reflection::DescriptableObject* generator) + { + if (auto composition = dynamic_cast(generator)) + { + auto hitTestResult = composition->GetAssociatedHitTestResult(); + if (hitTestResult != INativeWindowListener::NoDecision) + { + if (auto graphicsHost = composition->GetRelatedGraphicsHost()) + { + if (auto nativeWindow = graphicsHost->GetNativeWindow()) + { + if (nativeWindow == GetCurrentController()->WindowService()->GetMainWindow()) + { + return hitTestResult; + } + } + } + } + } + return INativeWindowListener::NoDecision; + } + void GuiRemoteGraphicsRenderTarget::StartRenderingOnNativeWindow() { + CHECK_ERROR(hitTestResults.Count() == 0, L"vl::presentation::elements::GuiRemoteGraphicsRenderTarget::StartRenderingOnNativeWindow()#Internal error: hit test result stack is not cleared."); canvasSize = remote->remoteWindow.GetClientSize(); + clipperValidArea = GetClipper(); + renderingBatchId++; + + if (destroyedRenderers.Count() > 0) + { + auto ids = Ptr(new List); + CopyFrom(*ids.Obj(), destroyedRenderers); + destroyedRenderers.Clear(); + remote->remoteMessages.RequestRendererDestroyed(ids); + } + + if (createdRenderers.Count() > 0) + { + auto ids = Ptr(new List); + for (auto id : createdRenderers) + { + ids->Add({ id,renderers[id]->GetRendererType() }); + } + createdRenderers.Clear(); + remote->remoteMessages.RequestRendererCreated(ids); + } + + for (auto [id, renderer] : renderers) + { + if (renderer->IsUpdated()) + { + renderer->SendUpdateElementMessages(false); + if (renderer->NeedUpdateMinSizeFromCache()) + { + if (!renderersAskingForCache.Contains(renderer)) + { + renderersAskingForCache.Add(renderer); + } + } + renderer->ResetUpdated(); + } + } + + remote->remoteMessages.RequestRendererBeginRendering(); } RenderTargetFailure GuiRemoteGraphicsRenderTarget::StopRenderingOnNativeWindow() { + CHECK_ERROR(hitTestResults.Count() == 0, L"vl::presentation::elements::GuiRemoteGraphicsRenderTarget::StartRenderingOnNativeWindow()#Internal error: hit test result stack is not cleared."); + vint idRendering = remote->remoteMessages.RequestRendererEndRendering(); + remote->remoteMessages.Submit(); + auto measuring = remote->remoteMessages.RetrieveRendererEndRendering(idRendering); + remote->remoteMessages.ClearResponses(); + + bool minSizeChanged = false; + + if (measuring.fontHeights) + { + for (auto&& fontHeight : *measuring.fontHeights.Obj()) + { + auto key = Tuple(fontHeight.fontFamily, fontHeight.fontSize); + if (!fontHeights.Keys().Contains(key)) + { + fontHeights.Add(key, fontHeight.height); + } + } + + // TODO: (enumerable) foreach:indexed(alterable(reversed)) + for (vint i = renderersAskingForCache.Count() - 1; i >= 0; i--) + { + auto renderer = renderersAskingForCache[i]; + auto oldMinSize = renderer->GetRenderer()->GetMinSize(); + renderer->TryFetchMinSizeFromCache(); + if (renderer->IsRenderedInLastBatch() && oldMinSize != renderer->GetRenderer()->GetMinSize()) + { + minSizeChanged = true; + } + if (!renderer->NeedUpdateMinSizeFromCache()) + { + renderersAskingForCache.RemoveAt(i); + } + } + } + + if (measuring.minSizes) + { + for (auto&& minSize : *measuring.minSizes.Obj()) + { + vint index = renderers.Keys().IndexOf(minSize.id); + if (index != -1) + { + auto renderer = renderers.Values()[index]; + auto oldMinSize = renderer->GetRenderer()->GetMinSize(); + renderer->UpdateMinSize(minSize.minSize); + if (renderer->IsRenderedInLastBatch() && oldMinSize != renderer->GetRenderer()->GetMinSize()) + { + minSizeChanged = true; + } + } + } + } + + if (minSizeChanged) + { + hostedController->RequestRefresh(); + } + if (canvasSize == remote->remoteWindow.GetClientSize()) { return RenderTargetFailure::None; @@ -38256,24 +38468,51 @@ GuiRemoteGraphicsRenderTarget return remote->remoteWindow.Convert(canvasSize); } - void GuiRemoteGraphicsRenderTarget::AfterPushedClipper(Rect clipper, Rect validArea) + void GuiRemoteGraphicsRenderTarget::AfterPushedClipper(Rect clipper, Rect validArea, reflection::DescriptableObject* generator) { + clipperValidArea = validArea; + auto hitTestResult = GetHitTestResultFromGenerator(generator); + if (hitTestResult != INativeWindowListener::NoDecision) + { + if (hitTestResults.Count() == 0 || hitTestResults[hitTestResults.Count() - 1] != hitTestResult) + { + remoteprotocol::ElementBoundary arguments; + arguments.hitTestResult = hitTestResult; + arguments.bounds = clipper; + arguments.clipper = validArea; + remote->remoteMessages.RequestRendererBeginBoundary(arguments); + } + hitTestResults.Add(hitTestResult); + } } - void GuiRemoteGraphicsRenderTarget::AfterPushedClipperAndBecameInvalid(Rect clipper) + void GuiRemoteGraphicsRenderTarget::AfterPushedClipperAndBecameInvalid(Rect clipper, reflection::DescriptableObject* generator) { + clipperValidArea.Reset(); } - void GuiRemoteGraphicsRenderTarget::AfterPoppedClipperAndBecameValid(Rect validArea, bool clipperExists) + void GuiRemoteGraphicsRenderTarget::AfterPoppedClipperAndBecameValid(Rect validArea, bool clipperExists, reflection::DescriptableObject* generator) { + clipperValidArea = validArea; } - void GuiRemoteGraphicsRenderTarget::AfterPoppedClipper(Rect validArea, bool clipperExists) + void GuiRemoteGraphicsRenderTarget::AfterPoppedClipper(Rect validArea, bool clipperExists, reflection::DescriptableObject* generator) { + clipperValidArea = validArea; + auto hitTestResult = GetHitTestResultFromGenerator(generator); + if (hitTestResult != INativeWindowListener::NoDecision) + { + hitTestResults.RemoveAt(hitTestResults.Count() - 1); + if (hitTestResults.Count() == 0 || hitTestResults[hitTestResults.Count() - 1] != hitTestResult) + { + remote->remoteMessages.RequestRendererEndBoundary(); + } + } } - GuiRemoteGraphicsRenderTarget::GuiRemoteGraphicsRenderTarget(GuiRemoteController* _remote) + GuiRemoteGraphicsRenderTarget::GuiRemoteGraphicsRenderTarget(GuiRemoteController* _remote, GuiHostedController* _hostedController) : remote(_remote) + , hostedController(_hostedController) { } @@ -38281,21 +38520,133 @@ GuiRemoteGraphicsRenderTarget { } + void GuiRemoteGraphicsRenderTarget::OnControllerConnect() + { + fontHeights.Clear(); + renderersAskingForCache.Clear(); + + if (renderers.Count() > 0) + { + { + auto ids = Ptr(new List); + for (auto renderer : renderers.Values()) + { + ids->Add({ renderer->GetID(),renderer->GetRendererType() }); + renderer->NotifyMinSizeCacheInvalidated(); + } + createdRenderers.Clear(); + remote->remoteMessages.RequestRendererCreated(ids); + } + + for (auto renderer : renderers.Values()) + { + renderer->SendUpdateElementMessages(true); + if (renderer->NeedUpdateMinSizeFromCache()) + { + renderersAskingForCache.Add(renderer); + } + renderer->ResetUpdated(); + } + } + } + + void GuiRemoteGraphicsRenderTarget::OnControllerDisconnect() + { + } + + GuiRemoteMessages& GuiRemoteGraphicsRenderTarget::GetRemoteMessages() + { + return remote->remoteMessages; + } + + vint GuiRemoteGraphicsRenderTarget::AllocateNewElementId() + { + return ++usedElementIds; + } + + void GuiRemoteGraphicsRenderTarget::RegisterRenderer(elements_remoteprotocol::IGuiRemoteProtocolElementRender* renderer) + { + vint id = renderer->GetID(); + if (!createdRenderers.Contains(id)) + { + renderers.Add(id, renderer); + createdRenderers.Add(id); + } + } + + void GuiRemoteGraphicsRenderTarget::UnregisterRenderer(elements_remoteprotocol::IGuiRemoteProtocolElementRender* renderer) + { + vint id = renderer->GetID(); + renderers.Remove(id); + renderersAskingForCache.Remove(renderer); + { + vint index = createdRenderers.IndexOf(id); + if (index == -1) + { + if (!destroyedRenderers.Contains(id)) + { + destroyedRenderers.Add(id); + } + } + else + { + createdRenderers.RemoveAt(index); + } + } + } + + Rect GuiRemoteGraphicsRenderTarget::GetClipperValidArea() + { + return clipperValidArea.Value(); + } + /*********************************************************************** GuiRemoteGraphicsResourceManager ***********************************************************************/ - GuiRemoteGraphicsResourceManager::GuiRemoteGraphicsResourceManager(GuiRemoteController* _remote) + GuiRemoteGraphicsResourceManager::GuiRemoteGraphicsResourceManager(GuiRemoteController* _remote, GuiHostedController* _hostedController) : remote(_remote) - , renderTarget(_remote) + , renderTarget(_remote, _hostedController) + , hostedController(_hostedController) { - // TODO: register element renderers; + remote->resourceManager = this; } GuiRemoteGraphicsResourceManager::~GuiRemoteGraphicsResourceManager() { } + void GuiRemoteGraphicsResourceManager::Initialize() + { + elements_remoteprotocol::GuiFocusRectangleElementRenderer::Register(); + elements_remoteprotocol::GuiSolidBorderElementRenderer::Register(); + elements_remoteprotocol::Gui3DBorderElementRenderer::Register(); + elements_remoteprotocol::Gui3DSplitterElementRenderer::Register(); + elements_remoteprotocol::GuiSolidBackgroundElementRenderer::Register(); + elements_remoteprotocol::GuiGradientBackgroundElementRenderer::Register(); + elements_remoteprotocol::GuiInnerShadowElementRenderer::Register(); + elements_remoteprotocol::GuiSolidLabelElementRenderer::Register(); + elements_remoteprotocol::GuiImageFrameElementRenderer::Register(); + elements_remoteprotocol::GuiPolygonElementRenderer::Register(); + elements_remoteprotocol::GuiColorizedTextElementRenderer::Register(); + elements::GuiDocumentElement::GuiDocumentElementRenderer::Register(); + } + + void GuiRemoteGraphicsResourceManager::Finalize() + { + } + + void GuiRemoteGraphicsResourceManager::OnControllerConnect() + { + renderTarget.OnControllerConnect(); + hostedController->RequestRefresh(); + } + + void GuiRemoteGraphicsResourceManager::OnControllerDisconnect() + { + renderTarget.OnControllerDisconnect(); + } + IGuiGraphicsRenderTarget* GuiRemoteGraphicsResourceManager::GetRenderTarget(INativeWindow* window) { CHECK_ERROR(window == &remote->remoteWindow, L"vl::presentation::elements::GuiRemoteGraphicsResourceManager::GetRenderTarget(INativeWindow*)#GuiHostedController should call this function with the native window."); @@ -38316,6 +38667,494 @@ GuiRemoteGraphicsResourceManager } } +/*********************************************************************** +.\PLATFORMPROVIDERS\REMOTE\GUIREMOTEGRAPHICS_BASICELEMENTS.CPP +***********************************************************************/ + +namespace vl::presentation::elements_remoteprotocol +{ + using namespace collections; + using namespace remoteprotocol; + +/*********************************************************************** +GuiSolidBorderElementRenderer +***********************************************************************/ + +#define RENDERER_TEMPLATE_HEADER template +#define RENDERER_CLASS_TYPE GuiRemoteProtocolElementRenderer + + RENDERER_TEMPLATE_HEADER + void RENDERER_CLASS_TYPE::InitializeInternal() + { + } + + RENDERER_TEMPLATE_HEADER + void RENDERER_CLASS_TYPE::FinalizeInternal() + { + if (this->renderTarget && id != -1) + { + this->renderTarget->UnregisterRenderer(this); + id = -1; + } + } + + RENDERER_TEMPLATE_HEADER + void RENDERER_CLASS_TYPE::RenderTargetChangedInternal(GuiRemoteGraphicsRenderTarget* oldRenderTarget, GuiRemoteGraphicsRenderTarget* newRenderTarget) + { + if (oldRenderTarget == newRenderTarget) return; + if (oldRenderTarget && id != -1) + { + oldRenderTarget->UnregisterRenderer(this); + id = -1; + } + if (newRenderTarget) + { + id = newRenderTarget->AllocateNewElementId(); + newRenderTarget->RegisterRenderer(this); + } + } + + RENDERER_TEMPLATE_HEADER + IGuiGraphicsRenderer* RENDERER_CLASS_TYPE::GetRenderer() + { + return this; + } + + RENDERER_TEMPLATE_HEADER + vint RENDERER_CLASS_TYPE::GetID() + { + return id; + } + + RENDERER_TEMPLATE_HEADER + remoteprotocol::RendererType RENDERER_CLASS_TYPE::GetRendererType() + { + return _RendererType; + } + + RENDERER_TEMPLATE_HEADER + bool RENDERER_CLASS_TYPE::IsUpdated() + { + return updated; + } + + RENDERER_TEMPLATE_HEADER + void RENDERER_CLASS_TYPE::ResetUpdated() + { + updated = false; + } + + RENDERER_TEMPLATE_HEADER + bool RENDERER_CLASS_TYPE::IsRenderedInLastBatch() + { + return this->renderTarget && this->renderTarget->renderingBatchId == renderingBatchId; + } + + RENDERER_TEMPLATE_HEADER + bool RENDERER_CLASS_TYPE::NeedUpdateMinSizeFromCache() + { + return false; + } + + RENDERER_TEMPLATE_HEADER + void RENDERER_CLASS_TYPE::TryFetchMinSizeFromCache() + { + CHECK_FAIL(L"vl::presentation::elements_remoteprotocol::GuiRemoteProtocolElementRenderer::TryUpdateFromCache()#This function should not be called."); + } + + RENDERER_TEMPLATE_HEADER + void RENDERER_CLASS_TYPE::UpdateMinSize(Size size) + { + CHECK_FAIL(L"vl::presentation::elements_remoteprotocol::GuiRemoteProtocolElementRenderer::UpdateMinSize(Size)#This function should not be called."); + } + + RENDERER_TEMPLATE_HEADER + void RENDERER_CLASS_TYPE::NotifyMinSizeCacheInvalidated() + { + } + + RENDERER_TEMPLATE_HEADER + void RENDERER_CLASS_TYPE::Render(Rect bounds) + { + remoteprotocol::ElementRendering arguments; + arguments.id = id; + arguments.bounds = bounds; + arguments.clipper = this->renderTarget->GetClipperValidArea(); + this->renderTarget->GetRemoteMessages().RequestRendererRenderElement(arguments); + renderingBatchId = this->renderTarget->renderingBatchId; + } + + RENDERER_TEMPLATE_HEADER + void RENDERER_CLASS_TYPE::OnElementStateChanged() + { + updated = true; + } + + +#undef RENDERER_CLASS_TYPE +#undef RENDERER_TEMPLATE_HEADER + +/*********************************************************************** +GuiSolidBorderElementRenderer +***********************************************************************/ + + GuiFocusRectangleElementRenderer::GuiFocusRectangleElementRenderer() + { + } + + bool GuiFocusRectangleElementRenderer::IsUpdated() + { + // there is no properties for this element + return false; + } + + void GuiFocusRectangleElementRenderer::ResetUpdated() + { + // nothing to update + } + + void GuiFocusRectangleElementRenderer::OnElementStateChanged() + { + // nothing to update + } + + void GuiFocusRectangleElementRenderer::SendUpdateElementMessages(bool fullContent) + { + // nothing to update + } + +/*********************************************************************** +GuiSolidBorderElementRenderer +***********************************************************************/ + + GuiSolidBorderElementRenderer::GuiSolidBorderElementRenderer() + { + } + + void GuiSolidBorderElementRenderer::SendUpdateElementMessages(bool fullContent) + { + ElementDesc_SolidBorder arguments; + arguments.id = id; + arguments.borderColor = element->GetColor(); + arguments.shape = element->GetShape(); + renderTarget->GetRemoteMessages().RequestRendererUpdateElement_SolidBorder(arguments); + } + +/*********************************************************************** +Gui3DBorderElementRenderer +***********************************************************************/ + + Gui3DBorderElementRenderer::Gui3DBorderElementRenderer() + { + } + + void Gui3DBorderElementRenderer::SendUpdateElementMessages(bool fullContent) + { + ElementDesc_SinkBorder arguments; + arguments.id = id; + arguments.leftTopColor = element->GetColor1(); + arguments.rightBottomColor = element->GetColor2(); + renderTarget->GetRemoteMessages().RequestRendererUpdateElement_SinkBorder(arguments); + } + +/*********************************************************************** +Gui3DSplitterElementRenderer +***********************************************************************/ + + Gui3DSplitterElementRenderer::Gui3DSplitterElementRenderer() + { + } + + void Gui3DSplitterElementRenderer::SendUpdateElementMessages(bool fullContent) + { + ElementDesc_SinkSplitter arguments; + arguments.id = id; + arguments.leftTopColor = element->GetColor1(); + arguments.rightBottomColor = element->GetColor2(); + arguments.direction = element->GetDirection(); + renderTarget->GetRemoteMessages().RequestRendererUpdateElement_SinkSplitter(arguments); + } + +/*********************************************************************** +GuiSolidBackgroundElementRenderer +***********************************************************************/ + + GuiSolidBackgroundElementRenderer::GuiSolidBackgroundElementRenderer() + { + } + + void GuiSolidBackgroundElementRenderer::SendUpdateElementMessages(bool fullContent) + { + ElementDesc_SolidBackground arguments; + arguments.id = id; + arguments.backgroundColor = element->GetColor(); + arguments.shape = element->GetShape(); + renderTarget->GetRemoteMessages().RequestRendererUpdateElement_SolidBackground(arguments); + } + +/*********************************************************************** +GuiGradientBackgroundElementRenderer +***********************************************************************/ + + GuiGradientBackgroundElementRenderer::GuiGradientBackgroundElementRenderer() + { + } + + void GuiGradientBackgroundElementRenderer::SendUpdateElementMessages(bool fullContent) + { + ElementDesc_GradientBackground arguments; + arguments.id = id; + arguments.leftTopColor = element->GetColor1(); + arguments.rightBottomColor = element->GetColor2(); + arguments.direction = element->GetDirection(); + arguments.shape = element->GetShape(); + renderTarget->GetRemoteMessages().RequestRendererUpdateElement_GradientBackground(arguments); + } + +/*********************************************************************** +GuiInnerShadowElementRenderer +***********************************************************************/ + + GuiInnerShadowElementRenderer::GuiInnerShadowElementRenderer() + { + } + + void GuiInnerShadowElementRenderer::SendUpdateElementMessages(bool fullContent) + { + ElementDesc_InnerShadow arguments; + arguments.id = id; + arguments.shadowColor = element->GetColor(); + arguments.thickness = element->GetThickness(); + renderTarget->GetRemoteMessages().RequestRendererUpdateElement_InnerShadow(arguments); + } + +/*********************************************************************** +GuiSolidLabelElementRenderer +***********************************************************************/ + + GuiSolidLabelElementRenderer::MeasuringRequest GuiSolidLabelElementRenderer::GetMeasuringRequest() + { + if (element->GetWrapLine()) + { + if (element->GetWrapLineHeightCalculation()) + { + return ElementSolidLabelMeasuringRequest::TotalSize; + } + else + { + return {}; + } + } + else + { + if (element->GetEllipse()) + { + return ElementSolidLabelMeasuringRequest::FontHeight; + } + else + { + return ElementSolidLabelMeasuringRequest::TotalSize; + } + } + } + + bool GuiSolidLabelElementRenderer::IsNeedFontHeight(MeasuringRequest request) + { + return request && request.Value() == ElementSolidLabelMeasuringRequest::FontHeight; + } + + GuiSolidLabelElementRenderer::GuiSolidLabelElementRenderer() + { + } + + bool GuiSolidLabelElementRenderer::NeedUpdateMinSizeFromCache() + { + return needFontHeight; + } + + void GuiSolidLabelElementRenderer::TryFetchMinSizeFromCache() + { + if (needFontHeight) + { + vint index = renderTarget->fontHeights.Keys().IndexOf({ lastFont.fontFamily,lastFont.size }); + if (index != -1) + { + needFontHeight = false; + minSize = { 0,renderTarget->fontHeights.Values()[index] }; + } + } + } + + void GuiSolidLabelElementRenderer::UpdateMinSize(Size size) + { + minSize = size; + } + + void GuiSolidLabelElementRenderer::NotifyMinSizeCacheInvalidated() + { + OnElementStateChanged(); + auto request = GetMeasuringRequest(); + needFontHeight = IsNeedFontHeight(request); + } + + void GuiSolidLabelElementRenderer::SendUpdateElementMessages(bool fullContent) + { + ElementDesc_SolidLabel arguments; + arguments.id = id; + arguments.textColor = element->GetColor(); + arguments.wrapLine = element->GetWrapLine(); + arguments.wrapLineHeightCalculation = element->GetWrapLineHeightCalculation(); + arguments.ellipse = element->GetEllipse(); + arguments.multiline = element->GetMultiline(); + + switch (element->GetHorizontalAlignment()) + { + case Alignment::Left: + arguments.horizontalAlignment = ElementHorizontalAlignment::Left; + break; + case Alignment::Right: + arguments.horizontalAlignment = ElementHorizontalAlignment::Right; + break; + default: + arguments.horizontalAlignment = ElementHorizontalAlignment::Center; + } + + switch (element->GetVerticalAlignment()) + { + case Alignment::Top: + arguments.verticalAlignment = ElementVerticalAlignment::Top; + break; + case Alignment::Bottom: + arguments.verticalAlignment = ElementVerticalAlignment::Bottom; + break; + default: + arguments.verticalAlignment = ElementVerticalAlignment::Center; + } + + auto elementFont = element->GetFont(); + auto elementText = element->GetText(); + if (elementFont.fontFamily == WString::Empty) + { + elementFont = GetCurrentController()->ResourceService()->GetDefaultFont(); + } + + if (fullContent || lastFont != elementFont) + { + arguments.font = elementFont; + } + + if (fullContent || lastText != elementText) + { + arguments.text = elementText; + } + + lastFont = elementFont; + lastText = elementText; + arguments.measuringRequest = GetMeasuringRequest(); + if ((needFontHeight = IsNeedFontHeight(arguments.measuringRequest))) + { + TryFetchMinSizeFromCache(); + if (!needFontHeight) + { + arguments.measuringRequest = {}; + } + } + + renderTarget->GetRemoteMessages().RequestRendererUpdateElement_SolidLabel(arguments); + } + +/*********************************************************************** +GuiImageFrameElementRenderer +***********************************************************************/ + + GuiImageFrameElementRenderer::GuiImageFrameElementRenderer() + { + } + + void GuiImageFrameElementRenderer::SendUpdateElementMessages(bool fullContent) + { + // Image + // FrameIndex + // HorizontalAlignment + // VerticalAlignment + // Stretch + // Enabled + // UpdateMinSize(Stretch ? {0,0} : frame->GetSize()) + CHECK_FAIL(L"Not Implemented!"); + } + +/*********************************************************************** +GuiPolygonElementRenderer +***********************************************************************/ + + GuiPolygonElementRenderer::GuiPolygonElementRenderer() + { + } + + void GuiPolygonElementRenderer::SendUpdateElementMessages(bool fullContent) + { + minSize = element->GetSize(); + + ElementDesc_Polygon arguments; + arguments.id = id; + arguments.size = element->GetSize(); + arguments.borderColor = element->GetBorderColor(); + arguments.backgroundColor = element->GetBackgroundColor(); + arguments.points = Ptr(new List); + CopyFrom(*arguments.points.Obj(), element->GetPointsArray()); + renderTarget->GetRemoteMessages().RequestRendererUpdateElement_Polygon(arguments); + } + +/*********************************************************************** +GuiColorizedTextElementRenderer +***********************************************************************/ + + void GuiColorizedTextElementRenderer::ColorChanged() + { + } + + void GuiColorizedTextElementRenderer::FontChanged() + { + } + + void GuiColorizedTextElementRenderer::InitializeInternal() + { + TBase::InitializeInternal(); + element->SetCallback(this); + } + + void GuiColorizedTextElementRenderer::FinalizeInternal() + { + element->SetCallback(nullptr); + TBase::FinalizeInternal(); + } + + GuiColorizedTextElementRenderer::GuiColorizedTextElementRenderer() + { + } + + void GuiColorizedTextElementRenderer::OnElementStateChanged() + { + TBase::OnElementStateChanged(); + } + + void GuiColorizedTextElementRenderer::SendUpdateElementMessages(bool fullContent) + { + // Lines + // Colors + // Font + // PasswordChar + // ViewPosition + // VisuallyEnabled + // Focused + // CaretBegin + // CaretEnd + // CaretVisible + // CaretColor + CHECK_FAIL(L"Not Implemented!"); + } +} + /*********************************************************************** .\PLATFORMPROVIDERS\REMOTE\GUIREMOTEPROTOCOLSCHEMASHARED.CPP ***********************************************************************/ @@ -38367,6 +39206,11 @@ namespace vl::presentation::remoteprotocol return ConvertCustomTypeToJson((vint)value); } + template<> Ptr ConvertCustomTypeToJson(const Color& value) + { + return ConvertCustomTypeToJson(value.ToString()); + } + template<> void ConvertJsonToCustomType(Ptr node, bool& value) { #define ERROR_MESSAGE_PREFIX L"presentation::remoteprotocol::ConvertJsonToCustomType(Ptr, bool&)#" @@ -38433,6 +39277,13 @@ namespace vl::presentation::remoteprotocol ConvertJsonToCustomType(node, intValue); value = (VKEY)intValue; } + + template<> void ConvertJsonToCustomType(Ptr node, Color& value) + { + WString strValue; + ConvertJsonToCustomType(node, strValue); + value = Color::Parse(strValue); + } } @@ -39035,7 +39886,6 @@ GuiRemoteWindow (INativeWindow) void GuiRemoteWindow::RedrawContent() { - CHECK_FAIL(L"Not Implemented!"); } #undef SET_REMOTE_WINDOW_STYLE_INVALIDATE @@ -39053,15 +39903,67 @@ Licensed under https ://github.com/vczh-libraries/License namespace vl::presentation::remoteprotocol { - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::IOMouseButton & value) + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::IOMouseButton>(const ::vl::presentation::remoteprotocol::IOMouseButton & value) { -#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::IOMouseButton&)#" +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::IOMouseButton>(const ::vl::presentation::remoteprotocol::IOMouseButton&)#" auto node = Ptr(new glr::json::JsonString); switch (value) { - case vl::presentation::remoteprotocol::IOMouseButton::Left: node->content.value = L"Left"; break; - case vl::presentation::remoteprotocol::IOMouseButton::Middle: node->content.value = L"Middle"; break; - case vl::presentation::remoteprotocol::IOMouseButton::Right: node->content.value = L"Right"; break; + case ::vl::presentation::remoteprotocol::IOMouseButton::Left: node->content.value = WString::Unmanaged(L"Left"); break; + case ::vl::presentation::remoteprotocol::IOMouseButton::Middle: node->content.value = WString::Unmanaged(L"Middle"); break; + case ::vl::presentation::remoteprotocol::IOMouseButton::Right: node->content.value = WString::Unmanaged(L"Right"); break; + default: CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); + } + return node; +#undef ERROR_MESSAGE_PREFIX + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::INativeWindowListener::HitTestResult>(const ::vl::presentation::INativeWindowListener::HitTestResult & value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertCustomTypeToJson<::vl::presentation::INativeWindowListener::HitTestResult>(const ::vl::presentation::INativeWindowListener::HitTestResult&)#" + auto node = Ptr(new glr::json::JsonString); + switch (value) + { + case ::vl::presentation::INativeWindowListener::BorderNoSizing: node->content.value = WString::Unmanaged(L"BorderNoSizing"); break; + case ::vl::presentation::INativeWindowListener::BorderLeft: node->content.value = WString::Unmanaged(L"BorderLeft"); break; + case ::vl::presentation::INativeWindowListener::BorderRight: node->content.value = WString::Unmanaged(L"BorderRight"); break; + case ::vl::presentation::INativeWindowListener::BorderTop: node->content.value = WString::Unmanaged(L"BorderTop"); break; + case ::vl::presentation::INativeWindowListener::BorderBottom: node->content.value = WString::Unmanaged(L"BorderBottom"); break; + case ::vl::presentation::INativeWindowListener::BorderLeftTop: node->content.value = WString::Unmanaged(L"BorderLeftTop"); break; + case ::vl::presentation::INativeWindowListener::BorderRightTop: node->content.value = WString::Unmanaged(L"BorderRightTop"); break; + case ::vl::presentation::INativeWindowListener::BorderLeftBottom: node->content.value = WString::Unmanaged(L"BorderLeftBottom"); break; + case ::vl::presentation::INativeWindowListener::BorderRightBottom: node->content.value = WString::Unmanaged(L"BorderRightBottom"); break; + case ::vl::presentation::INativeWindowListener::Title: node->content.value = WString::Unmanaged(L"Title"); break; + case ::vl::presentation::INativeWindowListener::ButtonMinimum: node->content.value = WString::Unmanaged(L"ButtonMinimum"); break; + case ::vl::presentation::INativeWindowListener::ButtonMaximum: node->content.value = WString::Unmanaged(L"ButtonMaximum"); break; + case ::vl::presentation::INativeWindowListener::ButtonClose: node->content.value = WString::Unmanaged(L"ButtonClose"); break; + case ::vl::presentation::INativeWindowListener::Client: node->content.value = WString::Unmanaged(L"Client"); break; + case ::vl::presentation::INativeWindowListener::Icon: node->content.value = WString::Unmanaged(L"Icon"); break; + case ::vl::presentation::INativeWindowListener::NoDecision: node->content.value = WString::Unmanaged(L"NoDecision"); break; + default: CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); + } + return node; +#undef ERROR_MESSAGE_PREFIX + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::INativeCursor::SystemCursorType>(const ::vl::presentation::INativeCursor::SystemCursorType & value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertCustomTypeToJson<::vl::presentation::INativeCursor::SystemCursorType>(const ::vl::presentation::INativeCursor::SystemCursorType&)#" + auto node = Ptr(new glr::json::JsonString); + switch (value) + { + case ::vl::presentation::INativeCursor::SmallWaiting: node->content.value = WString::Unmanaged(L"SmallWaiting"); break; + case ::vl::presentation::INativeCursor::LargeWaiting: node->content.value = WString::Unmanaged(L"LargeWaiting"); break; + case ::vl::presentation::INativeCursor::Arrow: node->content.value = WString::Unmanaged(L"Arrow"); break; + case ::vl::presentation::INativeCursor::Cross: node->content.value = WString::Unmanaged(L"Cross"); break; + case ::vl::presentation::INativeCursor::Hand: node->content.value = WString::Unmanaged(L"Hand"); break; + case ::vl::presentation::INativeCursor::Help: node->content.value = WString::Unmanaged(L"Help"); break; + case ::vl::presentation::INativeCursor::IBeam: node->content.value = WString::Unmanaged(L"IBeam"); break; + case ::vl::presentation::INativeCursor::SizeAll: node->content.value = WString::Unmanaged(L"SizeAll"); break; + case ::vl::presentation::INativeCursor::SizeNESW: node->content.value = WString::Unmanaged(L"SizeNESW"); break; + case ::vl::presentation::INativeCursor::SizeNS: node->content.value = WString::Unmanaged(L"SizeNS"); break; + case ::vl::presentation::INativeCursor::SizeNWSE: node->content.value = WString::Unmanaged(L"SizeNWSE"); break; + case ::vl::presentation::INativeCursor::SizeWE: node->content.value = WString::Unmanaged(L"SizeWE"); break; default: CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); } return node; @@ -39074,9 +39976,122 @@ namespace vl::presentation::remoteprotocol auto node = Ptr(new glr::json::JsonString); switch (value) { - case ::vl::presentation::INativeWindow::WindowSizeState::Minimized: node->content.value = L"Minimized"; break; - case ::vl::presentation::INativeWindow::WindowSizeState::Restored: node->content.value = L"Restored"; break; - case ::vl::presentation::INativeWindow::WindowSizeState::Maximized: node->content.value = L"Maximized"; break; + case ::vl::presentation::INativeWindow::WindowSizeState::Minimized: node->content.value = WString::Unmanaged(L"Minimized"); break; + case ::vl::presentation::INativeWindow::WindowSizeState::Restored: node->content.value = WString::Unmanaged(L"Restored"); break; + case ::vl::presentation::INativeWindow::WindowSizeState::Maximized: node->content.value = WString::Unmanaged(L"Maximized"); break; + default: CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); + } + return node; +#undef ERROR_MESSAGE_PREFIX + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::RendererType>(const ::vl::presentation::remoteprotocol::RendererType & value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::RendererType>(const ::vl::presentation::remoteprotocol::RendererType&)#" + auto node = Ptr(new glr::json::JsonString); + switch (value) + { + case ::vl::presentation::remoteprotocol::RendererType::FocusRectangle: node->content.value = WString::Unmanaged(L"FocusRectangle"); break; + case ::vl::presentation::remoteprotocol::RendererType::SolidBorder: node->content.value = WString::Unmanaged(L"SolidBorder"); break; + case ::vl::presentation::remoteprotocol::RendererType::SinkBorder: node->content.value = WString::Unmanaged(L"SinkBorder"); break; + case ::vl::presentation::remoteprotocol::RendererType::SinkSplitter: node->content.value = WString::Unmanaged(L"SinkSplitter"); break; + case ::vl::presentation::remoteprotocol::RendererType::SolidBackground: node->content.value = WString::Unmanaged(L"SolidBackground"); break; + case ::vl::presentation::remoteprotocol::RendererType::GradientBackground: node->content.value = WString::Unmanaged(L"GradientBackground"); break; + case ::vl::presentation::remoteprotocol::RendererType::InnerShadow: node->content.value = WString::Unmanaged(L"InnerShadow"); break; + case ::vl::presentation::remoteprotocol::RendererType::SolidLabel: node->content.value = WString::Unmanaged(L"SolidLabel"); break; + case ::vl::presentation::remoteprotocol::RendererType::Polygon: node->content.value = WString::Unmanaged(L"Polygon"); break; + case ::vl::presentation::remoteprotocol::RendererType::UnsupportedImageFrame: node->content.value = WString::Unmanaged(L"UnsupportedImageFrame"); break; + case ::vl::presentation::remoteprotocol::RendererType::UnsupportedColorizedText: node->content.value = WString::Unmanaged(L"UnsupportedColorizedText"); break; + case ::vl::presentation::remoteprotocol::RendererType::UnsupportedDocument: node->content.value = WString::Unmanaged(L"UnsupportedDocument"); break; + default: CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); + } + return node; +#undef ERROR_MESSAGE_PREFIX + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::elements::ElementShapeType>(const ::vl::presentation::elements::ElementShapeType & value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertCustomTypeToJson<::vl::presentation::elements::ElementShapeType>(const ::vl::presentation::elements::ElementShapeType&)#" + auto node = Ptr(new glr::json::JsonString); + switch (value) + { + case ::vl::presentation::elements::ElementShapeType::Rectangle: node->content.value = WString::Unmanaged(L"Rectangle"); break; + case ::vl::presentation::elements::ElementShapeType::Ellipse: node->content.value = WString::Unmanaged(L"Ellipse"); break; + case ::vl::presentation::elements::ElementShapeType::RoundRect: node->content.value = WString::Unmanaged(L"RoundRect"); break; + default: CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); + } + return node; +#undef ERROR_MESSAGE_PREFIX + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::elements::GuiGradientBackgroundElement::Direction>(const ::vl::presentation::elements::GuiGradientBackgroundElement::Direction & value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertCustomTypeToJson<::vl::presentation::elements::GuiGradientBackgroundElement::Direction>(const ::vl::presentation::elements::GuiGradientBackgroundElement::Direction&)#" + auto node = Ptr(new glr::json::JsonString); + switch (value) + { + case ::vl::presentation::elements::GuiGradientBackgroundElement::Horizontal: node->content.value = WString::Unmanaged(L"Horizontal"); break; + case ::vl::presentation::elements::GuiGradientBackgroundElement::Vertical: node->content.value = WString::Unmanaged(L"Vertical"); break; + case ::vl::presentation::elements::GuiGradientBackgroundElement::Slash: node->content.value = WString::Unmanaged(L"Slash"); break; + case ::vl::presentation::elements::GuiGradientBackgroundElement::Backslash: node->content.value = WString::Unmanaged(L"Backslash"); break; + default: CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); + } + return node; +#undef ERROR_MESSAGE_PREFIX + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::elements::Gui3DSplitterElement::Direction>(const ::vl::presentation::elements::Gui3DSplitterElement::Direction & value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertCustomTypeToJson<::vl::presentation::elements::Gui3DSplitterElement::Direction>(const ::vl::presentation::elements::Gui3DSplitterElement::Direction&)#" + auto node = Ptr(new glr::json::JsonString); + switch (value) + { + case ::vl::presentation::elements::Gui3DSplitterElement::Horizontal: node->content.value = WString::Unmanaged(L"Horizontal"); break; + case ::vl::presentation::elements::Gui3DSplitterElement::Vertical: node->content.value = WString::Unmanaged(L"Vertical"); break; + default: CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); + } + return node; +#undef ERROR_MESSAGE_PREFIX + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementHorizontalAlignment>(const ::vl::presentation::remoteprotocol::ElementHorizontalAlignment & value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementHorizontalAlignment>(const ::vl::presentation::remoteprotocol::ElementHorizontalAlignment&)#" + auto node = Ptr(new glr::json::JsonString); + switch (value) + { + case ::vl::presentation::remoteprotocol::ElementHorizontalAlignment::Left: node->content.value = WString::Unmanaged(L"Left"); break; + case ::vl::presentation::remoteprotocol::ElementHorizontalAlignment::Right: node->content.value = WString::Unmanaged(L"Right"); break; + case ::vl::presentation::remoteprotocol::ElementHorizontalAlignment::Center: node->content.value = WString::Unmanaged(L"Center"); break; + default: CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); + } + return node; +#undef ERROR_MESSAGE_PREFIX + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementVerticalAlignment>(const ::vl::presentation::remoteprotocol::ElementVerticalAlignment & value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementVerticalAlignment>(const ::vl::presentation::remoteprotocol::ElementVerticalAlignment&)#" + auto node = Ptr(new glr::json::JsonString); + switch (value) + { + case ::vl::presentation::remoteprotocol::ElementVerticalAlignment::Top: node->content.value = WString::Unmanaged(L"Top"); break; + case ::vl::presentation::remoteprotocol::ElementVerticalAlignment::Bottom: node->content.value = WString::Unmanaged(L"Bottom"); break; + case ::vl::presentation::remoteprotocol::ElementVerticalAlignment::Center: node->content.value = WString::Unmanaged(L"Center"); break; + default: CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); + } + return node; +#undef ERROR_MESSAGE_PREFIX + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest>(const ::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest & value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest>(const ::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest&)#" + auto node = Ptr(new glr::json::JsonString); + switch (value) + { + case ::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest::FontHeight: node->content.value = WString::Unmanaged(L"FontHeight"); break; + case ::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest::TotalSize: node->content.value = WString::Unmanaged(L"TotalSize"); break; default: CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); } return node; @@ -39126,6 +40141,32 @@ namespace vl::presentation::remoteprotocol return node; } + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::Point>(const ::vl::presentation::Point & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"x", value.x); + ConvertCustomTypeToJsonField(node, L"y", value.y); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::Size>(const ::vl::presentation::Size & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"x", value.x); + ConvertCustomTypeToJsonField(node, L"y", value.y); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::Rect>(const ::vl::presentation::Rect & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"x1", value.x1); + ConvertCustomTypeToJsonField(node, L"y1", value.y1); + ConvertCustomTypeToJsonField(node, L"x2", value.x2); + ConvertCustomTypeToJsonField(node, L"y2", value.y2); + return node; + } + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::FontProperties>(const ::vl::presentation::FontProperties & value) { auto node = Ptr(new glr::json::JsonObject); @@ -39140,7 +40181,7 @@ namespace vl::presentation::remoteprotocol return node; } - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::FontConfig & value) + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::FontConfig>(const ::vl::presentation::remoteprotocol::FontConfig & value) { auto node = Ptr(new glr::json::JsonObject); ConvertCustomTypeToJsonField(node, L"defaultFont", value.defaultFont); @@ -39148,7 +40189,7 @@ namespace vl::presentation::remoteprotocol return node; } - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::ScreenConfig & value) + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ScreenConfig>(const ::vl::presentation::remoteprotocol::ScreenConfig & value) { auto node = Ptr(new glr::json::JsonObject); ConvertCustomTypeToJsonField(node, L"bounds", value.bounds); @@ -39173,7 +40214,7 @@ namespace vl::presentation::remoteprotocol return node; } - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::IOMouseInfoWithButton & value) + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::IOMouseInfoWithButton>(const ::vl::presentation::remoteprotocol::IOMouseInfoWithButton & value) { auto node = Ptr(new glr::json::JsonObject); ConvertCustomTypeToJsonField(node, L"button", value.button); @@ -39204,7 +40245,7 @@ namespace vl::presentation::remoteprotocol return node; } - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::GlobalShortcutKey & value) + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::GlobalShortcutKey>(const ::vl::presentation::remoteprotocol::GlobalShortcutKey & value) { auto node = Ptr(new glr::json::JsonObject); ConvertCustomTypeToJsonField(node, L"id", value.id); @@ -39215,7 +40256,7 @@ namespace vl::presentation::remoteprotocol return node; } - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::WindowSizingConfig & value) + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::WindowSizingConfig>(const ::vl::presentation::remoteprotocol::WindowSizingConfig & value) { auto node = Ptr(new glr::json::JsonObject); ConvertCustomTypeToJsonField(node, L"bounds", value.bounds); @@ -39225,7 +40266,7 @@ namespace vl::presentation::remoteprotocol return node; } - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::WindowShowing & value) + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::WindowShowing>(const ::vl::presentation::remoteprotocol::WindowShowing & value) { auto node = Ptr(new glr::json::JsonObject); ConvertCustomTypeToJsonField(node, L"activate", value.activate); @@ -39233,14 +40274,205 @@ namespace vl::presentation::remoteprotocol return node; } - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::IOMouseButton& value) + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::elements::ElementShape>(const ::vl::presentation::elements::ElementShape & value) { -#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType(Ptr, vl::presentation::remoteprotocol::IOMouseButton&)#" + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"shapeType", value.shapeType); + ConvertCustomTypeToJsonField(node, L"radiusX", value.radiusX); + ConvertCustomTypeToJsonField(node, L"radiusY", value.radiusY); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_SolidBorder>(const ::vl::presentation::remoteprotocol::ElementDesc_SolidBorder & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"id", value.id); + ConvertCustomTypeToJsonField(node, L"borderColor", value.borderColor); + ConvertCustomTypeToJsonField(node, L"shape", value.shape); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_SinkBorder>(const ::vl::presentation::remoteprotocol::ElementDesc_SinkBorder & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"id", value.id); + ConvertCustomTypeToJsonField(node, L"leftTopColor", value.leftTopColor); + ConvertCustomTypeToJsonField(node, L"rightBottomColor", value.rightBottomColor); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter>(const ::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"id", value.id); + ConvertCustomTypeToJsonField(node, L"leftTopColor", value.leftTopColor); + ConvertCustomTypeToJsonField(node, L"rightBottomColor", value.rightBottomColor); + ConvertCustomTypeToJsonField(node, L"direction", value.direction); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_SolidBackground>(const ::vl::presentation::remoteprotocol::ElementDesc_SolidBackground & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"id", value.id); + ConvertCustomTypeToJsonField(node, L"backgroundColor", value.backgroundColor); + ConvertCustomTypeToJsonField(node, L"shape", value.shape); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_GradientBackground>(const ::vl::presentation::remoteprotocol::ElementDesc_GradientBackground & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"id", value.id); + ConvertCustomTypeToJsonField(node, L"leftTopColor", value.leftTopColor); + ConvertCustomTypeToJsonField(node, L"rightBottomColor", value.rightBottomColor); + ConvertCustomTypeToJsonField(node, L"direction", value.direction); + ConvertCustomTypeToJsonField(node, L"shape", value.shape); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_InnerShadow>(const ::vl::presentation::remoteprotocol::ElementDesc_InnerShadow & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"id", value.id); + ConvertCustomTypeToJsonField(node, L"shadowColor", value.shadowColor); + ConvertCustomTypeToJsonField(node, L"thickness", value.thickness); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_Polygon>(const ::vl::presentation::remoteprotocol::ElementDesc_Polygon & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"id", value.id); + ConvertCustomTypeToJsonField(node, L"size", value.size); + ConvertCustomTypeToJsonField(node, L"borderColor", value.borderColor); + ConvertCustomTypeToJsonField(node, L"backgroundColor", value.backgroundColor); + ConvertCustomTypeToJsonField(node, L"points", value.points); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_SolidLabel>(const ::vl::presentation::remoteprotocol::ElementDesc_SolidLabel & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"id", value.id); + ConvertCustomTypeToJsonField(node, L"textColor", value.textColor); + ConvertCustomTypeToJsonField(node, L"horizontalAlignment", value.horizontalAlignment); + ConvertCustomTypeToJsonField(node, L"verticalAlignment", value.verticalAlignment); + ConvertCustomTypeToJsonField(node, L"wrapLine", value.wrapLine); + ConvertCustomTypeToJsonField(node, L"wrapLineHeightCalculation", value.wrapLineHeightCalculation); + ConvertCustomTypeToJsonField(node, L"ellipse", value.ellipse); + ConvertCustomTypeToJsonField(node, L"multiline", value.multiline); + ConvertCustomTypeToJsonField(node, L"font", value.font); + ConvertCustomTypeToJsonField(node, L"text", value.text); + ConvertCustomTypeToJsonField(node, L"measuringRequest", value.measuringRequest); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::RendererCreation>(const ::vl::presentation::remoteprotocol::RendererCreation & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"id", value.id); + ConvertCustomTypeToJsonField(node, L"type", value.type); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementRendering>(const ::vl::presentation::remoteprotocol::ElementRendering & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"id", value.id); + ConvertCustomTypeToJsonField(node, L"bounds", value.bounds); + ConvertCustomTypeToJsonField(node, L"clipper", value.clipper); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementBoundary>(const ::vl::presentation::remoteprotocol::ElementBoundary & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"hitTestResult", value.hitTestResult); + ConvertCustomTypeToJsonField(node, L"bounds", value.bounds); + ConvertCustomTypeToJsonField(node, L"clipper", value.clipper); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementMeasuring_FontHeight>(const ::vl::presentation::remoteprotocol::ElementMeasuring_FontHeight & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"fontFamily", value.fontFamily); + ConvertCustomTypeToJsonField(node, L"fontSize", value.fontSize); + ConvertCustomTypeToJsonField(node, L"height", value.height); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementMeasuring_ElementMinSize>(const ::vl::presentation::remoteprotocol::ElementMeasuring_ElementMinSize & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"id", value.id); + ConvertCustomTypeToJsonField(node, L"minSize", value.minSize); + return node; + } + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementMeasurings>(const ::vl::presentation::remoteprotocol::ElementMeasurings & value) + { + auto node = Ptr(new glr::json::JsonObject); + ConvertCustomTypeToJsonField(node, L"fontHeights", value.fontHeights); + ConvertCustomTypeToJsonField(node, L"minSizes", value.minSizes); + return node; + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::IOMouseButton>(vl::Ptr node, ::vl::presentation::remoteprotocol::IOMouseButton& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::IOMouseButton>(Ptr, ::vl::presentation::remoteprotocol::IOMouseButton&)#" auto jsonNode = node.Cast(); CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); - if (jsonNode->content.value == L"Left") value = vl::presentation::remoteprotocol::IOMouseButton::Left; else - if (jsonNode->content.value == L"Middle") value = vl::presentation::remoteprotocol::IOMouseButton::Middle; else - if (jsonNode->content.value == L"Right") value = vl::presentation::remoteprotocol::IOMouseButton::Right; else + if (jsonNode->content.value == L"Left") value = ::vl::presentation::remoteprotocol::IOMouseButton::Left; else + if (jsonNode->content.value == L"Middle") value = ::vl::presentation::remoteprotocol::IOMouseButton::Middle; else + if (jsonNode->content.value == L"Right") value = ::vl::presentation::remoteprotocol::IOMouseButton::Right; else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::INativeWindowListener::HitTestResult>(vl::Ptr node, ::vl::presentation::INativeWindowListener::HitTestResult& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::INativeWindowListener::HitTestResult>(Ptr, ::vl::presentation::INativeWindowListener::HitTestResult&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + if (jsonNode->content.value == L"BorderNoSizing") value = ::vl::presentation::INativeWindowListener::BorderNoSizing; else + if (jsonNode->content.value == L"BorderLeft") value = ::vl::presentation::INativeWindowListener::BorderLeft; else + if (jsonNode->content.value == L"BorderRight") value = ::vl::presentation::INativeWindowListener::BorderRight; else + if (jsonNode->content.value == L"BorderTop") value = ::vl::presentation::INativeWindowListener::BorderTop; else + if (jsonNode->content.value == L"BorderBottom") value = ::vl::presentation::INativeWindowListener::BorderBottom; else + if (jsonNode->content.value == L"BorderLeftTop") value = ::vl::presentation::INativeWindowListener::BorderLeftTop; else + if (jsonNode->content.value == L"BorderRightTop") value = ::vl::presentation::INativeWindowListener::BorderRightTop; else + if (jsonNode->content.value == L"BorderLeftBottom") value = ::vl::presentation::INativeWindowListener::BorderLeftBottom; else + if (jsonNode->content.value == L"BorderRightBottom") value = ::vl::presentation::INativeWindowListener::BorderRightBottom; else + if (jsonNode->content.value == L"Title") value = ::vl::presentation::INativeWindowListener::Title; else + if (jsonNode->content.value == L"ButtonMinimum") value = ::vl::presentation::INativeWindowListener::ButtonMinimum; else + if (jsonNode->content.value == L"ButtonMaximum") value = ::vl::presentation::INativeWindowListener::ButtonMaximum; else + if (jsonNode->content.value == L"ButtonClose") value = ::vl::presentation::INativeWindowListener::ButtonClose; else + if (jsonNode->content.value == L"Client") value = ::vl::presentation::INativeWindowListener::Client; else + if (jsonNode->content.value == L"Icon") value = ::vl::presentation::INativeWindowListener::Icon; else + if (jsonNode->content.value == L"NoDecision") value = ::vl::presentation::INativeWindowListener::NoDecision; else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::INativeCursor::SystemCursorType>(vl::Ptr node, ::vl::presentation::INativeCursor::SystemCursorType& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::INativeCursor::SystemCursorType>(Ptr, ::vl::presentation::INativeCursor::SystemCursorType&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + if (jsonNode->content.value == L"SmallWaiting") value = ::vl::presentation::INativeCursor::SmallWaiting; else + if (jsonNode->content.value == L"LargeWaiting") value = ::vl::presentation::INativeCursor::LargeWaiting; else + if (jsonNode->content.value == L"Arrow") value = ::vl::presentation::INativeCursor::Arrow; else + if (jsonNode->content.value == L"Cross") value = ::vl::presentation::INativeCursor::Cross; else + if (jsonNode->content.value == L"Hand") value = ::vl::presentation::INativeCursor::Hand; else + if (jsonNode->content.value == L"Help") value = ::vl::presentation::INativeCursor::Help; else + if (jsonNode->content.value == L"IBeam") value = ::vl::presentation::INativeCursor::IBeam; else + if (jsonNode->content.value == L"SizeAll") value = ::vl::presentation::INativeCursor::SizeAll; else + if (jsonNode->content.value == L"SizeNESW") value = ::vl::presentation::INativeCursor::SizeNESW; else + if (jsonNode->content.value == L"SizeNS") value = ::vl::presentation::INativeCursor::SizeNS; else + if (jsonNode->content.value == L"SizeNWSE") value = ::vl::presentation::INativeCursor::SizeNWSE; else + if (jsonNode->content.value == L"SizeWE") value = ::vl::presentation::INativeCursor::SizeWE; else CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); #undef ERROR_MESSAGE_PREFIX } @@ -39257,6 +40489,98 @@ namespace vl::presentation::remoteprotocol #undef ERROR_MESSAGE_PREFIX } + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::RendererType>(vl::Ptr node, ::vl::presentation::remoteprotocol::RendererType& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::RendererType>(Ptr, ::vl::presentation::remoteprotocol::RendererType&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + if (jsonNode->content.value == L"FocusRectangle") value = ::vl::presentation::remoteprotocol::RendererType::FocusRectangle; else + if (jsonNode->content.value == L"SolidBorder") value = ::vl::presentation::remoteprotocol::RendererType::SolidBorder; else + if (jsonNode->content.value == L"SinkBorder") value = ::vl::presentation::remoteprotocol::RendererType::SinkBorder; else + if (jsonNode->content.value == L"SinkSplitter") value = ::vl::presentation::remoteprotocol::RendererType::SinkSplitter; else + if (jsonNode->content.value == L"SolidBackground") value = ::vl::presentation::remoteprotocol::RendererType::SolidBackground; else + if (jsonNode->content.value == L"GradientBackground") value = ::vl::presentation::remoteprotocol::RendererType::GradientBackground; else + if (jsonNode->content.value == L"InnerShadow") value = ::vl::presentation::remoteprotocol::RendererType::InnerShadow; else + if (jsonNode->content.value == L"SolidLabel") value = ::vl::presentation::remoteprotocol::RendererType::SolidLabel; else + if (jsonNode->content.value == L"Polygon") value = ::vl::presentation::remoteprotocol::RendererType::Polygon; else + if (jsonNode->content.value == L"UnsupportedImageFrame") value = ::vl::presentation::remoteprotocol::RendererType::UnsupportedImageFrame; else + if (jsonNode->content.value == L"UnsupportedColorizedText") value = ::vl::presentation::remoteprotocol::RendererType::UnsupportedColorizedText; else + if (jsonNode->content.value == L"UnsupportedDocument") value = ::vl::presentation::remoteprotocol::RendererType::UnsupportedDocument; else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::elements::ElementShapeType>(vl::Ptr node, ::vl::presentation::elements::ElementShapeType& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::elements::ElementShapeType>(Ptr, ::vl::presentation::elements::ElementShapeType&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + if (jsonNode->content.value == L"Rectangle") value = ::vl::presentation::elements::ElementShapeType::Rectangle; else + if (jsonNode->content.value == L"Ellipse") value = ::vl::presentation::elements::ElementShapeType::Ellipse; else + if (jsonNode->content.value == L"RoundRect") value = ::vl::presentation::elements::ElementShapeType::RoundRect; else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::elements::GuiGradientBackgroundElement::Direction>(vl::Ptr node, ::vl::presentation::elements::GuiGradientBackgroundElement::Direction& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::elements::GuiGradientBackgroundElement::Direction>(Ptr, ::vl::presentation::elements::GuiGradientBackgroundElement::Direction&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + if (jsonNode->content.value == L"Horizontal") value = ::vl::presentation::elements::GuiGradientBackgroundElement::Horizontal; else + if (jsonNode->content.value == L"Vertical") value = ::vl::presentation::elements::GuiGradientBackgroundElement::Vertical; else + if (jsonNode->content.value == L"Slash") value = ::vl::presentation::elements::GuiGradientBackgroundElement::Slash; else + if (jsonNode->content.value == L"Backslash") value = ::vl::presentation::elements::GuiGradientBackgroundElement::Backslash; else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::elements::Gui3DSplitterElement::Direction>(vl::Ptr node, ::vl::presentation::elements::Gui3DSplitterElement::Direction& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::elements::Gui3DSplitterElement::Direction>(Ptr, ::vl::presentation::elements::Gui3DSplitterElement::Direction&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + if (jsonNode->content.value == L"Horizontal") value = ::vl::presentation::elements::Gui3DSplitterElement::Horizontal; else + if (jsonNode->content.value == L"Vertical") value = ::vl::presentation::elements::Gui3DSplitterElement::Vertical; else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementHorizontalAlignment>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementHorizontalAlignment& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementHorizontalAlignment>(Ptr, ::vl::presentation::remoteprotocol::ElementHorizontalAlignment&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + if (jsonNode->content.value == L"Left") value = ::vl::presentation::remoteprotocol::ElementHorizontalAlignment::Left; else + if (jsonNode->content.value == L"Right") value = ::vl::presentation::remoteprotocol::ElementHorizontalAlignment::Right; else + if (jsonNode->content.value == L"Center") value = ::vl::presentation::remoteprotocol::ElementHorizontalAlignment::Center; else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementVerticalAlignment>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementVerticalAlignment& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementVerticalAlignment>(Ptr, ::vl::presentation::remoteprotocol::ElementVerticalAlignment&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + if (jsonNode->content.value == L"Top") value = ::vl::presentation::remoteprotocol::ElementVerticalAlignment::Top; else + if (jsonNode->content.value == L"Bottom") value = ::vl::presentation::remoteprotocol::ElementVerticalAlignment::Bottom; else + if (jsonNode->content.value == L"Center") value = ::vl::presentation::remoteprotocol::ElementVerticalAlignment::Center; else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest>(Ptr, ::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + if (jsonNode->content.value == L"FontHeight") value = ::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest::FontHeight; else + if (jsonNode->content.value == L"TotalSize") value = ::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest::TotalSize; else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported enum value."); +#undef ERROR_MESSAGE_PREFIX + } + template<> void ConvertJsonToCustomType<::vl::presentation::NativeCoordinate>(vl::Ptr node, ::vl::presentation::NativeCoordinate& value) { #define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::NativeCoordinate>(Ptr, ::vl::presentation::NativeCoordinate&)#" @@ -39330,6 +40654,50 @@ namespace vl::presentation::remoteprotocol #undef ERROR_MESSAGE_PREFIX } + template<> void ConvertJsonToCustomType<::vl::presentation::Point>(vl::Ptr node, ::vl::presentation::Point& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::Point>(Ptr, ::vl::presentation::Point&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"x") ConvertJsonToCustomType(field->value, value.x); else + if (field->name.value == L"y") ConvertJsonToCustomType(field->value, value.y); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::Size>(vl::Ptr node, ::vl::presentation::Size& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::Size>(Ptr, ::vl::presentation::Size&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"x") ConvertJsonToCustomType(field->value, value.x); else + if (field->name.value == L"y") ConvertJsonToCustomType(field->value, value.y); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::Rect>(vl::Ptr node, ::vl::presentation::Rect& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::Rect>(Ptr, ::vl::presentation::Rect&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"x1") ConvertJsonToCustomType(field->value, value.x1); else + if (field->name.value == L"y1") ConvertJsonToCustomType(field->value, value.y1); else + if (field->name.value == L"x2") ConvertJsonToCustomType(field->value, value.x2); else + if (field->name.value == L"y2") ConvertJsonToCustomType(field->value, value.y2); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + template<> void ConvertJsonToCustomType<::vl::presentation::FontProperties>(vl::Ptr node, ::vl::presentation::FontProperties& value) { #define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::FontProperties>(Ptr, ::vl::presentation::FontProperties&)#" @@ -39350,9 +40718,9 @@ namespace vl::presentation::remoteprotocol #undef ERROR_MESSAGE_PREFIX } - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::FontConfig& value) + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::FontConfig>(vl::Ptr node, ::vl::presentation::remoteprotocol::FontConfig& value) { -#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType(Ptr, vl::presentation::remoteprotocol::FontConfig&)#" +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::FontConfig>(Ptr, ::vl::presentation::remoteprotocol::FontConfig&)#" auto jsonNode = node.Cast(); CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); for (auto field : jsonNode->fields) @@ -39364,9 +40732,9 @@ namespace vl::presentation::remoteprotocol #undef ERROR_MESSAGE_PREFIX } - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::ScreenConfig& value) + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ScreenConfig>(vl::Ptr node, ::vl::presentation::remoteprotocol::ScreenConfig& value) { -#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType(Ptr, vl::presentation::remoteprotocol::ScreenConfig&)#" +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ScreenConfig>(Ptr, ::vl::presentation::remoteprotocol::ScreenConfig&)#" auto jsonNode = node.Cast(); CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); for (auto field : jsonNode->fields) @@ -39401,9 +40769,9 @@ namespace vl::presentation::remoteprotocol #undef ERROR_MESSAGE_PREFIX } - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::IOMouseInfoWithButton& value) + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::IOMouseInfoWithButton>(vl::Ptr node, ::vl::presentation::remoteprotocol::IOMouseInfoWithButton& value) { -#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType(Ptr, vl::presentation::remoteprotocol::IOMouseInfoWithButton&)#" +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::IOMouseInfoWithButton>(Ptr, ::vl::presentation::remoteprotocol::IOMouseInfoWithButton&)#" auto jsonNode = node.Cast(); CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); for (auto field : jsonNode->fields) @@ -39450,9 +40818,9 @@ namespace vl::presentation::remoteprotocol #undef ERROR_MESSAGE_PREFIX } - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::GlobalShortcutKey& value) + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::GlobalShortcutKey>(vl::Ptr node, ::vl::presentation::remoteprotocol::GlobalShortcutKey& value) { -#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType(Ptr, vl::presentation::remoteprotocol::GlobalShortcutKey&)#" +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::GlobalShortcutKey>(Ptr, ::vl::presentation::remoteprotocol::GlobalShortcutKey&)#" auto jsonNode = node.Cast(); CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); for (auto field : jsonNode->fields) @@ -39467,9 +40835,9 @@ namespace vl::presentation::remoteprotocol #undef ERROR_MESSAGE_PREFIX } - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::WindowSizingConfig& value) + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::WindowSizingConfig>(vl::Ptr node, ::vl::presentation::remoteprotocol::WindowSizingConfig& value) { -#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType(Ptr, vl::presentation::remoteprotocol::WindowSizingConfig&)#" +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::WindowSizingConfig>(Ptr, ::vl::presentation::remoteprotocol::WindowSizingConfig&)#" auto jsonNode = node.Cast(); CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); for (auto field : jsonNode->fields) @@ -39483,9 +40851,9 @@ namespace vl::presentation::remoteprotocol #undef ERROR_MESSAGE_PREFIX } - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::WindowShowing& value) + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::WindowShowing>(vl::Ptr node, ::vl::presentation::remoteprotocol::WindowShowing& value) { -#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType(Ptr, vl::presentation::remoteprotocol::WindowShowing&)#" +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::WindowShowing>(Ptr, ::vl::presentation::remoteprotocol::WindowShowing&)#" auto jsonNode = node.Cast(); CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); for (auto field : jsonNode->fields) @@ -39497,6 +40865,241 @@ namespace vl::presentation::remoteprotocol #undef ERROR_MESSAGE_PREFIX } + template<> void ConvertJsonToCustomType<::vl::presentation::elements::ElementShape>(vl::Ptr node, ::vl::presentation::elements::ElementShape& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::elements::ElementShape>(Ptr, ::vl::presentation::elements::ElementShape&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"shapeType") ConvertJsonToCustomType(field->value, value.shapeType); else + if (field->name.value == L"radiusX") ConvertJsonToCustomType(field->value, value.radiusX); else + if (field->name.value == L"radiusY") ConvertJsonToCustomType(field->value, value.radiusY); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SolidBorder>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_SolidBorder& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SolidBorder>(Ptr, ::vl::presentation::remoteprotocol::ElementDesc_SolidBorder&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"id") ConvertJsonToCustomType(field->value, value.id); else + if (field->name.value == L"borderColor") ConvertJsonToCustomType(field->value, value.borderColor); else + if (field->name.value == L"shape") ConvertJsonToCustomType(field->value, value.shape); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SinkBorder>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_SinkBorder& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SinkBorder>(Ptr, ::vl::presentation::remoteprotocol::ElementDesc_SinkBorder&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"id") ConvertJsonToCustomType(field->value, value.id); else + if (field->name.value == L"leftTopColor") ConvertJsonToCustomType(field->value, value.leftTopColor); else + if (field->name.value == L"rightBottomColor") ConvertJsonToCustomType(field->value, value.rightBottomColor); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter>(Ptr, ::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"id") ConvertJsonToCustomType(field->value, value.id); else + if (field->name.value == L"leftTopColor") ConvertJsonToCustomType(field->value, value.leftTopColor); else + if (field->name.value == L"rightBottomColor") ConvertJsonToCustomType(field->value, value.rightBottomColor); else + if (field->name.value == L"direction") ConvertJsonToCustomType(field->value, value.direction); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SolidBackground>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_SolidBackground& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SolidBackground>(Ptr, ::vl::presentation::remoteprotocol::ElementDesc_SolidBackground&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"id") ConvertJsonToCustomType(field->value, value.id); else + if (field->name.value == L"backgroundColor") ConvertJsonToCustomType(field->value, value.backgroundColor); else + if (field->name.value == L"shape") ConvertJsonToCustomType(field->value, value.shape); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_GradientBackground>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_GradientBackground& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_GradientBackground>(Ptr, ::vl::presentation::remoteprotocol::ElementDesc_GradientBackground&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"id") ConvertJsonToCustomType(field->value, value.id); else + if (field->name.value == L"leftTopColor") ConvertJsonToCustomType(field->value, value.leftTopColor); else + if (field->name.value == L"rightBottomColor") ConvertJsonToCustomType(field->value, value.rightBottomColor); else + if (field->name.value == L"direction") ConvertJsonToCustomType(field->value, value.direction); else + if (field->name.value == L"shape") ConvertJsonToCustomType(field->value, value.shape); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_InnerShadow>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_InnerShadow& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_InnerShadow>(Ptr, ::vl::presentation::remoteprotocol::ElementDesc_InnerShadow&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"id") ConvertJsonToCustomType(field->value, value.id); else + if (field->name.value == L"shadowColor") ConvertJsonToCustomType(field->value, value.shadowColor); else + if (field->name.value == L"thickness") ConvertJsonToCustomType(field->value, value.thickness); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_Polygon>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_Polygon& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_Polygon>(Ptr, ::vl::presentation::remoteprotocol::ElementDesc_Polygon&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"id") ConvertJsonToCustomType(field->value, value.id); else + if (field->name.value == L"size") ConvertJsonToCustomType(field->value, value.size); else + if (field->name.value == L"borderColor") ConvertJsonToCustomType(field->value, value.borderColor); else + if (field->name.value == L"backgroundColor") ConvertJsonToCustomType(field->value, value.backgroundColor); else + if (field->name.value == L"points") ConvertJsonToCustomType(field->value, value.points); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SolidLabel>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_SolidLabel& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SolidLabel>(Ptr, ::vl::presentation::remoteprotocol::ElementDesc_SolidLabel&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"id") ConvertJsonToCustomType(field->value, value.id); else + if (field->name.value == L"textColor") ConvertJsonToCustomType(field->value, value.textColor); else + if (field->name.value == L"horizontalAlignment") ConvertJsonToCustomType(field->value, value.horizontalAlignment); else + if (field->name.value == L"verticalAlignment") ConvertJsonToCustomType(field->value, value.verticalAlignment); else + if (field->name.value == L"wrapLine") ConvertJsonToCustomType(field->value, value.wrapLine); else + if (field->name.value == L"wrapLineHeightCalculation") ConvertJsonToCustomType(field->value, value.wrapLineHeightCalculation); else + if (field->name.value == L"ellipse") ConvertJsonToCustomType(field->value, value.ellipse); else + if (field->name.value == L"multiline") ConvertJsonToCustomType(field->value, value.multiline); else + if (field->name.value == L"font") ConvertJsonToCustomType(field->value, value.font); else + if (field->name.value == L"text") ConvertJsonToCustomType(field->value, value.text); else + if (field->name.value == L"measuringRequest") ConvertJsonToCustomType(field->value, value.measuringRequest); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::RendererCreation>(vl::Ptr node, ::vl::presentation::remoteprotocol::RendererCreation& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::RendererCreation>(Ptr, ::vl::presentation::remoteprotocol::RendererCreation&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"id") ConvertJsonToCustomType(field->value, value.id); else + if (field->name.value == L"type") ConvertJsonToCustomType(field->value, value.type); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementRendering>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementRendering& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementRendering>(Ptr, ::vl::presentation::remoteprotocol::ElementRendering&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"id") ConvertJsonToCustomType(field->value, value.id); else + if (field->name.value == L"bounds") ConvertJsonToCustomType(field->value, value.bounds); else + if (field->name.value == L"clipper") ConvertJsonToCustomType(field->value, value.clipper); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementBoundary>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementBoundary& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementBoundary>(Ptr, ::vl::presentation::remoteprotocol::ElementBoundary&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"hitTestResult") ConvertJsonToCustomType(field->value, value.hitTestResult); else + if (field->name.value == L"bounds") ConvertJsonToCustomType(field->value, value.bounds); else + if (field->name.value == L"clipper") ConvertJsonToCustomType(field->value, value.clipper); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementMeasuring_FontHeight>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementMeasuring_FontHeight& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementMeasuring_FontHeight>(Ptr, ::vl::presentation::remoteprotocol::ElementMeasuring_FontHeight&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"fontFamily") ConvertJsonToCustomType(field->value, value.fontFamily); else + if (field->name.value == L"fontSize") ConvertJsonToCustomType(field->value, value.fontSize); else + if (field->name.value == L"height") ConvertJsonToCustomType(field->value, value.height); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementMeasuring_ElementMinSize>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementMeasuring_ElementMinSize& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementMeasuring_ElementMinSize>(Ptr, ::vl::presentation::remoteprotocol::ElementMeasuring_ElementMinSize&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"id") ConvertJsonToCustomType(field->value, value.id); else + if (field->name.value == L"minSize") ConvertJsonToCustomType(field->value, value.minSize); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementMeasurings>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementMeasurings& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementMeasurings>(Ptr, ::vl::presentation::remoteprotocol::ElementMeasurings&)#" + auto jsonNode = node.Cast(); + CHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + for (auto field : jsonNode->fields) + { + if (field->name.value == L"fontHeights") ConvertJsonToCustomType(field->value, value.fontHeights); else + if (field->name.value == L"minSizes") ConvertJsonToCustomType(field->value, value.minSizes); else + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unsupported struct member."); + } +#undef ERROR_MESSAGE_PREFIX + } + } diff --git a/Import/GacUI.h b/Import/GacUI.h index ae8d3d9e..ab302294 100644 --- a/Import/GacUI.h +++ b/Import/GacUI.h @@ -1319,11 +1319,13 @@ Basic Construction /// The result clipper is combined by all clippers in the clipper stack maintained by the render target. /// /// The clipper to push. - virtual void PushClipper(Rect clipper) = 0; + /// The object that generates this clipper. It could be null. + virtual void PushClipper(Rect clipper, reflection::DescriptableObject* generator) = 0; /// /// Remove the last pushed clipper from the clipper stack. /// - virtual void PopClipper() = 0; + /// The object that generates this clipper. It could be null. + virtual void PopClipper(reflection::DescriptableObject* generator) = 0; /// /// Get the combined clipper /// @@ -1351,10 +1353,10 @@ Basic Construction virtual RenderTargetFailure StopRenderingOnNativeWindow() = 0; virtual Size GetCanvasSize() = 0; - virtual void AfterPushedClipper(Rect clipper, Rect validArea) = 0; - virtual void AfterPushedClipperAndBecameInvalid(Rect clipper) = 0; - virtual void AfterPoppedClipperAndBecameValid(Rect validArea, bool clipperExists) = 0; - virtual void AfterPoppedClipper(Rect validArea, bool clipperExists) = 0; + virtual void AfterPushedClipper(Rect clipper, Rect validArea, reflection::DescriptableObject* generator) = 0; + virtual void AfterPushedClipperAndBecameInvalid(Rect clipper, reflection::DescriptableObject* generator) = 0; + virtual void AfterPoppedClipperAndBecameValid(Rect validArea, bool clipperExists, reflection::DescriptableObject* generator) = 0; + virtual void AfterPoppedClipper(Rect validArea, bool clipperExists, reflection::DescriptableObject* generator) = 0; public: bool IsInHostedRendering() override; @@ -1363,8 +1365,8 @@ Basic Construction void StartRendering() override; RenderTargetFailure StopRendering() override; - void PushClipper(Rect clipper) override; - void PopClipper() override; + void PushClipper(Rect clipper, reflection::DescriptableObject* generator) override; + void PopClipper(reflection::DescriptableObject* generator) override; Rect GetClipper() override; bool IsClipperCoverWholeTarget() override; }; @@ -4249,7 +4251,7 @@ Basic Construction /// The deepest composition that under a specified location. /// The specified location. /// Find a composition for mouse event, it will ignore all compositions that are transparent to mouse events. - GuiGraphicsComposition* FindComposition(Point location, bool forMouseEvent); + GuiGraphicsComposition* FindVisibleComposition(Point location, bool forMouseEvent); /// Get is this composition transparent to mouse events. /// Returns true if this composition is transparent to mouse events, which means it just passes all mouse events to the composition under it. bool GetTransparentToMouse(); @@ -4288,6 +4290,9 @@ Basic Construction /// Get the related cursor. A related cursor is from the deepest composition that contains this composition and associated with a cursor. /// The related cursor. INativeCursor* GetRelatedCursor(); + /// Get the related hit test result. A related hit test result is from the deepest composition that contains this composition and associated with a hit test result. + /// The related hit test result. + INativeWindowListener::HitTestResult GetRelatedHitTestResult(); /// Get the internal margin. /// The internal margin. @@ -5091,8 +5096,10 @@ Host /// Get the main . If a window is associated, everything that put into the main composition will be shown in the window. /// The main compositoin. GuiGraphicsComposition* GetMainComposition(); - /// Request a rendering + /// Request rendering. void RequestRender(); + /// Request updating sizes of compositions. + void RequestUpdateSizeFromNativeWindow(); /// Invoke a specified function after rendering. /// The specified function. /// A key to cancel a previous binded key if not null. @@ -6188,6 +6195,7 @@ GuiVirtualRepeatCompositionBase bool itemSourceUpdated = false; bool useMinimumFullSize = false; Size realFullSize; + Size realMinimumFullSize; Rect viewBounds; vint startIndex = 0; StyleList visibleStyles; @@ -6197,7 +6205,7 @@ GuiVirtualRepeatCompositionBase virtual VirtualRepeatEndPlaceItemResult Layout_EndPlaceItem(bool firstPhase, Rect newBounds, vint newStartIndex) = 0; virtual void Layout_EndLayout(bool totalSizeUpdated) = 0; virtual void Layout_InvalidateItemSizeCache() = 0; - virtual Size Layout_CalculateTotalSize() = 0; + virtual void Layout_CalculateTotalSize(Size& full, Size& minimum) = 0; virtual void Layout_UpdateIndex(ItemStyleRecord style, vint index); void Layout_UpdateViewBounds(Rect value, bool forceUpdateTotalSize); @@ -6221,6 +6229,7 @@ GuiVirtualRepeatCompositionBase vint CalculateAdoptedSize(vint expectedSize, vint count, vint itemSize); ItemStyleRecord CreateStyle(vint index); void DeleteStyle(ItemStyleRecord style); + void UpdateFullSize(); void OnViewChangedInternal(Rect oldBounds, Rect newBounds, bool forceUpdateTotalSize); public: @@ -6278,7 +6287,7 @@ GuiVirtualRepeatCompositionBase VirtualRepeatEndPlaceItemResult Layout_EndPlaceItem(bool firstPhase, Rect newBounds, vint newStartIndex) override; void Layout_EndLayout(bool totalSizeUpdated) override; void Layout_InvalidateItemSizeCache() override; - Size Layout_CalculateTotalSize() override; + void Layout_CalculateTotalSize(Size& full, Size& minimum) override; void OnItemChanged(vint start, vint oldCount, vint newCount) override; void OnInstallItems() override; @@ -6310,7 +6319,7 @@ GuiVirtualRepeatCompositionBase VirtualRepeatEndPlaceItemResult Layout_EndPlaceItem(bool firstPhase, Rect newBounds, vint newStartIndex)override; void Layout_EndLayout(bool totalSizeUpdated) override; void Layout_InvalidateItemSizeCache()override; - Size Layout_CalculateTotalSize()override; + void Layout_CalculateTotalSize(Size& full, Size& minimum)override; public: /// Create the arranger. GuiRepeatFixedHeightItemComposition() = default; @@ -6340,7 +6349,7 @@ GuiVirtualRepeatCompositionBase VirtualRepeatEndPlaceItemResult Layout_EndPlaceItem(bool firstPhase, Rect newBounds, vint newStartIndex)override; void Layout_EndLayout(bool totalSizeUpdated) override; void Layout_InvalidateItemSizeCache()override; - Size Layout_CalculateTotalSize()override; + void Layout_CalculateTotalSize(Size& full, Size& minimum)override; public: /// Create the arranger. GuiRepeatFixedSizeMultiColumnItemComposition() = default; @@ -6374,7 +6383,7 @@ GuiVirtualRepeatCompositionBase VirtualRepeatEndPlaceItemResult Layout_EndPlaceItem(bool firstPhase, Rect newBounds, vint newStartIndex)override; void Layout_EndLayout(bool totalSizeUpdated) override; void Layout_InvalidateItemSizeCache()override; - Size Layout_CalculateTotalSize()override; + void Layout_CalculateTotalSize(Size& full, Size& minimum)override; public: /// Create the arranger. GuiRepeatFixedHeightMultiColumnItemComposition() = default; @@ -6908,6 +6917,18 @@ Helpers InvokeOnCompositionStateChanged(); } public: + static vint GetElementType() + { + static vint elementType = -1; + if (elementType == -1) + { + auto manager = GetGuiGraphicsResourceManager(); + CHECK_ERROR(manager != nullptr, L"SetGuiGraphicsResourceManager must be called before registering element types."); + elementType = manager->RegisterElementType(WString::Unmanaged(TElement::ElementTypeName)); + } + return elementType; + } + static TElement* Create() { auto rendererFactory = GetGuiGraphicsResourceManager()->GetRendererFactory(TElement::GetElementType()); @@ -6938,147 +6959,151 @@ Helpers } }; -#define DEFINE_GUI_GRAPHICS_ELEMENT(TELEMENT, ELEMENT_TYPE_NAME)\ - friend class GuiElementBase;\ - public:\ - static vint GetElementType()\ - {\ - static vint elementType = -1;\ - if (elementType == -1)\ - {\ - auto manager = GetGuiGraphicsResourceManager();\ - CHECK_ERROR(manager != nullptr, L"SetGuiGraphicsResourceManager must be called before registering element types.");\ - elementType = manager->RegisterElementType(WString::Unmanaged(ELEMENT_TYPE_NAME));\ - }\ - return elementType;\ - }\ + template + class GuiElementRendererBase : public Object, public IGuiGraphicsRenderer + { + public: + class Factory : public Object, public IGuiGraphicsRendererFactory + { + public: + IGuiGraphicsRenderer* Create() + { + TRenderer* renderer=new TRenderer; + renderer->factory=this; + renderer->element=nullptr; + renderer->renderTarget=nullptr; + return renderer; + } + }; + protected: -#define DEFINE_GUI_GRAPHICS_RENDERER(TELEMENT, TRENDERER, TTARGET)\ - public:\ - class Factory : public Object, public IGuiGraphicsRendererFactory\ - {\ - public:\ - IGuiGraphicsRenderer* Create()\ - {\ - TRENDERER* renderer=new TRENDERER;\ - renderer->factory=this;\ - renderer->element=nullptr;\ - renderer->renderTarget=nullptr;\ - return renderer;\ - }\ - };\ - protected:\ - IGuiGraphicsRendererFactory* factory;\ - TELEMENT* element;\ - TTARGET* renderTarget;\ - Size minSize;\ - public:\ - static void Register()\ - {\ - auto manager = GetGuiGraphicsResourceManager();\ - CHECK_ERROR(manager != nullptr, L"SetGuiGraphicsResourceManager must be called before registering element renderers.");\ - manager->RegisterRendererFactory(TELEMENT::GetElementType(), Ptr(new TRENDERER::Factory));\ - }\ - IGuiGraphicsRendererFactory* GetFactory()override\ - {\ - return factory;\ - }\ - void Initialize(IGuiGraphicsElement* _element)override\ - {\ - element=dynamic_cast(_element);\ - InitializeInternal();\ - }\ - void Finalize()override\ - {\ - FinalizeInternal();\ - }\ - void SetRenderTarget(IGuiGraphicsRenderTarget* _renderTarget)override\ - {\ - TTARGET* oldRenderTarget=renderTarget;\ - renderTarget=dynamic_cast(_renderTarget);\ - RenderTargetChangedInternal(oldRenderTarget, renderTarget);\ - }\ - Size GetMinSize()override\ - {\ - return minSize;\ - }\ + IGuiGraphicsRendererFactory* factory; + TElement* element; + TRenderTarget* renderTarget; + Size minSize; -#define DEFINE_CACHED_RESOURCE_ALLOCATOR(TKEY, TVALUE)\ - public:\ - static const vint DeadPackageMax=32;\ - struct Package\ - {\ - TVALUE resource;\ - vint counter;\ - std::partial_ordering operator<=>(const Package&) const { return std::partial_ordering::unordered; }\ - bool operator==(const Package&)const{return false;}\ - };\ - struct DeadPackage\ - {\ - TKEY key;\ - TVALUE value;\ - std::partial_ordering operator<=>(const DeadPackage&) const { return std::partial_ordering::unordered; }\ - bool operator==(const DeadPackage&)const{return false;}\ - };\ - Dictionary aliveResources;\ - List deadResources;\ - public:\ - TVALUE Create(const TKEY& key)\ - {\ - vint index=aliveResources.Keys().IndexOf(key);\ - if(index!=-1)\ - {\ - Package package=aliveResources.Values().Get(index);\ - package.counter++;\ - aliveResources.Set(key, package);\ - return package.resource;\ - }\ - TVALUE resource;\ - for(vint i=0;iRegisterRendererFactory(TElement::GetElementType(), Ptr(new typename TRenderer::Factory)); } + + IGuiGraphicsRendererFactory* GetFactory()override + { + return factory; + } + + void Initialize(IGuiGraphicsElement* _element)override + { + element=dynamic_cast(_element); + static_cast(this)->InitializeInternal(); + } + + void Finalize()override + { + static_cast(this)->FinalizeInternal(); + } + + void SetRenderTarget(IGuiGraphicsRenderTarget* _renderTarget)override + { + TRenderTarget* oldRenderTarget=renderTarget; + renderTarget= static_cast(_renderTarget); + static_cast(this)->RenderTargetChangedInternal(oldRenderTarget, renderTarget); + } + + Size GetMinSize()override + { + return minSize; + } + }; + + template + class GuiCachedResourceAllocatorBase : public Object + { + public: + static const vint DeadPackageMax = 32; + + struct Package + { + TValue resource; + vint counter; + std::partial_ordering operator<=>(const Package&) const { return std::partial_ordering::unordered; } + bool operator==(const Package&)const { return false; } + }; + + struct DeadPackage + { + TKey key; + TValue value; + std::partial_ordering operator<=>(const DeadPackage&) const { return std::partial_ordering::unordered; } + bool operator==(const DeadPackage&)const { return false; } + }; + + collections::Dictionary aliveResources; + collections::List deadResources; + + public: + + TValue Create(const TKey& key) + { + vint index = aliveResources.Keys().IndexOf(key); + if (index != -1) + { + Package package = aliveResources.Values().Get(index); + package.counter++; + aliveResources.Set(key, package); + return package.resource; + } + TValue resource; + for (vint i = 0; i < deadResources.Count(); i++) + { + if (deadResources[i].key == key) + { + DeadPackage deadPackage = deadResources[i]; + deadResources.RemoveAt(i); + resource = deadPackage.value; + break; + } + } + if (!resource) + { + resource = static_cast(this)->CreateInternal(key); + } + Package package; + package.resource = resource; + package.counter = 1; + aliveResources.Add(key, package); + return package.resource; + } + + void Destroy(const TKey& key) + { + vint index = aliveResources.Keys().IndexOf(key); + if (index != -1) + { + Package package = aliveResources.Values().Get(index); + package.counter--; + if (package.counter == 0) + { + aliveResources.Remove(key); + if (deadResources.Count() == DeadPackageMax) + { + deadResources.RemoveAt(DeadPackageMax - 1); + } + DeadPackage deadPackage; + deadPackage.key = key; + deadPackage.value = package.resource; + deadResources.Insert(0, deadPackage); + } + else + { + aliveResources.Set(key, package); + } + } + } + }; } } } @@ -8000,439 +8025,6 @@ GuiHostedWindow #endif -/*********************************************************************** -.\PLATFORMPROVIDERS\REMOTE\GUIREMOTEGRAPHICS.H -***********************************************************************/ -/*********************************************************************** -Vczh Library++ 3.0 -Developer: Zihan Chen(vczh) -GacUI::Remote Window - -Interfaces: - GuiRemoteController - -***********************************************************************/ - -#ifndef VCZH_PRESENTATION_GUIREMOTEGRAPHICS -#define VCZH_PRESENTATION_GUIREMOTEGRAPHICS - - -namespace vl::presentation -{ - class GuiRemoteController; - - namespace elements - { -/*********************************************************************** -GuiRemoteGraphicsRenderTarget -***********************************************************************/ - - class GuiRemoteGraphicsRenderTarget : public GuiGraphicsRenderTarget - { - protected: - GuiRemoteController* remote; - NativeSize canvasSize; - - void StartRenderingOnNativeWindow() override; - RenderTargetFailure StopRenderingOnNativeWindow() override; - - Size GetCanvasSize() override; - void AfterPushedClipper(Rect clipper, Rect validArea) override; - void AfterPushedClipperAndBecameInvalid(Rect clipper) override; - void AfterPoppedClipperAndBecameValid(Rect validArea, bool clipperExists) override; - void AfterPoppedClipper(Rect validArea, bool clipperExists) override; - public: - GuiRemoteGraphicsRenderTarget(GuiRemoteController* _remote); - ~GuiRemoteGraphicsRenderTarget(); - }; - -/*********************************************************************** -GuiRemoteGraphicsResourceManager -***********************************************************************/ - - class GuiRemoteGraphicsResourceManager : public GuiGraphicsResourceManager - { - protected: - GuiRemoteController* remote; - GuiRemoteGraphicsRenderTarget renderTarget; - - public: - GuiRemoteGraphicsResourceManager(GuiRemoteController* _remote); - ~GuiRemoteGraphicsResourceManager(); - - // ============================================================= - // IGuiGraphicsResourceManager - // ============================================================= - - IGuiGraphicsRenderTarget* GetRenderTarget(INativeWindow* window) override; - void RecreateRenderTarget(INativeWindow* window) override; - void ResizeRenderTarget(INativeWindow* window) override; - IGuiGraphicsLayoutProvider* GetLayoutProvider() override; - }; - } -} - -#endif - -/*********************************************************************** -.\PLATFORMPROVIDERS\REMOTE\GUIREMOTEPROTOCOLSCHEMASHARED.H -***********************************************************************/ -/*********************************************************************** -Vczh Library++ 3.0 -Developer: Zihan Chen(vczh) -GacUI::Remote Window - -Interfaces: - IGuiRemoteProtocol - -***********************************************************************/ - -#ifndef VCZH_PRESENTATION_GUIREMOTECONTROLLER_REMOTEPROTOCOLSCHEMASHARED -#define VCZH_PRESENTATION_GUIREMOTECONTROLLER_REMOTEPROTOCOLSCHEMASHARED - - -namespace vl::presentation::remoteprotocol -{ - template - struct JsonHelper - { - static Ptr ToJson(const T& value); - static void ConvertJsonToCustomType(Ptr node, T& value); - }; - - template - Ptr ConvertCustomTypeToJson(const T& value) - { - return JsonHelper::ToJson(value); - } - - template<> Ptr ConvertCustomTypeToJson(const bool& value); - template<> Ptr ConvertCustomTypeToJson(const vint& value); - template<> Ptr ConvertCustomTypeToJson(const float& value); - template<> Ptr ConvertCustomTypeToJson(const double& value); - template<> Ptr ConvertCustomTypeToJson(const WString& value); - template<> Ptr ConvertCustomTypeToJson(const wchar_t& value); - template<> Ptr ConvertCustomTypeToJson(const VKEY& value); - - template - void ConvertJsonToCustomType(Ptr node, T& value) - { - return JsonHelper::FromJson(node, value); - } - - template<> void ConvertJsonToCustomType(Ptr node, bool& value); - template<> void ConvertJsonToCustomType(Ptr node, vint& value); - template<> void ConvertJsonToCustomType(Ptr node, float& value); - template<> void ConvertJsonToCustomType(Ptr node, double& value); - template<> void ConvertJsonToCustomType(Ptr node, WString& value); - template<> void ConvertJsonToCustomType(Ptr node, wchar_t& value); - template<> void ConvertJsonToCustomType(Ptr node, VKEY& value); - - template - void ConvertCustomTypeToJsonField(Ptr node, const wchar_t* name, const T& value) - { - auto field = Ptr(new glr::json::JsonObjectField); - field->name.value = WString::Unmanaged(name); - field->value = ConvertCustomTypeToJson(value); - node->fields.Add(field); - } - - template - struct JsonHelper>> - { - static Ptr ToJson(const Ptr>& value) - { - if (!value) - { - auto node = Ptr(new glr::json::JsonLiteral); - node->value = glr::json::JsonLiteralValue::Null; - return node; - } - else - { - auto node = Ptr(new glr::json::JsonArray); - for (auto&& item : *value.Obj()) - { - node->items.Add(ConvertCustomTypeToJson(item)); - } - return node; - } - } - - static void FromJson(Ptr node, Ptr>& value) - { -#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType(Ptr, Ptr>&)#" - if (auto jsonLiteral = node.Cast()) - { - if (jsonLiteral->value == glr::json::JsonLiteralValue::Null) - { - value = {}; - return; - } - } - else if (auto jsonArray = node.Cast()) - { - value = Ptr(new collections::List); - for (auto jsonItem : jsonArray->items) - { - T item; - ConvertJsonToCustomType(jsonItem, item); - value->Add(std::move(item)); - } - return; - } - CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); -#undef ERROR_MESSAGE_PREFIX - } - }; -} - -#endif - - -/*********************************************************************** -.\PLATFORMPROVIDERS\REMOTE\PROTOCOL\GENERATED\GUIREMOTEPROTOCOLSCHEMA.H -***********************************************************************/ -/*********************************************************************** -This file is generated by : Vczh GacUI Remote Protocol Generator -Licensed under https ://github.com/vczh-libraries/License -***********************************************************************/ - -#ifndef VCZH_PRESENTATION_GUIREMOTECONTROLLER_REMOTEPROTOCOLSCHEMA -#define VCZH_PRESENTATION_GUIREMOTECONTROLLER_REMOTEPROTOCOLSCHEMA - - -namespace vl::presentation::remoteprotocol -{ - enum class IOMouseButton - { - Left, - Middle, - Right, - }; - - struct FontConfig - { - ::vl::presentation::FontProperties defaultFont; - ::vl::Ptr<::vl::collections::List<::vl::WString>> supportedFonts; - }; - - struct ScreenConfig - { - ::vl::presentation::NativeRect bounds; - ::vl::presentation::NativeRect clientBounds; - double scalingX; - double scalingY; - }; - - struct IOMouseInfoWithButton - { - vl::presentation::remoteprotocol::IOMouseButton button; - ::vl::presentation::NativeWindowMouseInfo info; - }; - - struct GlobalShortcutKey - { - ::vl::vint id; - bool ctrl; - bool shift; - bool alt; - ::vl::presentation::VKEY code; - }; - - struct WindowSizingConfig - { - ::vl::presentation::NativeRect bounds; - ::vl::presentation::NativeRect clientBounds; - ::vl::presentation::INativeWindow::WindowSizeState sizeState; - ::vl::presentation::NativeMargin customFramePadding; - }; - - struct WindowShowing - { - bool activate; - ::vl::presentation::INativeWindow::WindowSizeState sizeState; - }; - - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::IOMouseButton & value); - template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::INativeWindow::WindowSizeState>(const ::vl::presentation::INativeWindow::WindowSizeState & value); - template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeCoordinate>(const ::vl::presentation::NativeCoordinate & value); - template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativePoint>(const ::vl::presentation::NativePoint & value); - template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeSize>(const ::vl::presentation::NativeSize & value); - template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeRect>(const ::vl::presentation::NativeRect & value); - template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeMargin>(const ::vl::presentation::NativeMargin & value); - template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::FontProperties>(const ::vl::presentation::FontProperties & value); - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::FontConfig & value); - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::ScreenConfig & value); - template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeWindowMouseInfo>(const ::vl::presentation::NativeWindowMouseInfo & value); - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::IOMouseInfoWithButton & value); - template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeWindowKeyInfo>(const ::vl::presentation::NativeWindowKeyInfo & value); - template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeWindowCharInfo>(const ::vl::presentation::NativeWindowCharInfo & value); - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::GlobalShortcutKey & value); - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::WindowSizingConfig & value); - template<> vl::Ptr ConvertCustomTypeToJson(const vl::presentation::remoteprotocol::WindowShowing & value); - - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::IOMouseButton& value); - template<> void ConvertJsonToCustomType<::vl::presentation::INativeWindow::WindowSizeState>(vl::Ptr node, ::vl::presentation::INativeWindow::WindowSizeState& value); - template<> void ConvertJsonToCustomType<::vl::presentation::NativeCoordinate>(vl::Ptr node, ::vl::presentation::NativeCoordinate& value); - template<> void ConvertJsonToCustomType<::vl::presentation::NativePoint>(vl::Ptr node, ::vl::presentation::NativePoint& value); - template<> void ConvertJsonToCustomType<::vl::presentation::NativeSize>(vl::Ptr node, ::vl::presentation::NativeSize& value); - template<> void ConvertJsonToCustomType<::vl::presentation::NativeRect>(vl::Ptr node, ::vl::presentation::NativeRect& value); - template<> void ConvertJsonToCustomType<::vl::presentation::NativeMargin>(vl::Ptr node, ::vl::presentation::NativeMargin& value); - template<> void ConvertJsonToCustomType<::vl::presentation::FontProperties>(vl::Ptr node, ::vl::presentation::FontProperties& value); - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::FontConfig& value); - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::ScreenConfig& value); - template<> void ConvertJsonToCustomType<::vl::presentation::NativeWindowMouseInfo>(vl::Ptr node, ::vl::presentation::NativeWindowMouseInfo& value); - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::IOMouseInfoWithButton& value); - template<> void ConvertJsonToCustomType<::vl::presentation::NativeWindowKeyInfo>(vl::Ptr node, ::vl::presentation::NativeWindowKeyInfo& value); - template<> void ConvertJsonToCustomType<::vl::presentation::NativeWindowCharInfo>(vl::Ptr node, ::vl::presentation::NativeWindowCharInfo& value); - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::GlobalShortcutKey& value); - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::WindowSizingConfig& value); - template<> void ConvertJsonToCustomType(vl::Ptr node, vl::presentation::remoteprotocol::WindowShowing& value); - -#define GACUI_REMOTEPROTOCOL_MESSAGES(HANDLER)\ - HANDLER(ControllerGetFontConfig, void, vl::presentation::remoteprotocol::FontConfig, NOREQ, RES, NODROP)\ - HANDLER(ControllerGetScreenConfig, void, vl::presentation::remoteprotocol::ScreenConfig, NOREQ, RES, NODROP)\ - HANDLER(ControllerConnectionEstablished, void, void, NOREQ, NORES, NODROP)\ - HANDLER(ControllerConnectionStopped, void, void, NOREQ, NORES, NODROP)\ - HANDLER(IOUpdateGlobalShortcutKey, ::vl::Ptr<::vl::collections::List>, void, REQ, NORES, NODROP)\ - HANDLER(IORequireCapture, void, void, NOREQ, NORES, NODROP)\ - HANDLER(IOReleaseCapture, void, void, NOREQ, NORES, NODROP)\ - HANDLER(IOIsKeyPressing, ::vl::presentation::VKEY, bool, REQ, RES, NODROP)\ - HANDLER(IOIsKeyToggled, ::vl::presentation::VKEY, bool, REQ, RES, NODROP)\ - HANDLER(WindowGetBounds, void, vl::presentation::remoteprotocol::WindowSizingConfig, NOREQ, RES, NODROP)\ - HANDLER(WindowNotifySetTitle, ::vl::WString, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetEnabled, bool, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetTopMost, bool, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetShowInTaskBar, bool, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetCustomFrameMode, bool, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetMaximizedBox, bool, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetMinimizedBox, bool, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetBorder, bool, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetSizeBox, bool, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetIconVisible, bool, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetTitleBar, bool, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetBounds, ::vl::presentation::NativeRect, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifySetClientSize, ::vl::presentation::NativeSize, void, REQ, NORES, DROPREP)\ - HANDLER(WindowNotifyActivate, void, void, NOREQ, NORES, DROPREP)\ - HANDLER(WindowNotifyShow, vl::presentation::remoteprotocol::WindowShowing, void, REQ, NORES, DROPREP)\ - -#define GACUI_REMOTEPROTOCOL_EVENTS(HANDLER)\ - HANDLER(ControllerConnect, void, NOREQ, NODROP)\ - HANDLER(ControllerDisconnect, void, NOREQ, NODROP)\ - HANDLER(ControllerRequestExit, void, NOREQ, NODROP)\ - HANDLER(ControllerForceExit, void, NOREQ, NODROP)\ - HANDLER(ControllerScreenUpdated, vl::presentation::remoteprotocol::ScreenConfig, REQ, DROPREP)\ - HANDLER(IOGlobalShortcutKey, ::vl::vint, REQ, NODROP)\ - HANDLER(IOButtonDown, vl::presentation::remoteprotocol::IOMouseInfoWithButton, REQ, NODROP)\ - HANDLER(IOButtonDoubleClick, vl::presentation::remoteprotocol::IOMouseInfoWithButton, REQ, NODROP)\ - HANDLER(IOButtonUp, vl::presentation::remoteprotocol::IOMouseInfoWithButton, REQ, NODROP)\ - HANDLER(IOHWheel, ::vl::presentation::NativeWindowMouseInfo, REQ, NODROP)\ - HANDLER(IOVWheel, ::vl::presentation::NativeWindowMouseInfo, REQ, NODROP)\ - HANDLER(IOMouseMoving, ::vl::presentation::NativeWindowMouseInfo, REQ, DROPCON)\ - HANDLER(IOMouseEntered, void, NOREQ, NODROP)\ - HANDLER(IOMouseLeaved, void, NOREQ, NODROP)\ - HANDLER(IOKeyDown, ::vl::presentation::NativeWindowKeyInfo, REQ, NODROP)\ - HANDLER(IOKeyUp, ::vl::presentation::NativeWindowKeyInfo, REQ, NODROP)\ - HANDLER(IOChar, ::vl::presentation::NativeWindowCharInfo, REQ, NODROP)\ - HANDLER(WindowBoundsUpdated, vl::presentation::remoteprotocol::WindowSizingConfig, REQ, DROPREP)\ - HANDLER(WindowActivatedUpdated, bool, REQ, DROPREP)\ - -} - -#endif - - -/*********************************************************************** -.\PLATFORMPROVIDERS\REMOTE\GUIREMOTEPROTOCOL.H -***********************************************************************/ -/*********************************************************************** -Vczh Library++ 3.0 -Developer: Zihan Chen(vczh) -GacUI::Remote Window - -Interfaces: - IGuiRemoteProtocol - -***********************************************************************/ - -#ifndef VCZH_PRESENTATION_GUIREMOTECONTROLLER_GUIREMOTEPROTOCOL -#define VCZH_PRESENTATION_GUIREMOTECONTROLLER_GUIREMOTEPROTOCOL - - -namespace vl::presentation -{ -/*********************************************************************** -IGuiRemoteProtocolEvents -***********************************************************************/ - - class IGuiRemoteProtocolEvents : public virtual Interface - { - public: -#define EVENT_NOREQ(NAME, REQUEST) virtual void On ## NAME() = 0; -#define EVENT_REQ(NAME, REQUEST) virtual void On ## NAME(const REQUEST& arguments) = 0; -#define EVENT_HANDLER(NAME, REQUEST, REQTAG, ...) EVENT_ ## REQTAG(NAME, REQUEST) - GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER) -#undef EVENT_HANDLER -#undef EVENT_REQ -#undef EVENT_NOREQ - -#define MESSAGE_NORES(NAME, RESPONSE) -#define MESSAGE_RES(NAME, RESPONSE) virtual void Respond ## NAME(vint id, const RESPONSE& arguments) = 0; -#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## RESTAG(NAME, RESPONSE) - GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) -#undef MESSAGE_HANDLER -#undef MESSAGE_RES -#undef MESSAGE_NORES - }; - -/*********************************************************************** -IGuiRemoteProtocolMessages -***********************************************************************/ - - class IGuiRemoteProtocolMessages : public virtual Interface - { - public: -#define MESSAGE_NOREQ_NORES(NAME, REQUEST, RESPONSE) virtual void Request ## NAME() = 0; -#define MESSAGE_NOREQ_RES(NAME, REQUEST, RESPONSE) virtual void Request ## NAME(vint id) = 0; -#define MESSAGE_REQ_NORES(NAME, REQUEST, RESPONSE) virtual void Request ## NAME(const REQUEST& arguments) = 0; -#define MESSAGE_REQ_RES(NAME, REQUEST, RESPONSE) virtual void Request ## NAME(vint id, const REQUEST& arguments) = 0; -#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## REQTAG ## _ ## RESTAG(NAME, REQUEST, RESPONSE) - GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) -#undef MESSAGE_HANDLER -#undef MESSAGE_REQ_RES -#undef MESSAGE_REQ_NORES -#undef MESSAGE_NOREQ_RES -#undef MESSAGE_NOREQ_NORES - }; - -/*********************************************************************** -IGuiRemoteProtocolConfig -***********************************************************************/ - - class IGuiRemoteProtocolConfig : public virtual Interface - { - public: - virtual WString GetExecutablePath() = 0; - }; - -/*********************************************************************** -IGuiRemoteProtocol -***********************************************************************/ - - class IGuiRemoteProtocol - : public virtual IGuiRemoteProtocolConfig - , public virtual IGuiRemoteProtocolMessages - { - public: - virtual void Initialize(IGuiRemoteProtocolEvents* events) = 0; - virtual void Submit() = 0; - virtual void ProcessRemoteEvents() = 0; - }; -} - -#endif - /*********************************************************************** .\RESOURCES\GUIPLUGINMANAGER.H ***********************************************************************/ @@ -10321,6 +9913,7 @@ Control Host void Closed()override; void Destroying()override; + void UpdateClientSize(Size value, bool updateNativeWindowOnly); virtual void UpdateClientSizeAfterRendering(Size preferredSize, Size clientSize); public: /// Create a control with a specified default theme. @@ -11869,8 +11462,8 @@ Elements struct ElementShape { ElementShapeType shapeType = ElementShapeType::Rectangle; - int radiusX = 0; - int radiusY = 0; + vint radiusX = 0; + vint radiusY = 0; GUI_DEFINE_COMPARE_OPERATORS(ElementShape) }; @@ -11880,7 +11473,8 @@ Elements /// class GuiFocusRectangleElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiFocusRectangleElement, L"FocusRectangle") + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"FocusRectangle"; protected: GuiFocusRectangleElement(); @@ -11892,7 +11486,8 @@ Elements /// class GuiSolidBorderElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiSolidBorderElement, L"SolidBorder") + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"SolidBorder"; protected: Color color; ElementShape shape; @@ -11926,7 +11521,8 @@ Elements /// class Gui3DBorderElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(Gui3DBorderElement, L"3DBorder") + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"3DBorder"; protected: Color color1; Color color2; @@ -11966,7 +11562,8 @@ Elements /// class Gui3DSplitterElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(Gui3DSplitterElement, L"3DSplitter") + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"3DSplitter"; public: /// /// Defines a direction of the . @@ -12029,7 +11626,8 @@ Elements /// class GuiSolidBackgroundElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiSolidBackgroundElement, L"SolidBackground") + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"SolidBackground"; protected: Color color; ElementShape shape; @@ -12037,14 +11635,14 @@ Elements GuiSolidBackgroundElement(); public: /// - /// Get the border color. + /// Get the background color. /// - /// The border color. + /// The background color. Color GetColor(); /// - /// Set the border color. + /// Set the background color. /// - /// The new border color. + /// The new background color. void SetColor(Color value); /// /// Get the shape. @@ -12063,7 +11661,8 @@ Elements /// class GuiGradientBackgroundElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiGradientBackgroundElement, L"GradientBackground") + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"GradientBackground"; public: /// /// Defines a direction of the . @@ -12141,7 +11740,8 @@ Elements /// class GuiInnerShadowElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiInnerShadowElement, L"InnerShadow") + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"InnerShadow"; protected: Color color; vint thickness = 0; @@ -12176,7 +11776,8 @@ Elements /// class GuiSolidLabelElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiSolidLabelElement, L"SolidLabel"); + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"SolidLabel"; protected: Color color; FontProperties fontProperties; @@ -12300,7 +11901,8 @@ Elements /// class GuiImageFrameElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiImageFrameElement, L"ImageFrame"); + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"ImageFrame"; protected: Ptr image; vint frameIndex; @@ -12393,9 +11995,10 @@ Elements /// class GuiPolygonElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiPolygonElement, L"Polygon"); + friend class GuiElementBase; typedef collections::Array PointArray; + static constexpr const wchar_t* ElementTypeName = L"Polygon"; protected: Size size; PointArray points; @@ -12506,7 +12109,8 @@ Rich Content Document (element) /// Defines a rich text document element for rendering complex styled document. class GuiDocumentElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiDocumentElement, L"RichDocument"); + friend class GuiElementBase; + static constexpr const wchar_t* ElementTypeName = L"RichDocument"; public: /// Callback interface for this element. class ICallback : public virtual IDescriptable, public Description @@ -12525,11 +12129,10 @@ Rich Content Document (element) virtual Size OnRenderEmbeddedObject(const WString& name, const Rect& location) = 0; }; - class GuiDocumentElementRenderer : public Object, public IGuiGraphicsRenderer, private IGuiGraphicsParagraphCallback + class GuiDocumentElementRenderer : public GuiElementRendererBase, private IGuiGraphicsParagraphCallback { friend class visitors::SetPropertiesVisitor; - - DEFINE_GUI_GRAPHICS_RENDERER(GuiDocumentElement, GuiDocumentElementRenderer, IGuiGraphicsRenderTarget) + friend class GuiElementRendererBase; protected: struct EmbeddedObject { @@ -13250,10 +12853,11 @@ Colorized Plain Text (element) /// class GuiColorizedTextElement : public GuiElementBase { - DEFINE_GUI_GRAPHICS_ELEMENT(GuiColorizedTextElement, L"ColorizedText"); - + friend class GuiElementBase; friend class text::TextLines; + typedef collections::Array ColorArray; + static constexpr const wchar_t* ElementTypeName = L"ColorizedText"; public: /// /// An callback interface. Member functions will be called when colors or fonts of a changed. @@ -18803,7 +18407,7 @@ ListViewColumnItemArranger ListViewColumnItemArranger* arranger = nullptr; void Layout_EndLayout(bool totalSizeUpdated) override; - Size Layout_CalculateTotalSize() override; + void Layout_CalculateTotalSize(Size& full, Size& minimum) override; public: ColumnItemArrangerRepeatComposition(ListViewColumnItemArranger* _arranger); }; @@ -20790,7 +20394,7 @@ GalleryItemArranger compositions::VirtualRepeatEndPlaceItemResult Layout_EndPlaceItem(bool firstPhase, Rect newBounds, vint newStartIndex)override; void Layout_EndLayout(bool totalSizeUpdated) override; void Layout_InvalidateItemSizeCache()override; - Size Layout_CalculateTotalSize()override; + void Layout_CalculateTotalSize(Size& full, Size& minimum)override; public: GalleryItemArrangerRepeatComposition(GuiBindableRibbonGalleryList* _owner); ~GalleryItemArrangerRepeatComposition(); @@ -21822,6 +21426,1652 @@ Interfaces: +#endif + +/*********************************************************************** +.\PLATFORMPROVIDERS\REMOTE\GUIREMOTEPROTOCOLSCHEMASHARED.H +***********************************************************************/ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Remote Window + +Interfaces: + IGuiRemoteProtocol + +***********************************************************************/ + +#ifndef VCZH_PRESENTATION_GUIREMOTECONTROLLER_REMOTEPROTOCOLSCHEMASHARED +#define VCZH_PRESENTATION_GUIREMOTECONTROLLER_REMOTEPROTOCOLSCHEMASHARED + + +namespace vl::presentation::remoteprotocol +{ + template + struct JsonHelper + { + static Ptr ToJson(const T& value); + static void ConvertJsonToCustomType(Ptr node, T& value); + }; + + template + Ptr ConvertCustomTypeToJson(const T& value) + { + return JsonHelper::ToJson(value); + } + + template<> Ptr ConvertCustomTypeToJson(const bool& value); + template<> Ptr ConvertCustomTypeToJson(const vint& value); + template<> Ptr ConvertCustomTypeToJson(const float& value); + template<> Ptr ConvertCustomTypeToJson(const double& value); + template<> Ptr ConvertCustomTypeToJson(const WString& value); + template<> Ptr ConvertCustomTypeToJson(const wchar_t& value); + template<> Ptr ConvertCustomTypeToJson(const VKEY& value); + template<> Ptr ConvertCustomTypeToJson(const Color& value); + + template + void ConvertJsonToCustomType(Ptr node, T& value) + { + return JsonHelper::FromJson(node, value); + } + + template<> void ConvertJsonToCustomType(Ptr node, bool& value); + template<> void ConvertJsonToCustomType(Ptr node, vint& value); + template<> void ConvertJsonToCustomType(Ptr node, float& value); + template<> void ConvertJsonToCustomType(Ptr node, double& value); + template<> void ConvertJsonToCustomType(Ptr node, WString& value); + template<> void ConvertJsonToCustomType(Ptr node, wchar_t& value); + template<> void ConvertJsonToCustomType(Ptr node, VKEY& value); + template<> void ConvertJsonToCustomType(Ptr node, Color& value); + + template + void ConvertCustomTypeToJsonField(Ptr node, const wchar_t* name, const T& value) + { + auto field = Ptr(new glr::json::JsonObjectField); + field->name.value = WString::Unmanaged(name); + field->value = ConvertCustomTypeToJson(value); + node->fields.Add(field); + } + + template + struct JsonHelper> + { + static Ptr ToJson(const Nullable& value) + { + if (!value) + { + auto node = Ptr(new glr::json::JsonLiteral); + node->value = glr::json::JsonLiteralValue::Null; + return node; + } + else + { + return ConvertCustomTypeToJson(value.Value()); + } + } + + static void FromJson(Ptr node, Nullable& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType(Ptr, Ptr>&)#" + if (auto jsonLiteral = node.Cast()) + { + if (jsonLiteral->value == glr::json::JsonLiteralValue::Null) + { + value.Reset(); + return; + } + else + { + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); + } + } + else + { + T item; + ConvertJsonToCustomType(node, item); + value = item; + } +#undef ERROR_MESSAGE_PREFIX + } + }; + + template + struct JsonHelper>> + { + static Ptr ToJson(const Ptr>& value) + { + if (!value) + { + auto node = Ptr(new glr::json::JsonLiteral); + node->value = glr::json::JsonLiteralValue::Null; + return node; + } + else + { + auto node = Ptr(new glr::json::JsonArray); + for (auto&& item : *value.Obj()) + { + node->items.Add(ConvertCustomTypeToJson(item)); + } + return node; + } + } + + static void FromJson(Ptr node, Ptr>& value) + { +#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::ConvertJsonToCustomType(Ptr, Ptr>&)#" + if (auto jsonLiteral = node.Cast()) + { + if (jsonLiteral->value == glr::json::JsonLiteralValue::Null) + { + value = {}; + return; + } + } + else if (auto jsonArray = node.Cast()) + { + value = Ptr(new collections::List); + for (auto jsonItem : jsonArray->items) + { + T item; + ConvertJsonToCustomType(jsonItem, item); + value->Add(std::move(item)); + } + return; + } + CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Json node does not match the expected type."); +#undef ERROR_MESSAGE_PREFIX + } + }; +} + +#endif + + +/*********************************************************************** +.\PLATFORMPROVIDERS\REMOTE\PROTOCOL\GENERATED\GUIREMOTEPROTOCOLSCHEMA.H +***********************************************************************/ +/*********************************************************************** +This file is generated by : Vczh GacUI Remote Protocol Generator +Licensed under https ://github.com/vczh-libraries/License +***********************************************************************/ + +#ifndef VCZH_PRESENTATION_GUIREMOTECONTROLLER_REMOTEPROTOCOLSCHEMA +#define VCZH_PRESENTATION_GUIREMOTECONTROLLER_REMOTEPROTOCOLSCHEMA + + +namespace vl::presentation::remoteprotocol +{ + enum class IOMouseButton + { + Left, + Middle, + Right, + }; + + enum class RendererType + { + FocusRectangle, + SolidBorder, + SinkBorder, + SinkSplitter, + SolidBackground, + GradientBackground, + InnerShadow, + SolidLabel, + Polygon, + UnsupportedImageFrame, + UnsupportedColorizedText, + UnsupportedDocument, + }; + + enum class ElementHorizontalAlignment + { + Left, + Right, + Center, + }; + + enum class ElementVerticalAlignment + { + Top, + Bottom, + Center, + }; + + enum class ElementSolidLabelMeasuringRequest + { + FontHeight, + TotalSize, + }; + + struct FontConfig + { + ::vl::presentation::FontProperties defaultFont; + ::vl::Ptr<::vl::collections::List<::vl::WString>> supportedFonts; + }; + + struct ScreenConfig + { + ::vl::presentation::NativeRect bounds; + ::vl::presentation::NativeRect clientBounds; + double scalingX; + double scalingY; + }; + + struct IOMouseInfoWithButton + { + ::vl::presentation::remoteprotocol::IOMouseButton button; + ::vl::presentation::NativeWindowMouseInfo info; + }; + + struct GlobalShortcutKey + { + ::vl::vint id; + bool ctrl; + bool shift; + bool alt; + ::vl::presentation::VKEY code; + }; + + struct WindowSizingConfig + { + ::vl::presentation::NativeRect bounds; + ::vl::presentation::NativeRect clientBounds; + ::vl::presentation::INativeWindow::WindowSizeState sizeState; + ::vl::presentation::NativeMargin customFramePadding; + }; + + struct WindowShowing + { + bool activate; + ::vl::presentation::INativeWindow::WindowSizeState sizeState; + }; + + struct ElementDesc_SolidBorder + { + ::vl::vint id; + ::vl::presentation::Color borderColor; + ::vl::presentation::elements::ElementShape shape; + }; + + struct ElementDesc_SinkBorder + { + ::vl::vint id; + ::vl::presentation::Color leftTopColor; + ::vl::presentation::Color rightBottomColor; + }; + + struct ElementDesc_SinkSplitter + { + ::vl::vint id; + ::vl::presentation::Color leftTopColor; + ::vl::presentation::Color rightBottomColor; + ::vl::presentation::elements::Gui3DSplitterElement::Direction direction; + }; + + struct ElementDesc_SolidBackground + { + ::vl::vint id; + ::vl::presentation::Color backgroundColor; + ::vl::presentation::elements::ElementShape shape; + }; + + struct ElementDesc_GradientBackground + { + ::vl::vint id; + ::vl::presentation::Color leftTopColor; + ::vl::presentation::Color rightBottomColor; + ::vl::presentation::elements::GuiGradientBackgroundElement::Direction direction; + ::vl::presentation::elements::ElementShape shape; + }; + + struct ElementDesc_InnerShadow + { + ::vl::vint id; + ::vl::presentation::Color shadowColor; + ::vl::vint thickness; + }; + + struct ElementDesc_Polygon + { + ::vl::vint id; + ::vl::presentation::Size size; + ::vl::presentation::Color borderColor; + ::vl::presentation::Color backgroundColor; + ::vl::Ptr<::vl::collections::List<::vl::presentation::Point>> points; + }; + + struct ElementDesc_SolidLabel + { + ::vl::vint id; + ::vl::presentation::Color textColor; + ::vl::presentation::remoteprotocol::ElementHorizontalAlignment horizontalAlignment; + ::vl::presentation::remoteprotocol::ElementVerticalAlignment verticalAlignment; + bool wrapLine; + bool wrapLineHeightCalculation; + bool ellipse; + bool multiline; + ::vl::Nullable<::vl::presentation::FontProperties> font; + ::vl::Nullable<::vl::WString> text; + ::vl::Nullable<::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest> measuringRequest; + }; + + struct RendererCreation + { + ::vl::vint id; + ::vl::presentation::remoteprotocol::RendererType type; + }; + + struct ElementRendering + { + ::vl::vint id; + ::vl::presentation::Rect bounds; + ::vl::presentation::Rect clipper; + }; + + struct ElementBoundary + { + ::vl::presentation::INativeWindowListener::HitTestResult hitTestResult; + ::vl::presentation::Rect bounds; + ::vl::presentation::Rect clipper; + }; + + struct ElementMeasuring_FontHeight + { + ::vl::WString fontFamily; + ::vl::vint fontSize; + ::vl::vint height; + }; + + struct ElementMeasuring_ElementMinSize + { + ::vl::vint id; + ::vl::presentation::Size minSize; + }; + + struct ElementMeasurings + { + ::vl::Ptr<::vl::collections::List<::vl::presentation::remoteprotocol::ElementMeasuring_FontHeight>> fontHeights; + ::vl::Ptr<::vl::collections::List<::vl::presentation::remoteprotocol::ElementMeasuring_ElementMinSize>> minSizes; + }; + + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::IOMouseButton>(const ::vl::presentation::remoteprotocol::IOMouseButton & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::INativeWindowListener::HitTestResult>(const ::vl::presentation::INativeWindowListener::HitTestResult & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::INativeCursor::SystemCursorType>(const ::vl::presentation::INativeCursor::SystemCursorType & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::INativeWindow::WindowSizeState>(const ::vl::presentation::INativeWindow::WindowSizeState & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::RendererType>(const ::vl::presentation::remoteprotocol::RendererType & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::elements::ElementShapeType>(const ::vl::presentation::elements::ElementShapeType & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::elements::GuiGradientBackgroundElement::Direction>(const ::vl::presentation::elements::GuiGradientBackgroundElement::Direction & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::elements::Gui3DSplitterElement::Direction>(const ::vl::presentation::elements::Gui3DSplitterElement::Direction & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementHorizontalAlignment>(const ::vl::presentation::remoteprotocol::ElementHorizontalAlignment & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementVerticalAlignment>(const ::vl::presentation::remoteprotocol::ElementVerticalAlignment & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest>(const ::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeCoordinate>(const ::vl::presentation::NativeCoordinate & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativePoint>(const ::vl::presentation::NativePoint & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeSize>(const ::vl::presentation::NativeSize & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeRect>(const ::vl::presentation::NativeRect & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeMargin>(const ::vl::presentation::NativeMargin & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::Point>(const ::vl::presentation::Point & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::Size>(const ::vl::presentation::Size & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::Rect>(const ::vl::presentation::Rect & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::FontProperties>(const ::vl::presentation::FontProperties & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::FontConfig>(const ::vl::presentation::remoteprotocol::FontConfig & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ScreenConfig>(const ::vl::presentation::remoteprotocol::ScreenConfig & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeWindowMouseInfo>(const ::vl::presentation::NativeWindowMouseInfo & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::IOMouseInfoWithButton>(const ::vl::presentation::remoteprotocol::IOMouseInfoWithButton & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeWindowKeyInfo>(const ::vl::presentation::NativeWindowKeyInfo & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::NativeWindowCharInfo>(const ::vl::presentation::NativeWindowCharInfo & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::GlobalShortcutKey>(const ::vl::presentation::remoteprotocol::GlobalShortcutKey & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::WindowSizingConfig>(const ::vl::presentation::remoteprotocol::WindowSizingConfig & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::WindowShowing>(const ::vl::presentation::remoteprotocol::WindowShowing & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::elements::ElementShape>(const ::vl::presentation::elements::ElementShape & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_SolidBorder>(const ::vl::presentation::remoteprotocol::ElementDesc_SolidBorder & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_SinkBorder>(const ::vl::presentation::remoteprotocol::ElementDesc_SinkBorder & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter>(const ::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_SolidBackground>(const ::vl::presentation::remoteprotocol::ElementDesc_SolidBackground & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_GradientBackground>(const ::vl::presentation::remoteprotocol::ElementDesc_GradientBackground & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_InnerShadow>(const ::vl::presentation::remoteprotocol::ElementDesc_InnerShadow & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_Polygon>(const ::vl::presentation::remoteprotocol::ElementDesc_Polygon & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementDesc_SolidLabel>(const ::vl::presentation::remoteprotocol::ElementDesc_SolidLabel & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::RendererCreation>(const ::vl::presentation::remoteprotocol::RendererCreation & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementRendering>(const ::vl::presentation::remoteprotocol::ElementRendering & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementBoundary>(const ::vl::presentation::remoteprotocol::ElementBoundary & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementMeasuring_FontHeight>(const ::vl::presentation::remoteprotocol::ElementMeasuring_FontHeight & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementMeasuring_ElementMinSize>(const ::vl::presentation::remoteprotocol::ElementMeasuring_ElementMinSize & value); + template<> vl::Ptr ConvertCustomTypeToJson<::vl::presentation::remoteprotocol::ElementMeasurings>(const ::vl::presentation::remoteprotocol::ElementMeasurings & value); + + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::IOMouseButton>(vl::Ptr node, ::vl::presentation::remoteprotocol::IOMouseButton& value); + template<> void ConvertJsonToCustomType<::vl::presentation::INativeWindowListener::HitTestResult>(vl::Ptr node, ::vl::presentation::INativeWindowListener::HitTestResult& value); + template<> void ConvertJsonToCustomType<::vl::presentation::INativeCursor::SystemCursorType>(vl::Ptr node, ::vl::presentation::INativeCursor::SystemCursorType& value); + template<> void ConvertJsonToCustomType<::vl::presentation::INativeWindow::WindowSizeState>(vl::Ptr node, ::vl::presentation::INativeWindow::WindowSizeState& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::RendererType>(vl::Ptr node, ::vl::presentation::remoteprotocol::RendererType& value); + template<> void ConvertJsonToCustomType<::vl::presentation::elements::ElementShapeType>(vl::Ptr node, ::vl::presentation::elements::ElementShapeType& value); + template<> void ConvertJsonToCustomType<::vl::presentation::elements::GuiGradientBackgroundElement::Direction>(vl::Ptr node, ::vl::presentation::elements::GuiGradientBackgroundElement::Direction& value); + template<> void ConvertJsonToCustomType<::vl::presentation::elements::Gui3DSplitterElement::Direction>(vl::Ptr node, ::vl::presentation::elements::Gui3DSplitterElement::Direction& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementHorizontalAlignment>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementHorizontalAlignment& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementVerticalAlignment>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementVerticalAlignment& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementSolidLabelMeasuringRequest& value); + template<> void ConvertJsonToCustomType<::vl::presentation::NativeCoordinate>(vl::Ptr node, ::vl::presentation::NativeCoordinate& value); + template<> void ConvertJsonToCustomType<::vl::presentation::NativePoint>(vl::Ptr node, ::vl::presentation::NativePoint& value); + template<> void ConvertJsonToCustomType<::vl::presentation::NativeSize>(vl::Ptr node, ::vl::presentation::NativeSize& value); + template<> void ConvertJsonToCustomType<::vl::presentation::NativeRect>(vl::Ptr node, ::vl::presentation::NativeRect& value); + template<> void ConvertJsonToCustomType<::vl::presentation::NativeMargin>(vl::Ptr node, ::vl::presentation::NativeMargin& value); + template<> void ConvertJsonToCustomType<::vl::presentation::Point>(vl::Ptr node, ::vl::presentation::Point& value); + template<> void ConvertJsonToCustomType<::vl::presentation::Size>(vl::Ptr node, ::vl::presentation::Size& value); + template<> void ConvertJsonToCustomType<::vl::presentation::Rect>(vl::Ptr node, ::vl::presentation::Rect& value); + template<> void ConvertJsonToCustomType<::vl::presentation::FontProperties>(vl::Ptr node, ::vl::presentation::FontProperties& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::FontConfig>(vl::Ptr node, ::vl::presentation::remoteprotocol::FontConfig& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ScreenConfig>(vl::Ptr node, ::vl::presentation::remoteprotocol::ScreenConfig& value); + template<> void ConvertJsonToCustomType<::vl::presentation::NativeWindowMouseInfo>(vl::Ptr node, ::vl::presentation::NativeWindowMouseInfo& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::IOMouseInfoWithButton>(vl::Ptr node, ::vl::presentation::remoteprotocol::IOMouseInfoWithButton& value); + template<> void ConvertJsonToCustomType<::vl::presentation::NativeWindowKeyInfo>(vl::Ptr node, ::vl::presentation::NativeWindowKeyInfo& value); + template<> void ConvertJsonToCustomType<::vl::presentation::NativeWindowCharInfo>(vl::Ptr node, ::vl::presentation::NativeWindowCharInfo& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::GlobalShortcutKey>(vl::Ptr node, ::vl::presentation::remoteprotocol::GlobalShortcutKey& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::WindowSizingConfig>(vl::Ptr node, ::vl::presentation::remoteprotocol::WindowSizingConfig& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::WindowShowing>(vl::Ptr node, ::vl::presentation::remoteprotocol::WindowShowing& value); + template<> void ConvertJsonToCustomType<::vl::presentation::elements::ElementShape>(vl::Ptr node, ::vl::presentation::elements::ElementShape& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SolidBorder>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_SolidBorder& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SinkBorder>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_SinkBorder& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SolidBackground>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_SolidBackground& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_GradientBackground>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_GradientBackground& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_InnerShadow>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_InnerShadow& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_Polygon>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_Polygon& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementDesc_SolidLabel>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementDesc_SolidLabel& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::RendererCreation>(vl::Ptr node, ::vl::presentation::remoteprotocol::RendererCreation& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementRendering>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementRendering& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementBoundary>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementBoundary& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementMeasuring_FontHeight>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementMeasuring_FontHeight& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementMeasuring_ElementMinSize>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementMeasuring_ElementMinSize& value); + template<> void ConvertJsonToCustomType<::vl::presentation::remoteprotocol::ElementMeasurings>(vl::Ptr node, ::vl::presentation::remoteprotocol::ElementMeasurings& value); + +#define GACUI_REMOTEPROTOCOL_MESSAGES(HANDLER)\ + HANDLER(ControllerGetFontConfig, void, ::vl::presentation::remoteprotocol::FontConfig, NOREQ, RES, NODROP)\ + HANDLER(ControllerGetScreenConfig, void, ::vl::presentation::remoteprotocol::ScreenConfig, NOREQ, RES, NODROP)\ + HANDLER(ControllerConnectionEstablished, void, void, NOREQ, NORES, NODROP)\ + HANDLER(ControllerConnectionStopped, void, void, NOREQ, NORES, NODROP)\ + HANDLER(IOUpdateGlobalShortcutKey, ::vl::Ptr<::vl::collections::List<::vl::presentation::remoteprotocol::GlobalShortcutKey>>, void, REQ, NORES, NODROP)\ + HANDLER(IORequireCapture, void, void, NOREQ, NORES, NODROP)\ + HANDLER(IOReleaseCapture, void, void, NOREQ, NORES, NODROP)\ + HANDLER(IOIsKeyPressing, ::vl::presentation::VKEY, bool, REQ, RES, NODROP)\ + HANDLER(IOIsKeyToggled, ::vl::presentation::VKEY, bool, REQ, RES, NODROP)\ + HANDLER(WindowGetBounds, void, ::vl::presentation::remoteprotocol::WindowSizingConfig, NOREQ, RES, NODROP)\ + HANDLER(WindowNotifySetTitle, ::vl::WString, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetEnabled, bool, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetTopMost, bool, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetShowInTaskBar, bool, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetCustomFrameMode, bool, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetMaximizedBox, bool, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetMinimizedBox, bool, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetBorder, bool, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetSizeBox, bool, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetIconVisible, bool, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetTitleBar, bool, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetBounds, ::vl::presentation::NativeRect, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifySetClientSize, ::vl::presentation::NativeSize, void, REQ, NORES, DROPREP)\ + HANDLER(WindowNotifyActivate, void, void, NOREQ, NORES, DROPREP)\ + HANDLER(WindowNotifyShow, ::vl::presentation::remoteprotocol::WindowShowing, void, REQ, NORES, DROPREP)\ + HANDLER(RendererCreated, ::vl::Ptr<::vl::collections::List<::vl::presentation::remoteprotocol::RendererCreation>>, void, REQ, NORES, NODROP)\ + HANDLER(RendererDestroyed, ::vl::Ptr<::vl::collections::List<::vl::vint>>, void, REQ, NORES, NODROP)\ + HANDLER(RendererUpdateElement_SolidBorder, ::vl::presentation::remoteprotocol::ElementDesc_SolidBorder, void, REQ, NORES, NODROP)\ + HANDLER(RendererUpdateElement_SinkBorder, ::vl::presentation::remoteprotocol::ElementDesc_SinkBorder, void, REQ, NORES, NODROP)\ + HANDLER(RendererUpdateElement_SinkSplitter, ::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter, void, REQ, NORES, NODROP)\ + HANDLER(RendererUpdateElement_SolidBackground, ::vl::presentation::remoteprotocol::ElementDesc_SolidBackground, void, REQ, NORES, NODROP)\ + HANDLER(RendererUpdateElement_GradientBackground, ::vl::presentation::remoteprotocol::ElementDesc_GradientBackground, void, REQ, NORES, NODROP)\ + HANDLER(RendererUpdateElement_InnerShadow, ::vl::presentation::remoteprotocol::ElementDesc_InnerShadow, void, REQ, NORES, NODROP)\ + HANDLER(RendererUpdateElement_Polygon, ::vl::presentation::remoteprotocol::ElementDesc_Polygon, void, REQ, NORES, NODROP)\ + HANDLER(RendererUpdateElement_SolidLabel, ::vl::presentation::remoteprotocol::ElementDesc_SolidLabel, void, REQ, NORES, NODROP)\ + HANDLER(RendererBeginRendering, void, void, NOREQ, NORES, NODROP)\ + HANDLER(RendererBeginBoundary, ::vl::presentation::remoteprotocol::ElementBoundary, void, REQ, NORES, NODROP)\ + HANDLER(RendererRenderElement, ::vl::presentation::remoteprotocol::ElementRendering, void, REQ, NORES, NODROP)\ + HANDLER(RendererEndBoundary, void, void, NOREQ, NORES, NODROP)\ + HANDLER(RendererEndRendering, void, ::vl::presentation::remoteprotocol::ElementMeasurings, NOREQ, RES, NODROP)\ + +#define GACUI_REMOTEPROTOCOL_EVENTS(HANDLER)\ + HANDLER(ControllerConnect, void, NOREQ, NODROP)\ + HANDLER(ControllerDisconnect, void, NOREQ, NODROP)\ + HANDLER(ControllerRequestExit, void, NOREQ, NODROP)\ + HANDLER(ControllerForceExit, void, NOREQ, NODROP)\ + HANDLER(ControllerScreenUpdated, ::vl::presentation::remoteprotocol::ScreenConfig, REQ, DROPREP)\ + HANDLER(IOGlobalShortcutKey, ::vl::vint, REQ, NODROP)\ + HANDLER(IOButtonDown, ::vl::presentation::remoteprotocol::IOMouseInfoWithButton, REQ, NODROP)\ + HANDLER(IOButtonDoubleClick, ::vl::presentation::remoteprotocol::IOMouseInfoWithButton, REQ, NODROP)\ + HANDLER(IOButtonUp, ::vl::presentation::remoteprotocol::IOMouseInfoWithButton, REQ, NODROP)\ + HANDLER(IOHWheel, ::vl::presentation::NativeWindowMouseInfo, REQ, NODROP)\ + HANDLER(IOVWheel, ::vl::presentation::NativeWindowMouseInfo, REQ, NODROP)\ + HANDLER(IOMouseMoving, ::vl::presentation::NativeWindowMouseInfo, REQ, DROPCON)\ + HANDLER(IOMouseEntered, void, NOREQ, NODROP)\ + HANDLER(IOMouseLeaved, void, NOREQ, NODROP)\ + HANDLER(IOKeyDown, ::vl::presentation::NativeWindowKeyInfo, REQ, NODROP)\ + HANDLER(IOKeyUp, ::vl::presentation::NativeWindowKeyInfo, REQ, NODROP)\ + HANDLER(IOChar, ::vl::presentation::NativeWindowCharInfo, REQ, NODROP)\ + HANDLER(WindowBoundsUpdated, ::vl::presentation::remoteprotocol::WindowSizingConfig, REQ, DROPREP)\ + HANDLER(WindowActivatedUpdated, bool, REQ, DROPREP)\ + +#define GACUI_REMOTEPROTOCOL_MESSAGE_REQUEST_TYPES(HANDLER)\ + HANDLER(::vl::Ptr<::vl::collections::List<::vl::presentation::remoteprotocol::GlobalShortcutKey>>)\ + HANDLER(::vl::Ptr<::vl::collections::List<::vl::presentation::remoteprotocol::RendererCreation>>)\ + HANDLER(::vl::Ptr<::vl::collections::List<::vl::vint>>)\ + HANDLER(::vl::WString)\ + HANDLER(::vl::presentation::NativeRect)\ + HANDLER(::vl::presentation::NativeSize)\ + HANDLER(::vl::presentation::VKEY)\ + HANDLER(::vl::presentation::remoteprotocol::ElementBoundary)\ + HANDLER(::vl::presentation::remoteprotocol::ElementDesc_GradientBackground)\ + HANDLER(::vl::presentation::remoteprotocol::ElementDesc_InnerShadow)\ + HANDLER(::vl::presentation::remoteprotocol::ElementDesc_Polygon)\ + HANDLER(::vl::presentation::remoteprotocol::ElementDesc_SinkBorder)\ + HANDLER(::vl::presentation::remoteprotocol::ElementDesc_SinkSplitter)\ + HANDLER(::vl::presentation::remoteprotocol::ElementDesc_SolidBackground)\ + HANDLER(::vl::presentation::remoteprotocol::ElementDesc_SolidBorder)\ + HANDLER(::vl::presentation::remoteprotocol::ElementDesc_SolidLabel)\ + HANDLER(::vl::presentation::remoteprotocol::ElementRendering)\ + HANDLER(::vl::presentation::remoteprotocol::WindowShowing)\ + HANDLER(bool)\ + +#define GACUI_REMOTEPROTOCOL_MESSAGE_RESPONSE_TYPES(HANDLER)\ + HANDLER(::vl::presentation::remoteprotocol::ElementMeasurings)\ + HANDLER(::vl::presentation::remoteprotocol::FontConfig)\ + HANDLER(::vl::presentation::remoteprotocol::ScreenConfig)\ + HANDLER(::vl::presentation::remoteprotocol::WindowSizingConfig)\ + HANDLER(bool)\ + +#define GACUI_REMOTEPROTOCOL_EVENT_REQUEST_TYPES(HANDLER)\ + HANDLER(::vl::presentation::NativeWindowCharInfo)\ + HANDLER(::vl::presentation::NativeWindowKeyInfo)\ + HANDLER(::vl::presentation::NativeWindowMouseInfo)\ + HANDLER(::vl::presentation::remoteprotocol::IOMouseInfoWithButton)\ + HANDLER(::vl::presentation::remoteprotocol::ScreenConfig)\ + HANDLER(::vl::presentation::remoteprotocol::WindowSizingConfig)\ + HANDLER(::vl::vint)\ + HANDLER(bool)\ + +} + +#endif + + +/*********************************************************************** +.\PLATFORMPROVIDERS\REMOTE\GUIREMOTEGRAPHICS.H +***********************************************************************/ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Remote Window + +Interfaces: + GuiRemoteController + +***********************************************************************/ + +#ifndef VCZH_PRESENTATION_GUIREMOTEGRAPHICS +#define VCZH_PRESENTATION_GUIREMOTEGRAPHICS + + +namespace vl::presentation +{ + class GuiHostedController; + class GuiRemoteController; + class GuiRemoteMessages; + + namespace elements_remoteprotocol + { + class IGuiRemoteProtocolElementRender; + } + + namespace elements + { +/*********************************************************************** +GuiRemoteGraphicsRenderTarget +***********************************************************************/ + + class GuiRemoteGraphicsRenderTarget : public GuiGraphicsRenderTarget + { + using RendererMap = collections::Dictionary; + using RendererSet = collections::SortedList; + using FontHeightMap = collections::Dictionary, vint>; + using HitTestResult = INativeWindowListener::HitTestResult; + protected: + GuiRemoteController* remote; + GuiHostedController* hostedController; + NativeSize canvasSize; + vint usedElementIds = 0; + RendererMap renderers; + collections::SortedList createdRenderers; + collections::SortedList destroyedRenderers; + RendererSet renderersAskingForCache; + Nullable clipperValidArea; + collections::List hitTestResults; + + HitTestResult GetHitTestResultFromGenerator(reflection::DescriptableObject* generator); + + void StartRenderingOnNativeWindow() override; + RenderTargetFailure StopRenderingOnNativeWindow() override; + + Size GetCanvasSize() override; + void AfterPushedClipper(Rect clipper, Rect validArea, reflection::DescriptableObject* generator) override; + void AfterPushedClipperAndBecameInvalid(Rect clipper, reflection::DescriptableObject* generator) override; + void AfterPoppedClipperAndBecameValid(Rect validArea, bool clipperExists, reflection::DescriptableObject* generator) override; + void AfterPoppedClipper(Rect validArea, bool clipperExists, reflection::DescriptableObject* generator) override; + + public: + FontHeightMap fontHeights; + vuint64_t renderingBatchId = 0; + + GuiRemoteGraphicsRenderTarget(GuiRemoteController* _remote, GuiHostedController* _hostedController); + ~GuiRemoteGraphicsRenderTarget(); + + void OnControllerConnect(); + void OnControllerDisconnect(); + + GuiRemoteMessages& GetRemoteMessages(); + vint AllocateNewElementId(); + void RegisterRenderer(elements_remoteprotocol::IGuiRemoteProtocolElementRender* renderer); + void UnregisterRenderer(elements_remoteprotocol::IGuiRemoteProtocolElementRender* renderer); + Rect GetClipperValidArea(); + }; + +/*********************************************************************** +GuiRemoteGraphicsResourceManager +***********************************************************************/ + + class GuiRemoteGraphicsResourceManager : public GuiGraphicsResourceManager + { + protected: + GuiRemoteController* remote; + GuiRemoteGraphicsRenderTarget renderTarget; + GuiHostedController* hostedController; + + public: + GuiRemoteGraphicsResourceManager(GuiRemoteController* _remote, GuiHostedController* _hostedController); + ~GuiRemoteGraphicsResourceManager(); + + void Initialize(); + void Finalize(); + + void OnControllerConnect(); + void OnControllerDisconnect(); + + // ============================================================= + // IGuiGraphicsResourceManager + // ============================================================= + + IGuiGraphicsRenderTarget* GetRenderTarget(INativeWindow* window) override; + void RecreateRenderTarget(INativeWindow* window) override; + void ResizeRenderTarget(INativeWindow* window) override; + IGuiGraphicsLayoutProvider* GetLayoutProvider() override; + }; + } +} + +#endif + +/*********************************************************************** +.\PLATFORMPROVIDERS\REMOTE\GUIREMOTEGRAPHICS_BASICELEMENTS.H +***********************************************************************/ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Remote Window + +Interfaces: +***********************************************************************/ + +#ifndef VCZH_PRESENTATION_GUIREMOTEGRAPHICS_BASICELEMENTS +#define VCZH_PRESENTATION_GUIREMOTEGRAPHICS_BASICELEMENTS + + +namespace vl::presentation::elements_remoteprotocol +{ + using namespace elements; + + class IGuiRemoteProtocolElementRender : public virtual Interface + { + public: + virtual IGuiGraphicsRenderer* GetRenderer() = 0; + virtual vint GetID() = 0; + virtual remoteprotocol::RendererType GetRendererType() = 0; + virtual bool IsUpdated() = 0; + virtual void ResetUpdated() = 0; + virtual void SendUpdateElementMessages(bool fullContent) = 0; + virtual bool IsRenderedInLastBatch() = 0; + + virtual bool NeedUpdateMinSizeFromCache() = 0; + virtual void TryFetchMinSizeFromCache() = 0; + virtual void UpdateMinSize(Size size) = 0; + virtual void NotifyMinSizeCacheInvalidated() = 0; + }; + + template + class GuiRemoteProtocolElementRenderer + : public GuiElementRendererBase + , public virtual IGuiRemoteProtocolElementRender + { + protected: + vint id = -1; + vuint64_t renderingBatchId = 0; + bool updated = true; + + void InitializeInternal(); + void FinalizeInternal(); + void RenderTargetChangedInternal(GuiRemoteGraphicsRenderTarget* oldRenderTarget, GuiRemoteGraphicsRenderTarget* newRenderTarget); + public: + // IGuiRemoteProtocolElementRender + IGuiGraphicsRenderer* GetRenderer() override; + vint GetID() override; + remoteprotocol::RendererType GetRendererType() override; + bool IsUpdated() override; + void ResetUpdated() override; + bool IsRenderedInLastBatch() override; + + bool NeedUpdateMinSizeFromCache() override; + void TryFetchMinSizeFromCache() override; + void UpdateMinSize(Size size) override; + void NotifyMinSizeCacheInvalidated() override; + + // IGuiGraphicsRenderer + void Render(Rect bounds) override; + void OnElementStateChanged() override; + }; + + class GuiFocusRectangleElementRenderer : public GuiRemoteProtocolElementRenderer + { + friend class GuiElementRendererBase; + public: + GuiFocusRectangleElementRenderer(); + + bool IsUpdated() override; + void ResetUpdated() override; + void SendUpdateElementMessages(bool fullContent) override; + void OnElementStateChanged() override; + }; + + class GuiSolidBorderElementRenderer : public GuiRemoteProtocolElementRenderer + { + friend class GuiElementRendererBase; + public: + GuiSolidBorderElementRenderer(); + + void SendUpdateElementMessages(bool fullContent) override; + }; + + class Gui3DBorderElementRenderer : public GuiRemoteProtocolElementRenderer + { + friend class GuiElementRendererBase; + public: + Gui3DBorderElementRenderer(); + + void SendUpdateElementMessages(bool fullContent) override; + }; + + class Gui3DSplitterElementRenderer : public GuiRemoteProtocolElementRenderer + { + friend class GuiElementRendererBase; + public: + Gui3DSplitterElementRenderer(); + + void SendUpdateElementMessages(bool fullContent) override; + }; + + class GuiSolidBackgroundElementRenderer : public GuiRemoteProtocolElementRenderer + { + friend class GuiElementRendererBase; + public: + GuiSolidBackgroundElementRenderer(); + + void SendUpdateElementMessages(bool fullContent) override; + }; + + class GuiGradientBackgroundElementRenderer : public GuiRemoteProtocolElementRenderer + { + friend class GuiElementRendererBase; + public: + GuiGradientBackgroundElementRenderer(); + + void SendUpdateElementMessages(bool fullContent) override; + }; + + class GuiInnerShadowElementRenderer : public GuiRemoteProtocolElementRenderer + { + friend class GuiElementRendererBase; + public: + GuiInnerShadowElementRenderer(); + + void SendUpdateElementMessages(bool fullContent) override; + }; + + class GuiSolidLabelElementRenderer : public GuiRemoteProtocolElementRenderer + { + friend class GuiElementRendererBase; + using MeasuringRequest = Nullable; + protected: + FontProperties lastFont; + WString lastText; + bool needFontHeight = false; + + MeasuringRequest GetMeasuringRequest(); + bool IsNeedFontHeight(MeasuringRequest request); + public: + GuiSolidLabelElementRenderer(); + + bool NeedUpdateMinSizeFromCache() override; + void TryFetchMinSizeFromCache() override; + void UpdateMinSize(Size size) override; + void NotifyMinSizeCacheInvalidated() override; + + void SendUpdateElementMessages(bool fullContent) override; + }; + + class GuiImageFrameElementRenderer : public GuiRemoteProtocolElementRenderer + { + friend class GuiElementRendererBase; + public: + GuiImageFrameElementRenderer(); + + void SendUpdateElementMessages(bool fullContent) override; + }; + + class GuiPolygonElementRenderer : public GuiRemoteProtocolElementRenderer + { + friend class GuiElementRendererBase; + public: + GuiPolygonElementRenderer(); + + void SendUpdateElementMessages(bool fullContent) override; + }; + + class GuiColorizedTextElementRenderer : public GuiRemoteProtocolElementRenderer, protected GuiColorizedTextElement::ICallback + { + friend class GuiElementRendererBase; + using TBase = GuiRemoteProtocolElementRenderer; + protected: + void ColorChanged() override; + void FontChanged() override; + void InitializeInternal(); + void FinalizeInternal(); + public: + GuiColorizedTextElementRenderer(); + + void OnElementStateChanged() override; + void SendUpdateElementMessages(bool fullContent) override; + }; +} + +#endif + +/*********************************************************************** +.\PLATFORMPROVIDERS\REMOTE\GUIREMOTEPROTOCOL.H +***********************************************************************/ +/*********************************************************************** +Vczh Library++ 3.0 +Developer: Zihan Chen(vczh) +GacUI::Remote Window + +Interfaces: + IGuiRemoteProtocol + +***********************************************************************/ + +#ifndef VCZH_PRESENTATION_GUIREMOTECONTROLLER_GUIREMOTEPROTOCOL +#define VCZH_PRESENTATION_GUIREMOTECONTROLLER_GUIREMOTEPROTOCOL + + +namespace vl::presentation +{ +/*********************************************************************** +IGuiRemoteProtocolEvents +***********************************************************************/ + + class IGuiRemoteProtocolEvents : public virtual Interface + { + public: +#define EVENT_NOREQ(NAME, REQUEST) virtual void On ## NAME() = 0; +#define EVENT_REQ(NAME, REQUEST) virtual void On ## NAME(const REQUEST& arguments) = 0; +#define EVENT_HANDLER(NAME, REQUEST, REQTAG, ...) EVENT_ ## REQTAG(NAME, REQUEST) + GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER) +#undef EVENT_HANDLER +#undef EVENT_REQ +#undef EVENT_NOREQ + +#define MESSAGE_NORES(NAME, RESPONSE) +#define MESSAGE_RES(NAME, RESPONSE) virtual void Respond ## NAME(vint id, const RESPONSE& arguments) = 0; +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## RESTAG(NAME, RESPONSE) + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) +#undef MESSAGE_HANDLER +#undef MESSAGE_RES +#undef MESSAGE_NORES + }; + +/*********************************************************************** +IGuiRemoteProtocolMessages +***********************************************************************/ + + class IGuiRemoteProtocolMessages : public virtual Interface + { + public: +#define MESSAGE_NOREQ_NORES(NAME, REQUEST, RESPONSE) virtual void Request ## NAME() = 0; +#define MESSAGE_NOREQ_RES(NAME, REQUEST, RESPONSE) virtual void Request ## NAME(vint id) = 0; +#define MESSAGE_REQ_NORES(NAME, REQUEST, RESPONSE) virtual void Request ## NAME(const REQUEST& arguments) = 0; +#define MESSAGE_REQ_RES(NAME, REQUEST, RESPONSE) virtual void Request ## NAME(vint id, const REQUEST& arguments) = 0; +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## REQTAG ## _ ## RESTAG(NAME, REQUEST, RESPONSE) + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) +#undef MESSAGE_HANDLER +#undef MESSAGE_REQ_RES +#undef MESSAGE_REQ_NORES +#undef MESSAGE_NOREQ_RES +#undef MESSAGE_NOREQ_NORES + }; + +/*********************************************************************** +IGuiRemoteProtocolConfig +***********************************************************************/ + + class IGuiRemoteProtocolConfig : public virtual Interface + { + public: + virtual WString GetExecutablePath() = 0; + }; + +/*********************************************************************** +IGuiRemoteProtocol +***********************************************************************/ + + class IGuiRemoteProtocol + : public virtual IGuiRemoteProtocolConfig + , public virtual IGuiRemoteProtocolMessages + { + public: + virtual void Initialize(IGuiRemoteProtocolEvents* events) = 0; + virtual void Submit() = 0; + virtual void ProcessRemoteEvents() = 0; + }; +} + +namespace vl::presentation::remoteprotocol::repeatfiltering +{ + using FilteredRequestTypes = Variant; + + using FilteredResponseTypes = Variant; + + using FilteredEventTypes = Variant; + + enum class FilteredRequestNames + { + Unknown, +#define FILTERED_ENUM_ITEM(NAME, ...) NAME, + GACUI_REMOTEPROTOCOL_MESSAGES(FILTERED_ENUM_ITEM) +#undef FILTERED_ENUM_ITEM + }; + + enum class FilteredResponseNames + { + Unknown, +#define FILTERED_ENUM_ITEM_NORES(NAME) +#define FILTERED_ENUM_ITEM_RES(NAME) NAME, +#define FILTERED_ENUN_ITEM(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) FILTERED_ENUM_ITEM_ ## RESTAG(NAME) + GACUI_REMOTEPROTOCOL_MESSAGES(FILTERED_ENUN_ITEM) +#undef FILTERED_ENUM_ITEM +#undef FILTERED_ENUM_ITEM_RES +#undef FILTERED_ENUM_ITEM_NORES + }; + + enum class FilteredEventNames + { + Unknown, +#define FILTERED_ENUM_ITEM(NAME, ...) NAME, + GACUI_REMOTEPROTOCOL_EVENTS(FILTERED_ENUM_ITEM) +#undef FILTERED_ENUM_ITEM + }; + + struct FilteredRequest + { + bool dropped = false; + vint id = -1; + FilteredRequestNames name = FilteredRequestNames::Unknown; + FilteredRequestTypes arguments; + }; + + struct FilteredResponse + { + vint id = -1; + FilteredResponseNames name = FilteredResponseNames::Unknown; + FilteredResponseTypes arguments; + }; + + struct FilteredEvent + { + bool dropped = false; + vint id = -1; + FilteredEventNames name = FilteredEventNames::Unknown; + FilteredEventTypes arguments; + }; + +/*********************************************************************** +GuiRemoteEventFilter +***********************************************************************/ + + class GuiRemoteEventFilter + : public Object + , public virtual IGuiRemoteProtocolEvents + { + protected: + collections::List filteredResponses; + collections::List filteredEvents; + +#define EVENT_NODROP(NAME) +#define EVENT_DROPREP(NAME) vint lastDropRepeatEvent ## NAME = -1; +#define EVENT_DROPCON(NAME) vint lastDropConsecutiveEvent ## NAME = -1; +#define EVENT_HANDLER(NAME, REQUEST, REQTAG, DROPTAG, ...) EVENT_ ## DROPTAG(NAME) + GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER) +#undef EVENT_HANDLER +#undef EVENT_DROPCON +#undef EVENT_DROPREP +#undef EVENT_NODROP + + public: + IGuiRemoteProtocolEvents* targetEvents = nullptr; + bool submitting = false; + collections::Dictionary responseIds; + + void ProcessResponses() + { + for (auto&& response : filteredResponses) + { +#define MESSAGE_NORES(NAME, RESPONSE) +#define MESSAGE_RES(NAME, RESPONSE)\ + case FilteredResponseNames::NAME:\ + targetEvents->Respond ## NAME(response.id, response.arguments.Get());\ + break;\ + +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## RESTAG(NAME, RESPONSE) + switch (response.name) + { + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) + default: + CHECK_FAIL(L"vl::presentation::remoteprotocol::GuiRemoteEventFilter::ProcessResponses()#Unrecognized response."); + } +#undef MESSAGE_HANDLER +#undef MESSAGE_RES +#undef MESSAGE_NORES + } + + filteredResponses.Clear(); + } + + void ProcessEvents() + { +#define EVENT_NODROP(NAME) +#define EVENT_DROPREP(NAME) lastDropRepeatEvent ## NAME = -1; +#define EVENT_DROPCON(NAME) lastDropConsecutiveEvent ## NAME = -1; +#define EVENT_HANDLER(NAME, REQUEST, REQTAG, DROPTAG, ...) EVENT_ ## DROPTAG(NAME) + GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER) +#undef EVENT_HANDLER +#undef EVENT_DROPCON +#undef EVENT_DROPREP +#undef EVENT_NODROP + + collections::List events(std::move(filteredEvents)); + + for (auto&& event : events) + { + if (event.dropped) + { + continue; + } + +#define EVENT_NOREQ(NAME, REQUEST)\ + case FilteredEventNames::NAME:\ + targetEvents->On ## NAME();\ + break;\ + +#define EVENT_REQ(NAME, REQUEST)\ + case FilteredEventNames::NAME:\ + targetEvents->On ## NAME(event.arguments.Get());\ + break;\ + +#define EVENT_HANDLER(NAME, REQUEST, REQTAG, ...) EVENT_ ## REQTAG(NAME, REQUEST) + switch (event.name) + { + GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER) + default: + CHECK_FAIL(L"vl::presentation::remoteprotocol::GuiRemoteEventFilter::ProcessEvents()#Unrecognized event."); + } +#undef EVENT_HANDLER +#undef EVENT_REQ +#undef EVENT_NOREQ + } + } + + // responses + +#define MESSAGE_NORES(NAME, RESPONSE) +#define MESSAGE_RES(NAME, RESPONSE)\ + void Respond ## NAME(vint id, const RESPONSE& arguments) override\ + {\ + CHECK_ERROR(\ + responseIds[id] == FilteredResponseNames::NAME,\ + L"vl::presentation::remoteprotocol::GuiRemoteEventFilter::"\ + L"Respond" L ## #NAME L"()#"\ + L"Messages sending to IGuiRemoteProtocol should be responded by calling the correct function.");\ + responseIds.Remove(id);\ + FilteredResponse response;\ + response.id = id;\ + response.name = FilteredResponseNames::NAME;\ + response.arguments = arguments;\ + filteredResponses.Add(response);\ + }\ + +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## RESTAG(NAME, RESPONSE) + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) +#undef MESSAGE_HANDLER +#undef MESSAGE_RES +#undef MESSAGE_NORES + + // events + +#define EVENT_NODROP(NAME) + +#define EVENT_DROPREP(NAME)\ + if (lastDropRepeatEvent ## NAME != -1)\ + {\ + filteredEvents[lastDropRepeatEvent ## NAME].dropped = true;\ + }\ + lastDropRepeatEvent ## NAME = filteredEvents.Count() - 1\ + +#define EVENT_DROPCON(NAME)\ + if (lastDropConsecutiveEvent ## NAME != -1 && lastDropConsecutiveEvent ## NAME == filteredEvents.Count() - 1)\ + {\ + filteredEvents[lastDropConsecutiveEvent ## NAME].dropped = true;\ + }\ + lastDropConsecutiveEvent ## NAME = filteredEvents.Count() - 1\ + +#define EVENT_NOREQ(NAME, REQUEST, DROPTAG)\ + void On ## NAME() override\ + {\ + if (submitting)\ + {\ + EVENT_ ## DROPTAG(NAME);\ + FilteredEvent event;\ + event.name = FilteredEventNames::NAME;\ + filteredEvents.Add(event);\ + }\ + else\ + {\ + targetEvents->On ## NAME();\ + }\ + }\ + +#define EVENT_REQ(NAME, REQUEST, DROPTAG)\ + void On ## NAME(const REQUEST& arguments) override\ + {\ + if (submitting)\ + {\ + EVENT_ ## DROPTAG(NAME);\ + FilteredEvent event;\ + event.name = FilteredEventNames::NAME;\ + event.arguments = arguments;\ + filteredEvents.Add(event);\ + }\ + else\ + {\ + targetEvents->On ## NAME(arguments);\ + }\ + }\ + +#define EVENT_HANDLER(NAME, REQUEST, REQTAG, DROPTAG, ...) EVENT_ ## REQTAG(NAME, REQUEST, DROPTAG) + GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER) +#undef EVENT_HANDLER +#undef EVENT_REQ +#undef EVENT_NOREQ +#undef EVENT_DROPCON +#undef EVENT_DROPREP +#undef EVENT_NOREP + }; + +/*********************************************************************** +GuiRemoteProtocolFilter +***********************************************************************/ + + class GuiRemoteProtocolFilterVerifier; + + class GuiRemoteProtocolFilter + : public Object + , public virtual IGuiRemoteProtocol + { + friend class GuiRemoteProtocolFilterVerifier; + protected: + IGuiRemoteProtocol* targetProtocol = nullptr; + GuiRemoteEventFilter eventFilter; + vint lastRequestId = -1; + collections::List filteredRequests; + +#define MESSAGE_NODROP(NAME) +#define MESSAGE_DROPREP(NAME) vint lastDropRepeatRequest ## NAME = -1; +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, DROPTAG) MESSAGE_ ## DROPTAG(NAME) + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) +#undef MESSAGE_HANDLER +#undef MESSAGE_DROPREP +#undef MESSAGE_NODROP + + void ProcessRequests() + { +#define MESSAGE_NODROP(NAME) +#define MESSAGE_DROPREP(NAME) lastDropRepeatRequest ## NAME = -1; +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, DROPTAG) MESSAGE_ ## DROPTAG(NAME) + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) +#undef MESSAGE_HANDLER +#undef MESSAGE_DROPREP +#undef MESSAGE_NODROP + + for (auto&& request : filteredRequests) + { + CHECK_ERROR(\ + !request.dropped || request.id == -1,\ + L"vl::presentation::remoteprotocol::GuiRemoteProtocolFilter::ProcessRequests()#"\ + L"Messages with id cannot be dropped.");\ + if (request.dropped) + { + continue; + } + +#define MESSAGE_NOREQ_NORES(NAME, REQUEST, RESPONSE)\ + case FilteredRequestNames::NAME:\ + targetProtocol->Request ## NAME();\ + break;\ + +#define MESSAGE_NOREQ_RES(NAME, REQUEST, RESPONSE)\ + case FilteredRequestNames::NAME:\ + targetProtocol->Request ## NAME(request.id);\ + break;\ + +#define MESSAGE_REQ_NORES(NAME, REQUEST, RESPONSE)\ + case FilteredRequestNames::NAME:\ + targetProtocol->Request ## NAME(request.arguments.Get());\ + break;\ + +#define MESSAGE_REQ_RES(NAME, REQUEST, RESPONSE)\ + case FilteredRequestNames::NAME:\ + targetProtocol->Request ## NAME(request.id, request.arguments.Get());\ + break;\ + +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## REQTAG ## _ ## RESTAG(NAME, REQUEST, RESPONSE) + switch (request.name) + { + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) + default: + CHECK_FAIL(L"vl::presentation::remoteprotocol::GuiRemoteProtocolFilter::ProcessRequests()#Unrecognized request."); + } +#undef MESSAGE_HANDLER +#undef MESSAGE_REQ_RES +#undef MESSAGE_REQ_NORES +#undef MESSAGE_NOREQ_RES +#undef MESSAGE_NOREQ_NORES + } + + CHECK_ERROR(eventFilter.responseIds.Count() == 0, L"Messages sending to IGuiRemoteProtocol should be all responded."); + filteredRequests.Clear(); + } + public: + GuiRemoteProtocolFilter(IGuiRemoteProtocol* _protocol) + : targetProtocol(_protocol) + { + } + + protected: + + public: + + // messages + +#define MESSAGE_NODROP(NAME) + +#define MESSAGE_DROPREP(NAME)\ + if (lastDropRepeatRequest ## NAME != -1)\ + {\ + filteredRequests[lastDropRepeatRequest ## NAME].dropped = true;\ + }\ + lastDropRepeatRequest ## NAME = filteredRequests.Count()\ + +#define MESSAGE_NOREQ_NORES(NAME, REQUEST, RESPONSE, DROPTAG)\ + void Request ## NAME() override\ + {\ + MESSAGE_ ## DROPTAG(NAME);\ + FilteredRequest request;\ + request.name = FilteredRequestNames::NAME;\ + filteredRequests.Add(request);\ + }\ + +#define MESSAGE_NOREQ_RES(NAME, REQUEST, RESPONSE, DROPTAG)\ + void Request ## NAME(vint id) override\ + {\ + MESSAGE_ ## DROPTAG(NAME);\ + CHECK_ERROR(\ + lastRequestId < id,\ + L"vl::presentation::remoteprotocol::GuiRemoteProtocolFilter::"\ + L"Request" L ## #NAME L"()#"\ + L"Id of a message sending to IGuiRemoteProtocol should be increasing.");\ + lastRequestId = id;\ + FilteredRequest request;\ + request.id = id;\ + request.name = FilteredRequestNames::NAME;\ + filteredRequests.Add(request);\ + eventFilter.responseIds.Add(id, FilteredResponseNames::NAME);\ + }\ + +#define MESSAGE_REQ_NORES(NAME, REQUEST, RESPONSE, DROPTAG)\ + void Request ## NAME(const REQUEST& arguments) override\ + {\ + MESSAGE_ ## DROPTAG(NAME);\ + FilteredRequest request;\ + request.name = FilteredRequestNames::NAME;\ + request.arguments = arguments;\ + filteredRequests.Add(request);\ + }\ + +#define MESSAGE_REQ_RES(NAME, REQUEST, RESPONSE, DROPTAG)\ + void Request ## NAME(vint id, const REQUEST& arguments) override\ + {\ + MESSAGE_ ## DROPTAG(NAME);\ + CHECK_ERROR(\ + lastRequestId < id,\ + L"vl::presentation::remoteprotocol::GuiRemoteProtocolFilter::"\ + L"Request" L ## #NAME L"()#"\ + L"Id of a message sending to IGuiRemoteProtocol should be increasing.");\ + lastRequestId = id;\ + FilteredRequest request;\ + request.id = id;\ + request.name = FilteredRequestNames::NAME;\ + request.arguments = arguments;\ + filteredRequests.Add(request);\ + eventFilter.responseIds.Add(id, FilteredResponseNames::NAME);\ + }\ + +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, DROPTAG, ...) MESSAGE_ ## REQTAG ## _ ## RESTAG(NAME, REQUEST, RESPONSE, DROPTAG) + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) +#undef MESSAGE_HANDLER +#undef MESSAGE_REQ_RES +#undef MESSAGE_REQ_NORES +#undef MESSAGE_NOREQ_RES +#undef MESSAGE_NOREQ_NORES +#undef MESSAGE_DROPREP +#undef MESSAGE_NODROP + + // protocol + + WString GetExecutablePath() override + { + return targetProtocol->GetExecutablePath(); + } + + void Initialize(IGuiRemoteProtocolEvents* _events) override + { + eventFilter.targetEvents = _events; + targetProtocol->Initialize(&eventFilter); + } + + void Submit() override + { + eventFilter.submitting = true; + targetProtocol->Submit(); + ProcessRequests(); + eventFilter.ProcessResponses(); + eventFilter.submitting = false; + eventFilter.ProcessEvents(); + } + + void ProcessRemoteEvents() override + { + targetProtocol->ProcessRemoteEvents(); + } + }; + +/*********************************************************************** +GuiRemoteEventFilterVerifier +***********************************************************************/ + + class GuiRemoteEventFilterVerifier + : public Object + , public virtual IGuiRemoteProtocolEvents + { + protected: +#define EVENT_NODROP(NAME) +#define EVENT_DROPREP(NAME) bool lastDropRepeatEvent ## NAME = false; +#define EVENT_DROPCON(NAME) bool lastDropConsecutiveEvent ## NAME = false; +#define EVENT_HANDLER(NAME, REQUEST, REQTAG, DROPTAG, ...) EVENT_ ## DROPTAG(NAME) + GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER) +#undef EVENT_HANDLER +#undef EVENT_DROPCON +#undef EVENT_DROPREP +#undef EVENT_NODROP + + public: + IGuiRemoteProtocolEvents* targetEvents = nullptr; + bool submitting = false; + + void ClearDropRepeatMasks() + { +#define EVENT_NODROP(NAME) +#define EVENT_DROPREP(NAME) lastDropRepeatEvent ## NAME = false; +#define EVENT_DROPCON(NAME) +#define EVENT_HANDLER(NAME, REQUEST, REQTAG, DROPTAG, ...) EVENT_ ## DROPTAG(NAME) + GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER) +#undef EVENT_HANDLER +#undef EVENT_DROPCON +#undef EVENT_DROPREP +#undef EVENT_NODROP + } + + void ClearDropConsecutiveMasks() + { +#define EVENT_NODROP(NAME) +#define EVENT_DROPREP(NAME) +#define EVENT_DROPCON(NAME) lastDropConsecutiveEvent ## NAME = false; +#define EVENT_HANDLER(NAME, REQUEST, REQTAG, DROPTAG, ...) EVENT_ ## DROPTAG(NAME) + GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER) +#undef EVENT_HANDLER +#undef EVENT_DROPCON +#undef EVENT_DROPREP +#undef EVENT_NODROP + } + + // responses + +#define MESSAGE_NORES(NAME, RESPONSE) +#define MESSAGE_RES(NAME, RESPONSE)\ + void Respond ## NAME(vint id, const RESPONSE& arguments) override\ + {\ + targetEvents->Respond ## NAME(id, arguments);\ + }\ + +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## RESTAG(NAME, RESPONSE) + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) +#undef MESSAGE_HANDLER +#undef MESSAGE_RES +#undef MESSAGE_NORES + + // events + +#define EVENT_NODROP(NAME) + +#define EVENT_DROPREP(NAME)\ + CHECK_ERROR(!lastDropRepeatEvent ## NAME, L"vl::presentation::remoteprotocol::GuiRemoteEventFilterVerifier::On" L ## #NAME L"(...)#[@DropRepeat] event repeated.");\ + lastDropRepeatEvent ## NAME = true;\ + +#define EVENT_DROPCON(NAME)\ + CHECK_ERROR(!lastDropConsecutiveEvent ## NAME, L"vl::presentation::remoteprotocol::GuiRemoteEventFilterVerifier::On" L ## #NAME L"(...)#[@DropConsecutive] event repeated.");\ + ClearDropConsecutiveMasks();\ + lastDropConsecutiveEvent ## NAME = true;\ + +#define EVENT_NOREQ(NAME, REQUEST, DROPTAG)\ + void On ## NAME() override\ + {\ + if (submitting)\ + {\ + EVENT_ ## DROPTAG(NAME);\ + targetEvents->On ## NAME();\ + }\ + else\ + {\ + targetEvents->On ## NAME();\ + }\ + }\ + +#define EVENT_REQ(NAME, REQUEST, DROPTAG)\ + void On ## NAME(const REQUEST& arguments) override\ + {\ + if (submitting)\ + {\ + EVENT_ ## DROPTAG(NAME);\ + targetEvents->On ## NAME(arguments);\ + }\ + else\ + {\ + targetEvents->On ## NAME(arguments);\ + }\ + }\ + +#define EVENT_HANDLER(NAME, REQUEST, REQTAG, DROPTAG, ...) EVENT_ ## REQTAG(NAME, REQUEST, DROPTAG) + GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER) +#undef EVENT_HANDLER +#undef EVENT_REQ +#undef EVENT_NOREQ +#undef EVENT_DROPCON +#undef EVENT_DROPREP +#undef EVENT_NOREP + }; + +/*********************************************************************** +GuiRemoteProtocolFilterVerifier +***********************************************************************/ + + class GuiRemoteProtocolFilterVerifier + : public Object + , public virtual IGuiRemoteProtocol + { + protected: + GuiRemoteProtocolFilter* targetProtocol = nullptr; + GuiRemoteEventFilterVerifier eventFilter; + vint lastRequestId = -1; + collections::List filteredRequests; + +#define MESSAGE_NODROP(NAME) +#define MESSAGE_DROPREP(NAME) bool lastDropRepeatRequest ## NAME = false; +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, DROPTAG) MESSAGE_ ## DROPTAG(NAME) + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) +#undef MESSAGE_HANDLER +#undef MESSAGE_DROPREP +#undef MESSAGE_NODROP + + void ClearDropRepeatMasks() + { +#define MESSAGE_NODROP(NAME) +#define MESSAGE_DROPREP(NAME) lastDropRepeatRequest ## NAME = false; +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, DROPTAG) MESSAGE_ ## DROPTAG(NAME) + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) +#undef MESSAGE_HANDLER +#undef MESSAGE_DROPREP +#undef MESSAGE_NODROP + } + public: + GuiRemoteProtocolFilterVerifier(GuiRemoteProtocolFilter* _protocol) + : targetProtocol(_protocol) + { + } + + protected: + + public: + + // messages + +#define MESSAGE_NODROP(NAME) + +#define MESSAGE_DROPREP(NAME)\ + CHECK_ERROR(!lastDropRepeatRequest ## NAME, L"vl::presentation::remoteprotocol::GuiRemoteProtocolFilterVerifier::Request" L ## #NAME L"(...)#[@DropRepeat] message repeated.");\ + lastDropRepeatRequest ## NAME = true;\ + +#define MESSAGE_NOREQ_NORES(NAME, REQUEST, RESPONSE, DROPTAG)\ + void Request ## NAME() override\ + {\ + MESSAGE_ ## DROPTAG(NAME);\ + targetProtocol->Request ## NAME();\ + }\ + +#define MESSAGE_NOREQ_RES(NAME, REQUEST, RESPONSE, DROPTAG)\ + void Request ## NAME(vint id) override\ + {\ + MESSAGE_ ## DROPTAG(NAME);\ + targetProtocol->Request ## NAME(id);\ + }\ + +#define MESSAGE_REQ_NORES(NAME, REQUEST, RESPONSE, DROPTAG)\ + void Request ## NAME(const REQUEST& arguments) override\ + {\ + MESSAGE_ ## DROPTAG(NAME);\ + targetProtocol->Request ## NAME(arguments);\ + }\ + +#define MESSAGE_REQ_RES(NAME, REQUEST, RESPONSE, DROPTAG)\ + void Request ## NAME(vint id, const REQUEST& arguments) override\ + {\ + MESSAGE_ ## DROPTAG(NAME);\ + targetProtocol->Request ## NAME(id, arguments);\ + }\ + +#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, DROPTAG, ...) MESSAGE_ ## REQTAG ## _ ## RESTAG(NAME, REQUEST, RESPONSE, DROPTAG) + GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER) +#undef MESSAGE_HANDLER +#undef MESSAGE_REQ_RES +#undef MESSAGE_REQ_NORES +#undef MESSAGE_NOREQ_RES +#undef MESSAGE_NOREQ_NORES +#undef MESSAGE_DROPREP +#undef MESSAGE_NODROP + + // protocol + + WString GetExecutablePath() override + { + return targetProtocol->GetExecutablePath(); + } + + void Initialize(IGuiRemoteProtocolEvents* _events) override + { + targetProtocol->Initialize(&eventFilter); + eventFilter.targetEvents = targetProtocol->eventFilter.targetEvents; + targetProtocol->eventFilter.targetEvents = _events; + } + + void Submit() override + { + eventFilter.submitting = true; + targetProtocol->Submit(); + ClearDropRepeatMasks(); + eventFilter.ClearDropRepeatMasks(); + eventFilter.ClearDropConsecutiveMasks(); + eventFilter.submitting = false; + } + + void ProcessRemoteEvents() override + { + targetProtocol->ProcessRemoteEvents(); + } + }; +} + #endif /*********************************************************************** @@ -26342,6 +27592,7 @@ GuiHostedController void Initialize(); void Finalize(); + void RequestRefresh(); // ============================================================= // INativeController @@ -26680,31 +27931,32 @@ GuiRemoteController using HotKeySet = collections::SortedList; using HotKeyIds = collections::Dictionary; protected: - IGuiRemoteProtocol* remoteProtocol; - GuiRemoteMessages remoteMessages; - GuiRemoteEvents remoteEvents; - GuiRemoteWindow remoteWindow; - SharedCallbackService callbackService; - SharedAsyncService asyncService; - bool applicationRunning = false; - bool connectionForcedToStop = false; - bool connectionStopped = false; + IGuiRemoteProtocol* remoteProtocol = nullptr; + GuiRemoteMessages remoteMessages; + GuiRemoteEvents remoteEvents; + GuiRemoteWindow remoteWindow; + elements::GuiRemoteGraphicsResourceManager* resourceManager = nullptr; + SharedCallbackService callbackService; + SharedAsyncService asyncService; + bool applicationRunning = false; + bool connectionForcedToStop = false; + bool connectionStopped = false; - remoteprotocol::FontConfig remoteFontConfig; - remoteprotocol::ScreenConfig remoteScreenConfig; + remoteprotocol::FontConfig remoteFontConfig; + remoteprotocol::ScreenConfig remoteScreenConfig; - vint usedHotKeys = (vint)NativeGlobalShortcutKeyResult::ValidIdBegins; - HotKeySet hotKeySet; - HotKeyIds hotKeyIds; + vint usedHotKeys = (vint)NativeGlobalShortcutKeyResult::ValidIdBegins; + HotKeySet hotKeySet; + HotKeyIds hotKeyIds; - CursorMap cursors; - bool timerEnabled = false; - bool windowCreated = false; - bool windowDestroyed = false; + CursorMap cursors; + bool timerEnabled = false; + bool windowCreated = false; + bool windowDestroyed = false; - collections::Dictionary keyNames; - collections::Dictionary keyCodes; - bool keyInitialized = false; + collections::Dictionary keyNames; + collections::Dictionary keyCodes; + bool keyInitialized = false; // ============================================================= // INativeResourceService diff --git a/Import/GacUICompiler.cpp b/Import/GacUICompiler.cpp index e47c9db7..57c1e8c1 100644 --- a/Import/GacUICompiler.cpp +++ b/Import/GacUICompiler.cpp @@ -10504,6 +10504,11 @@ CheckRemoteProtocolSchema } } + void Visit(GuiRpOptionalType* node) override + { + node->element->Accept(this); + } + void Visit(GuiRpArrayType* node) override { node->element->Accept(this); @@ -10551,11 +10556,30 @@ CheckRemoteProtocolSchema { errors.Add({ att->name.codeRange,L"Missing parameter for attribute: \"" + att->name.value + L"\"." }); } + else if (symbols->cppMapping.Keys().Contains(node->name.value)) + { + errors.Add({ att->name.codeRange,L"Too many attributes: \"" + att->name.value + L"\"." }); + } else { symbols->cppMapping.Add(node->name.value, att->cppType.value); } } + else if (att->name.value == L"@CppNamespace") + { + if (!att->cppType) + { + errors.Add({ att->name.codeRange,L"Missing parameter for attribute: \"" + att->name.value + L"\"." }); + } + else if (symbols->cppNamespaces.Keys().Contains(node->name.value)) + { + errors.Add({ att->name.codeRange,L"Too many attributes: \"" + att->name.value + L"\"." }); + } + else + { + symbols->cppNamespaces.Add(node->name.value, att->cppType.value); + } + } else { errors.Add({ att->name.codeRange,L"Unsupported attribute: \"" + att->name.value + L"\" on enum \"" + node->name.value + L"\"." }); @@ -10749,6 +10773,9 @@ GenerateRemoteProtocolHeaderFile case GuiRpPrimitiveTypes::Key: writer.WriteString(L"::vl::presentation::VKEY"); break; + case GuiRpPrimitiveTypes::Color: + writer.WriteString(L"::vl::presentation::Color"); + break; default: CHECK_FAIL(L"Unrecognized type"); } @@ -10759,7 +10786,7 @@ GenerateRemoteProtocolHeaderFile vint index = symbols->cppMapping.Keys().IndexOf(type); if (index == -1) { - return config.cppNamespace + L"::" + type; + return L"::" + config.cppNamespace + L"::" + type; } else { @@ -10767,11 +10794,31 @@ GenerateRemoteProtocolHeaderFile } } + static WString GetCppNamespace(const WString& type, Ptr symbols, GuiRpCppConfig& config) + { + vint index = symbols->cppNamespaces.Keys().IndexOf(type); + if (index == -1) + { + return GetCppType(type, symbols, config); + } + else + { + return symbols->cppNamespaces.Values()[index]; + } + } + void Visit(GuiRpReferenceType* node) override { writer.WriteString(GetCppType(node->name.value, symbols, config)); } + void Visit(GuiRpOptionalType* node) override + { + writer.WriteString(L"::vl::Nullable<"); + node->element->Accept(this); + writer.WriteString(L">"); + } + void Visit(GuiRpArrayType* node) override { writer.WriteString(L"::vl::Ptr<::vl::collections::List<"); @@ -10917,6 +10964,66 @@ GenerateRemoteProtocolHeaderFile } writer.WriteLine(L""); + SortedList requestTypes, responseTypes, eventTypes; + { + for (auto messageDecl : From(schema->declarations).FindType()) + { + if (messageDecl->request) + { + auto type = stream::GenerateToStream([&](stream::TextWriter& writer) + { + GuiRpPrintTypeVisitor visitor(symbols, config, writer); + messageDecl->request->type->Accept(&visitor); + }); + if (!requestTypes.Contains(type)) + { + requestTypes.Add(type); + } + } + + if (messageDecl->response) + { + auto type = stream::GenerateToStream([&](stream::TextWriter& writer) + { + GuiRpPrintTypeVisitor visitor(symbols, config, writer); + messageDecl->response->type->Accept(&visitor); + }); + if (!responseTypes.Contains(type)) + { + responseTypes.Add(type); + } + } + } + + for (auto eventDecl : From(schema->declarations).FindType()) + { + if (eventDecl->request) + { + auto type = stream::GenerateToStream([&](stream::TextWriter& writer) + { + GuiRpPrintTypeVisitor visitor(symbols, config, writer); + eventDecl->request->type->Accept(&visitor); + }); + if (!eventTypes.Contains(type)) + { + eventTypes.Add(type); + } + } + } + } + + writer.WriteLine(L"#define GACUI_REMOTEPROTOCOL_MESSAGE_REQUEST_TYPES(HANDLER)\\"); + for (auto type : requestTypes) writer.WriteLine(L"\tHANDLER(" + type + L")\\"); + writer.WriteLine(L""); + + writer.WriteLine(L"#define GACUI_REMOTEPROTOCOL_MESSAGE_RESPONSE_TYPES(HANDLER)\\"); + for (auto type : responseTypes) writer.WriteLine(L"\tHANDLER(" + type + L")\\"); + writer.WriteLine(L""); + + writer.WriteLine(L"#define GACUI_REMOTEPROTOCOL_EVENT_REQUEST_TYPES(HANDLER)\\"); + for (auto type : eventTypes) writer.WriteLine(L"\tHANDLER(" + type + L")\\"); + writer.WriteLine(L""); + writer.WriteLine(L"}"); writer.WriteLine(L""); writer.WriteLine(L"#endif"); @@ -10929,6 +11036,7 @@ GenerateRemoteProtocolCppFile void GenerateEnumSerializerFunctionImpl(Ptr enumDecl, Ptr symbols, GuiRpCppConfig& config, stream::TextWriter& writer) { WString cppName = GuiRpPrintTypeVisitor::GetCppType(enumDecl->name.value, symbols, config); + WString cppNss = GuiRpPrintTypeVisitor::GetCppNamespace(enumDecl->name.value, symbols, config); GenerateSerializerFunctionHeader(cppName, false, writer); writer.WriteLine(L"\t{"); writer.WriteLine(L"#define ERROR_MESSAGE_PREFIX L\"vl::presentation::remoteprotocol::ConvertCustomTypeToJson<" + cppName + L">(const " + cppName + L"&)#\""); @@ -10937,7 +11045,7 @@ GenerateRemoteProtocolCppFile writer.WriteLine(L"\t\t{"); for (auto member : enumDecl->members) { - writer.WriteLine(L"\t\tcase " + cppName + L"::" + member->name.value + L": node->content.value = L\"" + member->name.value + L"\"; break;"); + writer.WriteLine(L"\t\tcase " + cppNss + L"::" + member->name.value + L": node->content.value = WString::Unmanaged(L\"" + member->name.value + L"\"); break;"); } writer.WriteLine(L"\t\tdefault: CHECK_FAIL(ERROR_MESSAGE_PREFIX L\"Unsupported enum value.\");"); writer.WriteLine(L"\t\t}"); @@ -10965,6 +11073,7 @@ GenerateRemoteProtocolCppFile void GenerateEnumDeserializerFunctionImpl(Ptr enumDecl, Ptr symbols, GuiRpCppConfig& config, stream::TextWriter& writer) { WString cppName = GuiRpPrintTypeVisitor::GetCppType(enumDecl->name.value, symbols, config); + WString cppNss = GuiRpPrintTypeVisitor::GetCppNamespace(enumDecl->name.value, symbols, config); GenerateDeserializerFunctionHeader(cppName, false, writer); writer.WriteLine(L"\t{"); writer.WriteLine(L"#define ERROR_MESSAGE_PREFIX L\"vl::presentation::remoteprotocol::ConvertJsonToCustomType<" + cppName + L">(Ptr, " + cppName + L"&)#\""); @@ -10972,7 +11081,7 @@ GenerateRemoteProtocolCppFile writer.WriteLine(L"\t\tCHECK_ERROR(jsonNode, ERROR_MESSAGE_PREFIX L\"Json node does not match the expected type.\");"); for (auto member : enumDecl->members) { - writer.WriteLine(L"\t\tif (jsonNode->content.value == L\"" + member->name.value + L"\") value = " + cppName + L"::" + member->name.value + L"; else"); + writer.WriteLine(L"\t\tif (jsonNode->content.value == L\"" + member->name.value + L"\") value = " + cppNss + L"::" + member->name.value + L"; else"); } writer.WriteLine(L"\t\tCHECK_FAIL(ERROR_MESSAGE_PREFIX L\"Unsupported enum value.\");"); writer.WriteLine(L"#undef ERROR_MESSAGE_PREFIX"); @@ -11061,6 +11170,11 @@ Visitor Pattern Implementation visitor->Visit(this); } + void GuiRpOptionalType::Accept(GuiRpType::IVisitor* visitor) + { + visitor->Visit(this); + } + void GuiRpArrayType::Accept(GuiRpType::IVisitor* visitor) { visitor->Visit(this); @@ -11095,6 +11209,7 @@ namespace vl::reflection::description IMPL_TYPE_INFO_RENAME(vl::presentation::remoteprotocol::GuiRpPrimitiveTypes, presentation::remoteprotocol::GuiRpPrimitiveTypes) IMPL_TYPE_INFO_RENAME(vl::presentation::remoteprotocol::GuiRpPrimitiveType, presentation::remoteprotocol::GuiRpPrimitiveType) IMPL_TYPE_INFO_RENAME(vl::presentation::remoteprotocol::GuiRpReferenceType, presentation::remoteprotocol::GuiRpReferenceType) + IMPL_TYPE_INFO_RENAME(vl::presentation::remoteprotocol::GuiRpOptionalType, presentation::remoteprotocol::GuiRpOptionalType) IMPL_TYPE_INFO_RENAME(vl::presentation::remoteprotocol::GuiRpArrayType, presentation::remoteprotocol::GuiRpArrayType) IMPL_TYPE_INFO_RENAME(vl::presentation::remoteprotocol::GuiRpAttribute, presentation::remoteprotocol::GuiRpAttribute) IMPL_TYPE_INFO_RENAME(vl::presentation::remoteprotocol::GuiRpDeclaration, presentation::remoteprotocol::GuiRpDeclaration) @@ -11126,6 +11241,7 @@ namespace vl::reflection::description ENUM_NAMESPACE_ITEM(String) ENUM_NAMESPACE_ITEM(Char) ENUM_NAMESPACE_ITEM(Key) + ENUM_NAMESPACE_ITEM(Color) END_ENUM_ITEM(vl::presentation::remoteprotocol::GuiRpPrimitiveTypes) BEGIN_CLASS_MEMBER(vl::presentation::remoteprotocol::GuiRpPrimitiveType) @@ -11144,6 +11260,14 @@ namespace vl::reflection::description CLASS_MEMBER_FIELD(name) END_CLASS_MEMBER(vl::presentation::remoteprotocol::GuiRpReferenceType) + BEGIN_CLASS_MEMBER(vl::presentation::remoteprotocol::GuiRpOptionalType) + CLASS_MEMBER_BASE(vl::presentation::remoteprotocol::GuiRpType) + + CLASS_MEMBER_CONSTRUCTOR(vl::Ptr(), NO_PARAMETER) + + CLASS_MEMBER_FIELD(element) + END_CLASS_MEMBER(vl::presentation::remoteprotocol::GuiRpOptionalType) + BEGIN_CLASS_MEMBER(vl::presentation::remoteprotocol::GuiRpArrayType) CLASS_MEMBER_BASE(vl::presentation::remoteprotocol::GuiRpType) @@ -11253,6 +11377,7 @@ namespace vl::reflection::description BEGIN_INTERFACE_MEMBER(vl::presentation::remoteprotocol::GuiRpType::IVisitor) CLASS_MEMBER_METHOD_OVERLOAD(Visit, {L"node"}, void(vl::presentation::remoteprotocol::GuiRpType::IVisitor::*)(vl::presentation::remoteprotocol::GuiRpPrimitiveType* node)) CLASS_MEMBER_METHOD_OVERLOAD(Visit, {L"node"}, void(vl::presentation::remoteprotocol::GuiRpType::IVisitor::*)(vl::presentation::remoteprotocol::GuiRpReferenceType* node)) + CLASS_MEMBER_METHOD_OVERLOAD(Visit, {L"node"}, void(vl::presentation::remoteprotocol::GuiRpType::IVisitor::*)(vl::presentation::remoteprotocol::GuiRpOptionalType* node)) CLASS_MEMBER_METHOD_OVERLOAD(Visit, {L"node"}, void(vl::presentation::remoteprotocol::GuiRpType::IVisitor::*)(vl::presentation::remoteprotocol::GuiRpArrayType* node)) END_INTERFACE_MEMBER(vl::presentation::remoteprotocol::GuiRpType) @@ -11276,6 +11401,7 @@ namespace vl::reflection::description ADD_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpPrimitiveTypes) ADD_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpPrimitiveType) ADD_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpReferenceType) + ADD_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpOptionalType) ADD_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpArrayType) ADD_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpAttribute) ADD_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpDeclaration) @@ -11408,6 +11534,12 @@ namespace vl::presentation::remoteprotocol::json_visitor Print(node->type.Obj()); EndField(); } + void AstVisitor::PrintFields(GuiRpOptionalType* node) + { + BeginField(L"element"); + Print(node->element.Obj()); + EndField(); + } void AstVisitor::PrintFields(GuiRpPrimitiveType* node) { BeginField(L"type"); @@ -11419,6 +11551,9 @@ namespace vl::presentation::remoteprotocol::json_visitor case vl::presentation::remoteprotocol::GuiRpPrimitiveTypes::Char: WriteString(L"Char"); break; + case vl::presentation::remoteprotocol::GuiRpPrimitiveTypes::Color: + WriteString(L"Color"); + break; case vl::presentation::remoteprotocol::GuiRpPrimitiveTypes::Double: WriteString(L"Double"); break; @@ -11512,6 +11647,20 @@ namespace vl::presentation::remoteprotocol::json_visitor EndObject(); } + void AstVisitor::Visit(GuiRpOptionalType* node) + { + if (!node) + { + WriteNull(); + return; + } + BeginObject(); + WriteType(L"OptionalType", node); + PrintFields(static_cast(node)); + PrintFields(static_cast(node)); + EndObject(); + } + void AstVisitor::Visit(GuiRpArrayType* node) { if (!node) @@ -11715,33 +11864,35 @@ namespace vl::presentation::remoteprotocol { void GuiRemoteProtocolParserData(vl::stream::IStream& outputStream) { - static const vl::vint dataLength = 5216; // 69320 bytes before compressing + static const vl::vint dataLength = 5825; // 78019 bytes before compressing static const vl::vint dataBlock = 256; - static const vl::vint dataRemain = 96; - static const vl::vint dataSolidRows = 20; - static const vl::vint dataRows = 21; + static const vl::vint dataRemain = 193; + static const vl::vint dataSolidRows = 22; + static const vl::vint dataRows = 23; static const char* compressed[] = { - "\xC8\x0E\x01\x00\x58\x14\x00\x00\x1B\x00\x01\x82\x80\x0F\x03\x82\x81\x82\x06\x89\x82\x8D\x0A\x80\x0A\x84\x0C\x0A\x9C\x0A\x83\x1A\x82\x16\x85\x18\x0A\xB7\x0A\x9D\x1A\x85\x22\x85\x25\x0A\xD2\x0A\x98\x2A\x84\x2E\x84\x70\x0A\x09\xBF\x6B\x9C\x93\x96\x84\x00\x2D\xAD\xAF\x91\x9C\x93\x98\x9B\x7F\x36\xB4\xB9\x91\x9B\x9A\x9A\x85\x9B\x38\xBF\xB7\x8F\x9F\x91\x02\x84\xA3\x09\xC8\x86\x82\x07\xA2\x87\x01\xA6\x09\x84\x10\xA6\x85\x03\xAB\x80\x03\x56\x82\x80\xBD\x95\x9A\x87\x03\xAC\x01\xDB\x82\xBA\x93\xB4\x9D\xB2\x9F\x2A\xC3\xA7\xBD\xA9\xB4\xB1\xB6\xB3\x6F\xE8\x86\x82\xB1\xBC\xB7\xB8\xB5\x75\xAE\xAB\xBA\xB9\xB9\xA1\xBE\xAE\x7C\xF7\xAE\xA2\xC0\xBC\xC2\xB9\x81\x74\x86\xF6\xA8\xC8\xBA\xC5\xC0\xC6\x83\x90\xC5\xD2\xC7\xC2\xAD\xC6\xCA\x8B\x96\xD1\xDA\xC3\xCC\xCD\xCB\xB0\x97\x9E\xD9\xC0\xDB\xCC\xD1\xCE\xD3\x9F\xB0\xA1\xC8\xD3\xD0\x00\x04\xB0\x00\x09\x30\xC9\xC8\xCF\xC6\xD0\xDB\xAC\xB8\xEA\xC5\xDB\xDF\xD1\xDF\xD4\xB4\xB7\xFE\xAE\xC3\xE5\xD9\xE2\xE1\x80\xC7\xF9\xCA\xEF\xDD\xD5\xE1\xE5\xC9\xD1\xFB\xAC\xEF\xE5\xE6\xDD\xEA\xD8\xAB\xD6\xF4", - "\xEA\xE9\x95\xA4\x85\x0B\x33\xDA\xF9\xEC\xDC\xF2\xDE\xF3\xC0\xE3\xEA\xE5\xFB\xF7\xF1\xF7\xF4\xEC\xF1\xEE\xF2\xF0\xFB\xFA\xFB\xFA\xF8\xCE\xEF\xFA\xFC\xDC\x04\xD8\x86\xDF\x7F\x53\x76\x74\x02\x85\x84\x70\x81\x07\x83\x8A\x82\x81\xC6\x48\x8D\x83\x82\x09\x8C\x88\x70\x84\x0F\x92\x80\x74\x85\x13\x96\x8B\x76\x83\x02\x4E\x00\x6C\x42\x06\x4A\x55\x85\x84\x24\xA3\x86\x89\x86\x25\xA8\x87\x8B\x85\x1A\xA8\x7C\x7F\x7D\x2F\xB9\x77\x77\x7E\x33\xB4\x71\x8F\x8D\x35\xB0\x89\x8E\x8C\xCC\x4E\x41\x82\x41\x11\x22\x76\x8F\x8E\x38\x9C\x73\x92\x91\x3A\x88\x9C\x8C\x87\x2C\xA9\x8D\x93\x8A\x1B\x98\x8F\x92\x8A\x54\x93\x96\x95\x94\x2D\xB4\x8A\x91\x6B\x12\x30\x63\x06\x90\x49\x8C\x98\x96\x93\x63\x90\x9E\x88\x91\x68\x9B\x99\x9A\x98\x67\xAA\x9E\x98\x9B\x5A\xB0\x97\x92\x9C\x61\x8A\x44\x04\x6C\x15\x20\x9B\x92\x94\x65\x95\x9D\x9F\x95\x6D\xB4\x9B\x9D\x96\x73\xBC\x91\xA2\xA1\x71\x88\xA5\xA0\xA1\x75\x89\x46\x04\x6C\x17\x3A\x95\x92\xA0\x93\x8A\xAD\xA0\x99\x87\x8C\xA3\xA0\xA6\x89\x9A\xA5\xA6\xA7\x6B\x96\xAB\xA4\x94\x10\x7F\x83\x41\x06\x92\xA1\xA0\xAB\x9B", - "\xA2\x9F\xAC\xA7\xA2\xAF\x97\xA6\x99\xA7\xB1\xA3\xAE\x9D\xA6\xB5\xAE\xA3\xAC\xAC\xBB\xB2\xA7\xAC\xAD\xBD\xB6\xA0\xA0\xB0\xBF\xBC\xA5\xB2\xAF\xC3\xBC\x6A\x05\xAA\xAC\xAB\xA4\xA6\xAA\xB9\x90\xB1\xB2\xAE\xC7\x82\xBF\x9F\xB5\xB8\x93\xB2\xB5\xB5\xD4\x97\x90\x42\xA9\xDC\x9B\xB9\xB0\xB2\xD8\x84\xB3\xBA\xB5\xD9\xA1\xBD\xB1\xB4\xEB\x9A\xBD\xBA\x40\x12\x60\xB7\xB9\xB7\xE5\x86\xB3\xBE\xB8\xF5\xA4\xB9\xBB\xBD\xEF\xBC\xBF\xB1\xBF\xF9\xA8\xB6\xB9\xC0\xF4\xBB\xB4\xC0\xBE\x06\xC9\xC3\xC1\x07\xCC\xBF\xBE\xC1\xAB\x08\xC3\xCA\xC2\xBD\x07\xC0\xC3\xC6\xBE\x12\xD9\xC4\xC7\xC5\x02\xDB\xCA\xC4\xC6\x1E\xE1\xC0\xCB\xC8\x1D\xE4\xBE\x05\xC3\x10\xD6\xCF\xC5\xC9\x2C\xC5\xCB\xCA\xCB\x22\xED\xC1\xC5\xCC\x30\xE4\xC5\xCE\xCC\x2A\xF4\xC3\xCE\xCD\x3B\xF8\xCF\xC2\xB3\x29\xFF\xC6\x43\x07\x28\xC0\xD6\xD0\xBB\x42\xEE\xB9\xD2\xBA\x4B\xFE\xB1\xD3\xD3\x47\xCA\xD0\xD4\xD2\x53\xC3\x40\x08\x6C\x21\x05\xD4\xD5\xD4\x4C\xD5\xDD\xD4\xD7\x4E\xE0\xD5\xC5\xD3\x00\x22\x0A\xD6\xD4\x62\xDC\xC7\xCF\xDA\x3D\xEC\xD9\xCC\xCF\x6F\xFE\xCE\xD5\xD8\x5B\xF5\xD8\xDA\x41\x14", - "\x72\xB3\xDB\xDC\x7B\xC9\x44\x0B\xD9\x5F\xF6\xD1\xE3\xDD\x84\xC3\xE6\xE0\xDD\x85\xC8\xE7\xE1\xDF\x82\xCA\xEE\xE0\xE3\x89\xD0\xEB\xE2\xDA\x6D\xD5\xE1\xDE\xDB\x64\xE5\x00\xE3\xE3\x94\xD7\xE6\xE4\xD9\x9D\xE0\xEF\xCB\xE7\x0A\x66\x0B\xE6\xE4\x9C\xE3\xEE\xE7\xEA\xA2\xFA\xCC\xE8\xDF\xA1\xF0\xEA\xE9\xEB\x70\xF4\xE2\xDD\x42\x27\x27\xE1\xED\xDA\xB3\xF2\xEE\xEA\xED\x98\xFE\xE5\xEE\xF0\xB7\xCD\xE8\xEB\xF1\xBB\xC6\xF9\xF1\xE4\xCB\xD3\xED\xEE\xD8\x28\x3A\xEF\xF2\x41\x29\x12\xFF\xEC\xF1\xC1\xFC\xE7\xF6\xF6\xC3\xDC\xF5\xF0\xF3\xD3\xE0\xFB\xF6\xF2\xE1\xCE\xF3\xFA\xF8\xDD\xE4\xF7\xFA\xF9\xE9\xE8\xFF\xF4\xFB\xEF\xE9\xEC\x6E\x45\x7A\xCD\xF2\xFD\xFB\xF0\xD9\xFA\xF8\xFE\xF7\xF1\xF8\xF1\xF9\x01\x2B\x07\xE9\x2C\x06\x7A\xFE\x7F\x7B\x7D\xFD\x7A\x7E\xFB\x0A\x89\x7E\xD2\x62\x6D\x05\xA7\x6E\x05\x01\xFE\x76\x7F\x6B\x6F\x03\x82\x0C\x89\x82\x03\xFB\x74\x82\x00\x87\x86\x80\x15\x81\x86\x07\xA2\x88\x81\x0F\x9D\x85\x84\x06\x70\x04\x06\x9B\x8B\x80\x16\x8B\x70\x23\xF5\x63\x86\x0C\xA8\x83\x86\x10\xB5\x87\x84\x36\x94\x86\x0E\xB9\x8C\x86\x1C\xBE\x81", - "\x83\x26\x80\x88\x09\xBD\x82\x89\x1B\x85\x8B\x87\x3F\x98\x5E\x0C\x2B\x8F\x74\xEF\x47\x8C\x88\x2E\x9A\x80\xC0\x33\x00\x36\x1A\x30\x35\x06\xB0\x36\x04\x6C\x1A\x2A\x6E\x1C\x30\x31\x07\x4C\x8F\x26\x0E\x61\x88\x7B\x28\x81\x8A\x37\x3B\x04\x8E\x13\xE6\x83\x89\x24\x8D\x8C\x83\x4F\x8E\x8C\xF0\x6C\x86\x88\x3A\x88\x89\x8E\x78\x96\x8C\x14\xEF\x83\x20\x1E\x2A\x88\x8E\x7A\x92\x8D\x19\xFC\x8D\x80\x42\x92\x8B\x8E\xCC\x3C\x21\x0C\xF7\x81\x91\xD6\x3E\x07\x8F\x2D\x86\x93\x19\x92\x9D\x8D\x3C\x94\x95\x8E\x97\x8C\x91\x26\xFB\x88\x91\x4E\x83\x96\x93\x6B\x9B\x92\x20\xA1\x90\x94\x40\xA2\x94\x5E\x3F\x10\x91\x21\xA5\x91\x92\x31\x40\x0A\x95\x87\x9F\x92\x2C\xA4\x93\x96\x83\x01\x08\x96\x93\x8C\x97\xE2\x42\x08\x97\x4A\x8D\x97\x97\xA7\x86\x8F\x10\x3D\x98\x92\xB2\x44\x0C\x98\x9A\x9A\x95\x2C\xB4\x9C\x98\x53\x8A\x99\x97\xB5\x8D\x95\x34\xAB\x93\x9B\x65\x86\x7E\x23\x8B\x9C\x91\x35\xD0\x9D\x99\xC8\x46\x08\x99\xDA\x9D\x98\x35\xE2\x96\x9A\x69\xA4\x9C\x9B\xCE\x9B\x9A\x2F\xC1\x9C\x9D\x67\xAB\x9E\x9D\xC5\x9B\x9B\x11\x30\x38\x08\xD8\x09\x08\x36\x4A\x10", - "\x34\x48\x7A\x6C\x08\xD8\x0D\x08\x97\x4E\x00\x9F\x28\xE9\x9A\x43\x27\x02\xA6\x92\xF0\x89\x9A\x3A\xF1\x97\x9D\x77\x8B\xA2\xA1\x0D\xAC\xA0\x41\x93\xA6\x9C\x8A\xBE\x48\x0A\x07\xA0\x99\x42\xE1\x96\xA3\x72\xA3\x9D\xA3\xC7\x71\x09\x46\xED\x9F\xA0\xDF\x22\x21\x9B\x03\xB5\xA2\x4A\x9F\xAB\xA4\x8F\xAE\xA0\x9D\x2D\xB0\xA4\x4B\xB3\xAF\xA4\x87\x91\xA0\xA2\x20\xB6\xA4\x99\x53\x00\x36\x2A\x30\x35\x0A\xB0\x36\x08\x6C\x57\x00\x36\x92\x3A\x69\x0B\xB8\x9A\x0B\x48\x9B\xA9\xA4\x81\x1B\x0B\xA9\x25\xAD\xA9\x4D\x92\xA1\xA6\x9D\x95\xAC\xAA\x34\xB2\xA7\x54\xB8\xA7\xAA\xAE\x99\xAE\x24\x28\xA8\xA1\x54\xE2\xA7\xA6\x8E\x9D\xAE\xAC\x8B\x7D\x08\x54\xE5\xA6\x5A\x2F\x2B\xA9\xA7\x58\xBB\xA8\x5A\xF2\xA2\xAA\xAD\xB6\xAE\xAA\x59\xB8\xAC\x5D\xE4\xA0\xAE\xAF\xBB\xAA\xA3\x63\xA0\xB2\x86\x5F\x0F\xAD\xB3\xB5\xAA\xAF\xC7\x60\x0C\x6C\x61\x05\xB1\xBC\xB1\xAF\x78\x62\x0D\xB3\x5F\xA4\xAC\xAC\x7A\x63\x0A\xB2\x77\xAF\xB2\xC1\x64\x08\xB2\xC4\x9E\xB2\xB3\xA0\xBE\xAD\x66\x94\x65\x0D\xCE\xA1\xB6\x37\x66\x06\xB6\x68\x9F\xBB\xB5\xD3\x87\xB6\xB5\x7C\xA6\xB1\x6C\x8E", - "\xBD\xB4\x8A\x67\x0A\xB5\x73\xA3\xB5\x6E\xD5\x38\x0C\xDC\xAF\xB5\xB6\xBB\xB0\xB6\x60\xFD\xA1\xB8\xE0\xBF\xB5\xB8\xC8\xA7\xBA\x72\xB3\xBF\x71\x34\x30\x32\x0D\xB0\x2B\x0C\x6C\x6C\x00\x37\x36\x30\x36\x0D\xB0\x2F\x0C\x2E\xF0\x0E\xB6\xE6\xB6\xA9\x0E\xDD\xA3\xBA\x6C\xE2\xB4\xB7\xE4\x9E\xBC\xB5\xE6\xA4\xBF\x64\xCC\xA7\xBC\xE1\x80\x62\x0E\xE1\xB4\xB0\x71\xCB\xBA\xBC\xDD\xB4\xB8\x60\x73\x11\xBC\x7B\xF5\xB4\x0E\xFD\x81\xB2\xBE\xE3\xA0\xC1\x79\xF7\xBB\xBE\x01\xEB\xBF\xBF\x05\xC9\xC0\x82\x8B\xC5\xB3\xFA\x95\x85\x0E\xFE\xAD\xC2\x81\xF6\xB4\x5E\x3B\x11\xC3\xBE\xED\xB4\x63\x1D\x17\xC1\xC0\x05\xD2\xC6\xC3\x18\xCE\xC2\x76\x78\x0C\xC3\x01\xED\x31\x0F\x25\xC7\xC3\x87\x8C\xC1\xC5\x09\xE8\xBC\xC0\x2C\xDD\xC1\x8C\xD9\xAA\x0F\x14\xD4\xC2\xC4\xBC\x3B\x0C\x6C\x7C\x00\x37\x3E\x38\x96\x0F\x36\xCF\xC5\x86\xE9\xBE\xC4\xF7\xA0\xC2\xC6\x2B\xC9\xC9\x8B\xC7\xC2\x21\x3F\x01\xCE\xC8\x33\xCA\xC7\x92\xD1\xC6\xAE\x40\x0F\xCE\xB8\x43\xD0\xC6\x92\xC8\xC0\xA5\x40\x17\xCC\xC8\x4C\xD2\xC8\x97\xE3\xC9\xAA\x41\x1F\xCA\xCB\x53\xDB\xCA\x89\xB8\xC0\xCC\xBE", - "\x43\x10\x36\x84\x10\x35\x21\x38\x96\x11\x33\xD9\xCE\xBB\x87\x16\xCC\x9B\xE8\xC4\xCC\x31\xEB\xCD\xC8\x58\xDB\xCC\x10\x88\x10\x37\x44\x30\x32\x11\xB8\x8B\x12\x9E\x80\xD9\xB6\x46\x0B\xD4\x6C\x8D\x0F\xD0\x95\xC2\xC2\xD1\x4A\xCC\xD4\xCF\x7E\x4E\x10\x6C\x0F\x10\x36\x48\x38\x91\x12\x92\xCA\xCF\x4B\x92\x11\xD5\x34\xE6\xD5\xCF\x37\xD7\xD3\x9D\x96\xDF\x99\x49\x38\x94\x12\xB0\x35\x10\x6C\x16\x18\x97\x4B\x25\xD0\xD5\x15\x98\x13\xAD\x8B\x79\x12\x5C\x9A\x10\x36\x9B\x10\x34\x27\x38\x9D\x13\x5D\xFE\xCF\xA5\x9E\x06\xDB\xF1\x22\x02\x45\x80\x0C\x29\x21\xDE\x24\x3B\xB3\x86\x21\xDA\xE3\x13\xDB\x20\xD5\xC2\x3B\xB5\x82\x29\xDB\xE5\x1B\xD9\x20\xDD\xDB\x3B\xB7\x80\x01\xDC\xA0\x23\xDD\xDC\x37\x23\xDD\x78\x2B\x50\x28\xD9\x09\x26\x43\x7D\x2D\xD8\x51\x5B\x3E\xDC\x83\x00\x44\x38\x55\x3D\x2C\x50\x72\xD4\x29\x76\xCA\x27\xDE\xC6\x39\xDC\x71\x40\x2F\x2A\x7D\xE9\xDB\xDE\xC4\x2F\x36\xC1\xB4\x25\xDE\x84\xDB\x3C\xDF\x02\xE6\x39\xC3\x8B\x23\x3B\x88\xC2\x3B\xDF\x0A\x36\xE3\x72\x13\xE1\x20\x80\xC2\x3A\xE3\xDB\x24\xE3\x74\x66\xDE\xE0\xE1\x0A\xE3\xE0", - "\x37\x3C\xE1\xBF\xB7\x2C\xDF\xA7\x3D\x2A\xE5\x1E\xEB\x38\xC8\xC0\x28\xE3\x84\x2E\xE4\x38\x30\xF5\xE3\xC8\xB7\x25\xE0\x94\xF4\x23\xDC\xC9\x27\xE6\x71\x7E\xD5\xE5\x87\xCA\x23\xDC\x44\xF6\xDE\xCE\x8B\xE1\x26\x7E\xC8\xE9\xE5\xFF\xCB\xEA\xCF\xB1\x2D\xE7\xA1\xC7\xE5\xE8\x40\x22\xEB\xC5\xD0\xE8\xEA\x96\xCC\x59\xE7\x7D\x33\xE4\xCD\xB4\x2C\xDE\x7E\xC9\xEB\x20\x31\xFB\x3A\xD8\xE3\xED\x25\xAA\xDB\xEF\xE7\x45\xFB\x3A\xD6\xCB\x37\xEC\x84\xF5\xE6\x20\x58\x2F\xE5\xD4\xE1\xEB\xE6\xB2\xCA\x21\xEF\x38\xFB\xEC\xBE\xFD\xE4\xEA\xC2\xED\x20\xE8\xD3\x33\xED\xC8\xDC\xE5\xE5\xBB\xC3\x22\x2A\x7A\xE9\x21\xDA\xC0\x2B\xEC\xB6\xEB\x24\xDF\x90\xE1\xF2\xE4\xD2\xE6\xEA\x9A\x2E\xEC\xEE\x57\xED\xF3\x4D\x0A\xF6\xF3\x96\x2A\xE1\x39\x95\xF6\xF1\xEA\xEC\xEF\xF3\xC5\xF0\xED\xEB\x34\x24\xF5\xE9\xAB\x27\xF4\xCE\xEF\xE9\x26\xAB\xE3\xED\xEB\xB3\xFB\x24\xC4\xFD\x2A\xF6\xB3\xF5\xF4\xBB\x8C\xF3\x20\xB3\xE1\xF5\xF8\x29\x75\xEE\xB3\xC9\xF4\xF8\x81\x06\xFC\x26\xB9\xF4\xE7\xB8\x99\xFE\x5C\xE5\xC0\x00\xF0\x01\xE6\xF0\x4B\x63\xD7\xE7\xEA\xCD\xF9\x20\xD4\xFA\xDA", - "\x42\x61\xFC\x5E\xEB\xD8\xFA\xFC\x51\x2C\xF8\xC3\xFF\xE6\xF6\xD0\xEF\xF6\x20\xF0\xCC\x5E\xF5\xC1\x4D\x2F\x73\xD3\x3E\xFE\xF5\xEA\x20\xBA\xEF\xF8\xDB\xFB\xFA\xFE\xFF\xD0\x60\x80\xD4\x62\x80\x03\x1B\x6E\xF2\x7F\x7D\x00\x01\x7F\xD9\x7C\x74\x87\x72\x78\xDE\x7B\x7E\xE9\x79\x7F\xEF\x64\x80\x1D\x2D\x7E\xAE\x71\x13\xE3\x60\x7C\x18\x8F\x7F\x12\x83\x80\x1D\x8D\x7F\x1F\x8C\x6D\x14\x80\x6E\x23\x84\x6E\x25\x8B\x7F\x1B\x89\x10\x06\x8F\x80\x31\x1A\x72\x0A\x8F\x71\xDA\x7D\x7B\x0A\x1A\x72\x24\x71\x80\x21\x84\x82\x37\x86\x82\x39\x88\x82\x0D\x86\x83\xD2\x6C\x81\x3F\x8E\x83\xD6\x60\x1E\xEA\x7D\x82\x0A\x1F\x82\x32\x71\x83\xFF\x03\x6E\xBB\x7A\x25\xD6\x74\x7E\xE2\x6A\x10\x1A\x8D\x83\x06\x14\x83\xC7\x72\x10\x56\x80\x7D\x4A\x83\x6E\xE7\x7E\x6D\x40\x83\x84\x42\x88\x7E\x1E\x81\x84\x63\x80\x86\x65\x82\x86\x20\x84\x86\x69\x86\x86\x05\x85\x84\xA6\x77\x84\x16\x8C\x7B\x4B\x89\x71\x6E\x8C\x12\x2A\x70\x85\x35\x88\x77\x71\x8C\x7B\xDD\x77\x7B\x54\x83\x10\x7D\x8B\x1C\x81\x87\x81\x7F\x84\x71\x7D\x13\x88\x72\x8C\x84\xD3\x18\x88\xBC\x73\x6E\xD1\x78", - "\x87\xBC\x71\x7D\x40\x10\x89\xB3\x72\x89\x37\x14\x89\xA5\x76\x89\x34\x18\x89\xAA\x7A\x84\x8C\x83\x7B\x9F\x85\x7A\xDC\x7B\x88\x9E\x8B\x85\x0E\x82\x1C\xA1\x86\x79\xA9\x8C\x76\x8A\x87\x88\xA5\x8C\x80\xDB\x74\x87\xAE\x80\x8B\x32\x81\x56\x2B\x1B\x8A\x63\x73\x8A\xB3\x83\x75\x85\x8D\x71\xA4\x84\x8B\x73\x89\x10\x4D\x84\x13\xB8\x82\x7D\xB2\x8A\x86\xCE\x7B\x87\xB3\x73\x6E\xFE\x1B\x8B\x9D\x71\x13\xC5\x89\x87\x80\x85\x82\xCD\x84\x1C\xD1\x87\x13\xD7\x8C\x7F\x86\x88\x8C\x01\x15\x8D\xC6\x19\x8D\xD0\x86\x8A\xC2\x84\x8D\xBF\x8C\x8B\x2C\x10\x8E\xBD\x80\x00\xD1\x7C\x8C\xE5\x8F\x8C\xE9\x8F\x7C\xB8\x7F\x8A\xE6\x87\x8B\xE2\x86\x10\xC5\x88\x8E\xE7\x85\x8F\x68\x7D\x8E\x7E\x89\x8F\xC0\x8D\x8A\xD6\x82\x8F\xEE\x81\x8B\x09\x11\x7D\xF8\x85\x8B\x21\x2A\x8C\xA5\x77\x90\xFF\x0C\x90\xBA\x81\x90\xC0\x8E\x90\xA7\x82\x88\x02\x9D\x8F\x08\x93\x10\xC3\x81\x8E\x11\x9A\x8F\x02\x16\x90\x1C\x91\x10\xF0\x8F\x86\x05\x93\x1D\x2A\x71\x7D\x2A\x7D\x25\x91\x76\x10\x3E\x2A\x79\x2A\x94\x92\x44\x89\x92\x03\x1E\x8D\xC2\x1A\x72\x59\x86\x84\x61\x8B\x71\x5F\x83\x93", - "\x52\x8E\x92\xE3\x8D\x17\x9C\x8C\x76\x2A\x75\x8C\x3F\x93\x76\x41\x9C\x93\x06\x10\x22\x12\x7A\x10\x48\x9A\x93\x09\x1B\x94\xCB\x1E\x5C\x45\x7E\x74\x4E\x13\x95\x36\x74\x95\xF6\x86\x95\xD3\x85\x95\x11\x84\x15\xEC\x79\x10\x5D\x87\x7D\x5D\x9A\x87\x5E\x91\x96\x57\x1E\x15\x66\x9D\x93\x06\x1D\x7A\x6A\x97\x96\x69\x9B\x93\x09\x1A\x72\xE1\x6B\x82\x02\x12\x97\x01\x14\x97\x00\x06\x97\x78\x9F\x92\x06\x16\x97\x32\x9E\x8B\x13\x8D\x94\x0D\x1A\x10\xF4\x7A\x74\x09\x13\x98\x03\x18\x84\x00\x06\x98\x07\x12\x98\x81\x99\x10\x28\x96\x10\x5F\x2B\x79\x09\x11\x99\xF0\x7A\x10\x94\x93\x10\x4E\x90\x00\x97\x92\x10\x2B\x93\x10\x77\x29\x10\x79\x25\x98\x13\x90\x00\xA1\x90\x24\x70\x80\x9A\x8C\x90\x98\xA8\x92\x9A\x09\x1D\x99\x02\x15\x9A\x03\x1F\x98\x03\x1F\x28\xAC\x94\x98\x06\x14\x9B\xA6\x9F\x97\xB7\x99\x9A\x47\x9A\x10\xB8\x93\x10\x8A\x91\x10\xAE\x91\x10\xBF\x92\x10\xB2\x92\x10\x91\x25\x9B\xFB\x89\x10\xC9\x99\x9B\x95\x9C\x9C\xBC\x98\x99\x0A\x1D\x9C\xC0\x9D\x98\x06\x14\x9D\xC6\x9F\x10\x90\x21\x77\x21\x9D\x1A\x83\x87\x35\x71\x7A\x94\xF2\x6D\x72\x0A", - "\x10\x9E\xE1\x9A\x92\xE3\x91\x77\xD1\x37\x9E\x40\x29\x9E\x23\x99\x10\x12\x4C\x9E\xB1\x9E\x9E\x5C\x90\x9F\xF2\x93\x10\x13\x04\x9F\x0E\x78\x45\xF7\x91\x10\x14\x0A\x9F\x08\x79\x46\xFD\x94\x9A\x00\xA1\x10\xAD\x77\x4B\x03\xA6\x01\x05\xAE\x1A\x0A\x1C\x4B\x03\xA7\x01\x0B\xAA\x78\x0E\xAD\x9F\x18\x0B\xA0\x2F\x17\x4F\x03\xA9\x01\x0B\xA1\x6E\x06\x53\xA0\x1A\x0B\xA0\x50\x8E\x53\x45\x75\x8C\x2F\x1F\x95\x44\x53\xA2\x7C\x2A\x72\x42\x58\xA2\x1A\x26\x97\x40\x5C\xA2\x64\x2D\x97\x00\x0F\x54\x30\xA3\x10\x1B\x0B\xA0\xE3\x6A\x54\x03\xAC\x01\x0B\xA2\xA3\x34\xA5\x72\x83\x8D\x01\x38\xAA\x10\x3A\xAD\x9F\x1E\x0B\xA0\x69\x7E\x56\x03\xAF\x01\x48\xAA\x10\x84\x53\xA0\x20\x0D\xA4\x09\x1F\xA4\xFD\x91\x02\x0B\xAF\x09\x71\x7F\x74\xBC\x11\x9E\xDD\x98\x2F\x25\xAC\x27\x45\x18\x4B\x2F\x11\x7D\xE1\x93\x6E\x5D\xA0\x30\x2F\x13\x94\xCC\x1F\x12\x83\x87\xA6\x62\x2F\x12\x53\x8D\x1A\x69\xA2\xA6\x58\x9E\x27\x63\xA4\xA7\x68\x90\x25\x5F\xA6\x8B\x68\xA3\x83\x60\xAC\x96\xC8\x79\x10\x8A\x7A\xA5\xBE\x16\xA6\x7F\xA7\x93\x00\x04\xA2\x7C\x2C\x8E\x1A\x2F\x12\x69\x7F", - "\x95\x9B\x90\x92\x7C\x2D\xA6\x87\xA6\x10\x9F\x97\x95\x62\x33\x88\x32\xA5\x1D\x2F\x18\x9D\x01\x1F\x95\x0C\x3C\xA7\x73\xA2\xAA\x71\x77\x32\x5A\x96\x3C\x50\x8B\xA9\xDA\x1F\x12\x59\x33\x96\xB8\x37\x3A\x20\x7E\xA6\xEA\x95\xA7\x8F\x30\x72\xAA\xAB\xA5\x0A\x12\x40\xAE\xA6\x10\x30\x49\x90\x1A\x2F\x95\xB2\xA5\x74\x4B\x47\xAA\x91\x3F\x95\xB7\xAE\x1B\x2F\x1C\x9F\x62\x96\x10\x02\xAE\xAB\x64\x2D\x7A\xC1\xA5\x72\x7E\x44\xAC\x8B\x3D\x7A\xC7\xA9\x1A\x2F\x19\x4A\xBB\xA3\x10\xD8\x4E\xAC\x50\x2A\x78\xD1\xAE\x70\xDF\x44\xAD\x8F\x3A\x78\xD7\xA2\xA7\x0A\x18\xA1\xCB\xA3\x10\x1D\xAE\xAD\x7E\x2A\x72\xE1\xA8\x70\x18\x54\xAA\x1A\x2A\x72\xE7\xAA\x1B\x2F\x12\x52\x5B\x93\x10\x2F\xAE\xAE\x57\x21\x6E\xF1\xA3\x6F\x2B\xAE\xAF\xC7\x31\x6E\xF7\xAB\xA6\x0A\x17\xA2\x06\x10\x85\x3F\xA1\xA8\x64\x26\x97\x3C\x88\xAE\xE7\x42\xA3\x76\x9C\xA9\xDB\x49\x76\x99\x96\xB1\x1A\x20\x56\x4B\x1C\x27\x99\x98\x98\x1A\xB0\x52\xC3\x90\x00\xC7\x97\x25\x2F\x1A\xA4\x04\xB6\x30\x25\xBA\x99\x95\xA0\x25\x54\xA3\x10\x84\xA9\x1A\x91\xA0\x00\xC5\x96\xB2\xDB\x43\xB3\x97\xAA\xA7", - "\xDB\x49\xB3\x8B\x9D\xA8\x7C\x2C\x58\x09\x1E\x7B\x04\xB0\x9B\x02\x15\xB3\xD7\x2F\x4C\x46\xB1\x9C\x47\xBA\x10\x97\x54\xAF\x64\x2E\xA9\xA4\x9D\xB2\x59\x55\x2A\x06\x1F\x2D\x64\x2F\x12\x9C\x5A\x37\xA5\x51\xB4\x7C\x2B\x2C\x09\x18\x2A\x3E\xB9\x10\xB7\x5E\xB4\x50\x26\xB5\x03\x1E\xB5\x57\xBB\x4D\xF1\x26\x10\xA6\xA9\xB6\x09\x1D\x5B\x64\xBE\x27\x6D\xB3\x10\x66\x31\xB6\x64\x20\x95\x1D\xBA\x21\x44\x39\x10\x66\xB6\xA7\x0A\x12\x5D\x7A\x34\x5D\x5C\xBA\x37\xFC\x6B\xB7\x06\x1D\xAA\x6E\xB0\x52\xE6\x96\xA3\x52\xB1\x10\xD8\x5A\x37\xDA\x53\xB8\x79\xB4\xB0\x8B\xB2\x10\x88\xBA\xB3\xE7\x47\xB9\x02\x11\xAA\x89\xB3\x10\xE0\x51\xB7\x57\x25\xB7\x43\x3D\xB8\x76\x59\x37\x06\x1A\x39\x76\xB3\x10\xF0\x50\xBA\xD7\x28\xBA\xD4\x34\xBA\xD5\x19\x5F\x92\xB0\x25\xA6\x33\xBB\x7E\xB9\x10\x10\x6C\xBA\x94\xA9\x10\xB5\xBB\xAE\xB7\xB6\x10\x16\x6C\xBA\x50\x8C\x6F\xBD\xB3\x10\x64\xA1\x77\x1B\x6C\xBA\xB1\xA5\x3A\xE3\x74\xBA\x24\x6C\xBA\xC0\xAC\xBC\x82\xA4\xBA\x28\x6C\xBA\xD0\xA2\xBD\x98\xAD\xB9\x02\x15\x63\xAC\xB0\xAE\xD8\xB8\x91\xA4\xBA\x63\xAC\xB0\xAF\xDF", - "\xB8\x85\xA4\xBC\x63\x7A\x3E\x63\xB6\xB8\x83\x04\xB9\x3B\x7E\x34\xBA\x4E\x6C\xBA\xD5\x1B\x9E\x06\x1E\xBE\xDA\xBF\x52\xD5\x3C\xBB\xB0\xBE\x41\xF4\x36\x10\x04\x49\xBA\x02\x16\x65\xF2\xBA\x1D\xFF\xB6\x10\x2A\x40\xC0\x57\x2E\x65\xEB\xB7\x2D\x10\x49\x10\xAE\xB8\xB9\x06\x1F\x66\xAC\xB6\x97\xFC\x6D\xC0\x06\x17\x41\x08\xC6\x57\xF1\x97\xBA\xA4\xB1\x67\xAC\xB2\xA3\xFC\x6B\xC1\x03\x18\xC1\xF7\xB6\x57\x24\xC3\x10\xBA\xA5\xC2\x73\x63\xC0\xBC\x17\xC0\x06\x16\xC1\x10\xC1\x53\xBD\xA3\x10\x5A\x49\xC1\x75\x6C\xC2\xBE\x14\x45\x0B\xC1\xB2\x03\x19\x67\xAC\xB9\x76\xFC\x6A\xC3\xBE\xB6\xB3\x09\x14\x68\xAC\xB8\x98\x41\xC7\x8C\x31\xC2\x10\x86\x6C\xBA\x99\x99\xC4\xFB\xAF\xBB\x03\x18\x68\xAC\xB3\xB2\x50\xC6\x10\x71\xA8\xAF\x0A\x1A\x68\xAC\xBA\xB4\x57\xC9\x95\x25\xCE\x68\xAC\xBB\xB2\x5F\xC2\x10\x19\x98\xAD\x0A\x11\x69\xAC\xB3\xB3\x65\xC1\x10\x35\x98\xC6\x09\x1A\x69\x7A\x3C\x69\x0B\xCC\xB3\x92\xA9\x10\x56\x49\x10\xC3\xA5\xC2\xA0\x68\xC3\xA9\x1A\xAC\x03\x19\xC7\x25\xC5\x41\x35\xC6\x10\x42\xCB\xC4\x2F\x5C\x45\x06\x13\xAD\x25\xC4\x6A\x7E\xCD", - "\x1A\x60\x4B\xC3\xAB\xAA\x10\xAE\x6C\xBA\x44\xB7\xC7\x06\x11\xC9\x43\xCB\xB4\x09\x10\x6B\xAC\xB6\xB4\xFC\x6A\xC9\xC6\xB4\xBA\xB2\x6C\xBA\x50\xB1\xCA\xCD\xB9\xC1\xB4\x6C\xBA\x54\xBE\xB0\x03\x12\xCA\x02\x19\xC5\x08\xB9\x10\xB6\x6C\xBA\x60\xB4\xB0\xB0\xC1\x10\x8A\xA5\x74\xBA\x6C\xBA\x68\xBE\xCA\x02\x19\xCB\x00\x07\xC6\x12\xB6\x10\xBD\x6C\xBA\x7D\xB8\xC9\xAF\xCE\xA7\x19\xCF\x6B\x7A\x31\x6C\x0B\xCB\xB6\xC0\xC1\x10\x63\x49\x10\x5E\x49\xC1\xC5\x6F\xC8\x68\x4A\x10\xD5\xC3\xC8\x1E\x4C\xC8\xCB\xC9\xC1\x15\x4A\x48\x06\x1A\xAD\x25\xC9\x6C\xDA\xCC\x1C\xE6\xC3\x10\xC7\x42\xCE\xDA\x18\xA5\x92\xCC\x1B\xAF\x49\x10\x85\xC8\xC8\x00\x01\x0A\xA7\x3C\xB9\xD3\xC0\x00\xF3\xCB\xC8\xA4\xB2\x0A\xA7\x33\xB7\xC9\x89\x10\xFD\xC3\x10\xC3\x4E\xCE\x25\x48\xA0\xFE\xC9\xC1\xA3\x07\x3A\x86\xBB\xCF\x0A\xD6\xD0\xFB\xB5\x42\x13\xA2\xD1\x08\xD6\x40\x07\xD6\x10\x8F\x49\xC1\xA4\x08\x4B\xED\xC6\x10\x05\xD2\xC5\x59\x5D\xAD\x03\x19\x4F\x19\xC5\x0A\xB8\x43\x4F\xF1\xC8\xAC\x0A\x16\x0A\xA7\x35\xB9\xCA\xC2\x10\x2A\xDB\xC9\x3C\xC2\x10\xA7\x07\x3A\x9A\xB1\xD3", - "\x01\x13\xD3\xA3\xC9\xC1\xA8\x07\x3A\xA2\xBB\xCF\x3C\xD2\x10\x6A\xA1\x9E\xA9\x07\x3A\xA6\xB2\xD4\x6E\x95\xC2\xAA\x07\x3A\x7F\x3A\x37\x43\xDA\xCB\xA4\xBB\x0A\xA7\x3F\xC0\x03\xD6\x10\x51\xD3\xCC\xA4\xBC\x0A\xA7\x35\xBC\x57\xD3\x10\x59\xDF\xC6\xC5\xC3\x10\xAD\x00\x1B\xAE\x07\x74\x0A\x16\xBF\xFB\xC5\x4F\x09\x13\xAE\x25\xC0\x0B\xB8\x4A\xAE\x03\x1C\xD6\xDE\xC5\x42\x26\xD8\xD5\x13\xD6\x40\xFB\x46\x10\xFF\x49\xC1\xB1\x08\x4B\x7D\xD6\x10\xFA\xA5\xD7\xBE\x12\x0B\x68\xDA\x21\x01\x59\x10\x77\xD6\xCF\xB4\x07\x3A\xF4\xBB\xCF\x89\xD6\x10\xF3\xA4\xD8\xFE\x3D\xAE\x03\x13\xD9\xF6\xC5\x41\x98\xD2\x10\xFD\x49\xC1\xB5\x08\x4B\x83\xD3\x10\x91\xD9\xD9\x1E\x47\x52\x6C\xB4\xBA\xB6\x07\xD8\x64\x29\xBF\x04\xB6\xDA\x03\x15\xC0\xF6\xC8\x0B\xAA\xD0\x25\xFD\xBB\xCF\xAE\xD2\x10\xEB\xC2\xD2\x01\x1A\x0B\xB3\xDE\x27\x29\xC6\xDB\x0A\x11\xD8\xF6\xCC\x0B\xBD\xD7\x25\xB0\xDF\xD5\x02\x12\xA2\x06\x1C\x53\x19\xCE\x0B\xC5\xD7\x3C\xFD\xA3\x10\xCC\xD5\xC2\xC0\x0F\xDC\x06\x33\xB0\xD2\xD4\xBA\xC2\x06\xDD\x03\x3A\xB0\xD9\xD9\xC1\xC4\x0C\xDD\x14\x36\x54\xA7", - "\xD9\xC1\xC6\x04\xAB\x0C\xCF\xDC\xE4\xDF\xDA\xA4\xB9\x0C\xE8\xD5\x1D\x27\xC2\x10\xE3\x6B\xDE\xB8\xD4\xBA\xCC\x0F\xDE\xDA\x13\xC3\xF2\xD3\x12\xC1\xD4\xBA\xCF\x08\xDF\xBC\x17\xC8\xFB\xD9\x10\xF4\xD1\x10\x2B\xB5\xD3\x01\x12\x0D\xE2\xDE\x1B\x80\xC8\xDC\x01\x15\xA4\x03\x12\xD0\x44\xC6\x10\xD4\x0B\xE0\xA9\x15\xCF\x03\xE6\x10\x10\xE2\x10\xC7\xD3\xE1\x03\x16\x0D\x16\xED\x1A\xD7\xC3\xB9\x03\x1B\xE1\x01\x19\xDB\x1E\xE2\x10\xD8\x01\xE2\xBA\x1D\xCD\x30\xB4\xA4\xFD\xD9\xC1\xDA\x0C\xE2\xCC\x10\xCE\x19\xE5\xE2\x0A\x17\xE0\x93\xC9\x10\xDC\x07\x3A\x1B\xD4\xB0\x0D\xB2\x10\x48\x59\xC1\xDD\x08\x4B\x1C\xB1\xE1\xA4\xBE\x0D\xA9\xC4\x26\x28\xE9\xA8\x25\x1A\x10\x1D\xEC\xC9\x06\x12\x0E\x4B\xE0\x25\x15\xD2\x10\x83\x87\xE4\xF5\xD9\xC1\xE6\x05\xE5\x7E\x24\xD2\x58\xEF\xE4\x09\x12\xDC\xBA\xD0\x00\xEA\x0E\xE5\x57\x24\xD7\x60\xC3\x10\x5A\xE6\xE0\xA4\xBE\x0E\x00\xEE\x1B\x7B\xDF\xE2\x09\x18\xB2\x03\x1A\x56\x19\xC1\x0F\xB8\x46\xE7\x02\x12\xE1\x52\xE3\x10\xF2\x01\xE7\xA9\x14\xE6\x52\xD5\xE7\x50\xE4\xBA\xF5\x02\xE8\xAD\x1B\xD9\x85\xE6\x10\x7C\xE7", - "\xE2\xA4\xB8\x0F\x8A\xEA\x1B\xD3\xDB\xE6\x02\x1F\xE8\x00\x04\xE8\x7F\xE2\x10\xFB\x03\xE9\xCC\x18\xDD\x61\xE6\xE8\x8E\x94\xBA\xFE\x04\xE3\x2F\x13\xE4\x24\xE2\x10\x2F\xB2\x10\x78\xE5\xC2\x00\x0B\xA0\x06\x3B\xEA\x01\x1E\xE7\x08\xEF\xEA\xF2\x6B\xCB\x06\x11\xE4\x8D\xE3\x10\xB2\xE0\x00\x51\xE5\xEB\x04\x07\xEB\x7C\x28\xE9\x83\x8D\xEB\x4D\xE5\xEB\x07\x02\xEC\x1A\x20\xB4\xD9\xBC\xEB\x31\xE5\xC2\x0A\x0A\xEC\x64\x29\xB5\xCD\xEA\xEA\x39\xE4\xBA\x0D\x02\x6F\x31\xBD\x1A\x63\xB9\xEA\x01\x1A\x58\xB0\x78\xAC\x34\x73\xA0\x1D\x91\x9E\x83\x84\x14\x42\xB4\xB0\x44\x1F\x95\x44\x10\x85\x44\x1D\x7A\x44\x1A\x78\xF1\xE1\x9E\xF2\xEE\xA6\x67\xAF\x0F\xFC\x68\xEE\x03\x2B\xED\x04\x95\x74\xE9\xE4\xE7\xFE\xE5\xA6\x02\xF1\x77\x24\xA1\x8D\xE7\xEC\xA6\xE1\x95\xD4\x6A\xAF\x0F\xEE\xE3\xAA\x45\x7D\xF0\x68\xE3\x6F\x10\xFF\x9E\x07\x22\x89\x20\x74\x14\x17\xF7\xA7\x71\x79\xF1\x4A\xCE\x70\x5F\x9B\x15\x1F\xF0\x14\xEC\xEB\xA7\x45\x73\xF2\x64\x9E\xF1\xE1\x94\xCC\x2E\x1A\xF2\x2B\x10\xEF\x2F\x1E\xF2\x80\xAE\x70\x30\xF3\xBD\x7F\x12\xCB\xFF\x02\xEF\x70\xA4\xEF", - "\x3A\xF1\x77\x62\xDE\x12\x3D\xF4\x7B\xE1\x92\x7C\x6F\x91\xF4\x44\xFC\xF3\xE1\x91\xB1\x2E\x18\xF4\x2B\x11\x6E\x44\x1C\xF4\x2F\x1E\xF4\x39\x98\x70\x15\xB3\x14\x53\xF7\x13\x76\x94\x14\x57\xFF\x12\x59\xFA\x97\x25\x7B\xF5\x09\x17\xB0\x00\x07\xB0\xFF\x02\xA3\x44\x12\xA3\xE7\xE2\xA3\x40\x70\xC2\x8E\xA3\x20\x93\x70\x14\x69\x74\x14\x6F\xFF\x12\x20\xB3\x14\x73\xF7\x13\x88\x94\x14\x77\xF1\x9E", + "\xC3\x30\x01\x00\xB9\x16\x00\x00\x1D\x00\x01\x82\x80\x0F\x03\x82\x81\x82\x06\x89\x82\x90\x0A\x83\x0A\x85\x0D\x0A\x9F\x0A\x86\x1A\x85\x16\x84\x1A\x0A\xBA\x0A\x80\x2A\x80\x26\x84\x27\x0A\xD5\x0A\x9B\x2A\x87\x2E\x85\x7E\x0B\x09\xBF\x6B\x9C\x93\x96\x84\x00\x2D\xAD\xAF\x91\x9C\x93\x98\x9B\x7F\x36\xB4\xB9\x91\x9B\x9A\x9A\x85\x9B\x38\xBF\xB7\x8F\x9F\x91\x02\x84\xA3\x09\xC8\x86\x82\x07\xA2\x87\x01\xA6\x09\x84\x10\xA6\x85\x03\xAB\x80\x03\x56\x82\x87\x19\xA1\x80\xA1\x9F\x9A\x0A\x88\x1C\xB0\x93\xA2\xA2\x9C\xB3\x3C\xE8\xBE\x8A\x95\xB4\xB7\xB2\xB7\x69\xF0\xAB\xA6\x8E\xAA\xB4\xB0\xB9\x77\xF4\xAD\xBA\xBF\xB4\xBD\xB8\xBF\x73\x83\xB5\xB8\xBE\x96\xB9\xC2\xC2\x41\x88\xDF\xA7\xC0\xC1\xBE\xC1\xBD\x8F\xFD\x91\xDF\xB3\xC9\xC2\x81\xC1\x8D\x8C\xD5\xCE\xC7\xC8\xC9\xCE\xC9\x9F\x94\xE1\xD6\xCD\xAE\xCD\xD2\xD0\xA7\xA2\xE9\xC4\xD4\xB0\xD5\xD6\xD5\xAF\xAC\xD8\xDB\xCA\xCA\x81\x05\xB1\x0A\x0A\x8C\xAA\xC6\xC1\xC5\xCC\xDF\xB4\xC0\xE3\xDC\xCB\xD4\xE1\xD8\xE3\xB3\xC3\xF5\xC5\xEB\xE7\xE1\xE7\xE4\xCC\xC2\xD1\xEB\xC2\xEE\xE5\xEA\xE8\xD6\xD4\xDA\xFD", + "\xDB\xEC\xDE\xEF\xDF\xDD\xE0\xDC\xE3\xF9\x84\x07\xB1\x06\xBA\xE4\xE2\xFF\xE1\xE1\xF1\xF6\xF5\xEF\xEC\xCA\xF7\xE6\xD1\xEC\xF9\xF9\xEE\xF8\xF7\xF3\xEB\xFE\xFA\xF8\xFE\xFF\x7E\x7B\x7B\x80\xF1\x44\x8A\x7D\x42\x08\x46\x4A\x53\x40\x0C\x49\x4B\x6E\x81\x00\x90\x82\x81\x81\x14\x87\x82\x84\x76\x18\xB5\x79\x86\x6B\x1B\xB0\x6D\x86\x6C\x1A\xA1\x8C\x86\x88\x1E\xA4\x80\x8B\x88\x28\xA5\x89\x88\x6B\x12\x23\x5E\x42\x83\xFD\x5F\x88\x72\x89\x33\xAB\x85\x8E\x8A\x38\xA7\x89\x8F\x8D\x3A\xBD\x8C\x8F\x8F\xCF\x74\x81\x92\x8D\x43\xBB\x85\x92\x8F\x47\x80\x94\x7C\x91\xD5\x55\x03\x5A\x05\xE9\x41\x82\x8D\x92\x54\x8B\x96\x92\x95\x48\x98\x9A\x91\x7E\x11\x95\x8D\x96\x85\x5E\x93\x80\x9B\x98\x5F\xA5\x92\x9A\x99\x53\x9A\x95\x94\x97\x00\x18\x03\x59\x06\x51\x97\x82\x92\x9A\x74\xAC\x99\x9A\x9D\x73\xB8\x9C\x92\x9E\x57\xBC\x99\x96\x9F\x5B\xB1\x89\x9E\xA0\x7B\x8F\x43\x58\x07\x71\xA1\x97\x9C\xA1\x7D\x8C\xAF\x9E\xA3\x81\x92\x93\xA2\xA4\x85\x94\xAD\xA2\xA5\x8F\x98\xA1\xA6\x9C\xAE\x5E\x03\x5A\x44\x30\x9A\xAB\x98\xA4\xA3\xA2\xA5\x9C\xA9\xA7\xA6\xA0\xA1\xA9", + "\x9C\x97\xAD\xA9\xA6\xAF\x9B\xAA\xA3\xA4\x06\x61\x03\x5A\x08\x89\xA4\x97\x9B\xAE\x8B\xAA\xA8\xAB\xAA\xA9\xB1\xAC\xAB\xAC\x95\x82\xB1\xB0\xB1\xAE\x88\xB0\xAE\xB2\xC6\x64\x03\x59\x09\xB9\xA8\x94\xAC\xB3\xC3\xBA\xAD\xAE\xB1\xC0\x99\xBF\xAF\xB6\xBE\x9D\xB8\xB4\xB7\xDF\x89\x47\x0B\x58\x28\x11\xBC\xAF\xB4\xD6\xA8\xB2\xB5\xB1\xD4\x87\xB9\xB8\xBB\xEF\x89\xB1\xBF\xB2\xF3\xB2\xA5\xBD\xB5\xEB\xB2\xB9\xBC\xBD\xFB\xB6\xBD\xBC\xBE\xE7\xB0\xBF\xBE\xBB\x03\xDA\xBE\xB5\x98\x2A\x23\x57\xB5\xBB\x06\xE1\xBE\xC0\xC3\xE0\x90\xC7\xC3\xBD\x04\xC1\xCA\xBE\xC5\xFC\x98\xCE\xBE\xC6\x00\xCB\xCA\xAF\x0A\x0A\xEA\xBC\xC5\xC5\x1E\xC5\xC1\xC4\xC5\x0D\xD2\xCF\xC0\xCA\x27\xC1\x4C\x09\xC8\x02\xE3\xC9\xC8\xCB\x13\xE6\xC5\xCE\xCC\x2D\xF8\xC7\xCD\xC9\xBB\x96\x49\x51\xCE\x3C\xC1\xD2\xCA\xD0\x31\xC4\xD7\xC6\xD1\x19\xC8\xDB\xC6\xD2\x1D\xC3\xDE\xD1\xD1\x4F\xC7\xD1\xD5\xD2\x22\xEE\x00\xCE\xD4\x50\xD9\xD8\xD7\xD6\x54\xDA\xDD\xD4\xD7\x4B\xD3\xD1\xDA\xD7\x63\xE0\xDD\xD0\xD9\x67\xE6\xD4\xCA\xD8\x69\xDF\xDE\xD9\xD9\x19\xEF\x07\xD7\xDB\x6D\xF0\xD6\xDD\xDD\x78", + "\xEB\xD8\xDA\xDE\x6A\xF3\xC6\xCF\xCA\x7F\xEA\xC2\xE0\xCD\x80\xFA\xC5\xE0\xD3\x7C\xF4\xD9\xE3\xDD\x8B\xF9\xDC\x98\x0C\x73\xCC\xEE\xDE\xE1\x83\xC1\xE4\xE1\xE5\x94\xD7\xEA\xE6\xE5\x9C\xD9\xED\xE4\xE2\x93\xD8\x71\x0F\x58\x32\x11\xEE\xE0\xD0\x6C\xCD\xEA\xE9\xE8\xA9\xEC\xEB\xDC\x9B\x33\x26\xEB\xE8\xEA\xAF\xF4\xED\xDE\xED\x8A\xEE\xE7\xEF\xCE\xAD\xF8\xE2\xE6\xEF\xCD\x58\x4F\xCC\xEF\xB5\xF7\xC5\x0E\xEC\xBA\xF9\xE0\xF3\xEC\xC4\xFB\xE7\xE1\xEF\xCD\xCA\xF1\xF7\xEF\xD3\xE7\xE5\xF4\xF3\xCF\xC5\xF9\xF6\xF3\x98\xFC\xC6\x0C\xF2\xCB\xC9\xF4\xF7\xF6\xD2\xE4\xF3\xF9\xF7\xD0\xC6\x47\x0C\xF8\xD7\xE2\xF6\xF6\xF9\xEF\xE8\xFA\xF6\xFC\xDC\xDB\xEE\xE7\xFD\xA0\xE1\xFA\xFD\xFB\x0A\x78\x0C\xF8\xFC\xD8\x74\x7D\xF9\x02\x87\x7C\xFB\x79\x7C\x7F\x08\x80\x82\xFB\x01\x86\x81\xF4\x44\x81\x7E\x0D\x93\x7D\x04\xF5\x7F\x73\xFA\x39\x07\x7F\x0F\x95\x62\x46\x43\x7A\x81\xFD\x5D\x81\x81\x19\x8B\x82\x08\x9E\x81\x84\x12\x93\x83\x80\x27\x85\x81\x05\x92\x8B\x84\x0A\xB8\x7E\x81\x29\x90\x81\x0B\xA8\x83\x86\x15\xAF\x84\x85\xF7\x7B\x04\x06\xB1\x8C\x81\x1A\xB2\x87", + "\x86\x2E\x87\x83\x07\xC3\x85\x85\x9B\x7C\x03\x87\x01\x3D\x04\x12\xC0\x84\x86\x26\xB6\x82\x88\x45\x84\x88\x0F\xA3\x87\x66\x1F\x0B\x8F\x07\x4B\x90\x8B\x14\xB9\x6C\x22\x0E\x91\x8F\x8B\x5B\x80\x85\x18\xD2\x8E\x87\x1E\x8E\x8F\x87\x5A\x85\x8C\x15\xE4\x87\x8C\x33\xA9\x8F\x7E\x41\x19\x88\x0C\xEA\x86\x85\xCE\x42\x0A\x8E\x38\x8F\x8E\x1E\xF3\x8D\x8D\x35\xA0\x8C\x8E\x62\x80\x90\x1B\xFB\x89\x8E\x3E\x84\x91\x88\x86\x89\x91\x21\x8B\x98\x90\x46\x8D\x8F\x90\x8F\x82\x67\x10\x78\x8D\x91\x4A\x91\x96\x91\x4F\x8A\x90\x6C\x44\x03\x2D\x22\x23\x2E\x08\x63\x27\x0B\x58\x1E\x2E\x8A\x81\x09\x0B\x2C\x4A\x03\x2F\x12\x14\x9C\x34\x26\x2C\x91\x93\x98\x88\x8D\x7D\x4D\x0F\x94\x59\xB1\x96\x8D\x9A\x97\x92\x25\xB0\x9B\x96\x5B\xBD\x90\x97\xB7\x9E\x8F\x18\xFF\x8D\x8F\x3A\x85\x99\x40\x20\x25\x96\x20\xC4\x90\x92\x5E\xBA\x97\x99\xCE\x91\x9A\x2F\x99\x6F\x09\x5A\x80\x9F\x97\x2F\x30\x0A\x35\xC2\x9B\x99\x61\x9E\x9D\x9B\xE0\x87\x9B\x20\xB9\x92\x9B\x6B\x90\x9B\x9A\xE5\x9C\x9A\x38\xCC\x94\x9C\x74\xAE\x9E\x9C\xE9\x86\x9B\x1B\xD1\x0B\x9A\x79\xAD\x98\x9E\x00\x72", + "\x09\x3D\x81\x9B\x9D\x6F\xBD\x99\x9C\xD8\x33\x0B\x3E\xE3\x91\x99\x9C\x54\x0B\xA0\xEC\x85\xA0\x3F\xCD\x9F\x86\x91\x0A\x9F\x9F\x10\xAF\x8E\x15\x08\xAE\x9E\x86\xB8\x9F\xA2\xEA\x96\xA1\x46\xF7\x9B\xA2\x85\x84\xA0\x9B\xF6\x9E\xA3\x40\x57\x04\xA2\x80\x9C\xA1\xA4\x20\xA9\x20\x16\x25\xA1\xA3\x93\x8B\xA6\xA5\x1F\xA7\x9C\x46\xA8\xA2\xA7\x8E\xA9\xA1\xA6\xF1\x8F\xA6\x48\x95\xA0\xA6\x62\x99\x0B\x2C\x5A\x03\x2C\x49\x0F\xAC\x0B\xB1\x1D\x0B\x2C\x5E\x03\x2E\x49\x0F\xA0\x0C\x96\xA1\x0C\xA5\x1A\xB4\xA7\xC6\x62\x00\xAB\x9E\xBC\xA3\xA7\x26\xB8\xA9\x4B\xDA\xA1\xAA\x9D\xB7\xA1\xA1\x5F\xB7\xA9\x58\xD9\xA7\x63\x31\x15\xAC\xAB\x56\xA4\xAD\x4D\xD2\xAF\x9C\x9B\x99\x64\x0C\x67\xA3\xAF\x56\x97\x65\x0D\xB8\xAB\xAE\xAB\x77\xB8\xA5\x5B\xEC\xA3\xA6\xBC\xB9\xA2\xAF\x7D\xA0\xB2\x5B\xFF\xA0\xAD\xBC\x85\xB6\x38\x66\x03\x2F\x19\x63\x28\x0D\xB1\x29\x0B\x2C\x6A\x03\x2F\x1A\x63\x2C\x0D\xB1\x2D\x0C\xA5\x6E\x16\xAC\x61\xE2\xA9\x63\x37\x1A\xB3\xAF\x7E\xA0\xB6\x60\xFC\xA3\xB0\xD1\x87\xB6\xB4\x9C\xBB\xB2\x5A\xAA\xB3\xAE\xC3\xBA\x50\x0E\x9F\xA1\xB3\x69\xB2", + "\xB9\xB4\xD4\xAB\xB6\xB6\xF7\x71\x0D\x6C\xA5\xB6\x8C\x39\x3B\xB4\xB4\xC0\xA1\xB4\x6D\xB7\xB3\xB9\xD6\xAC\xB5\xAB\xA3\xA2\xB8\x6F\xCB\xB1\xB9\xE4\x8E\xBB\xB6\xCC\xBC\x9F\x1C\x3F\xBA\xB9\xE6\x90\xB9\x67\x74\x03\x2D\x1D\x54\xBF\xB9\xDA\xA6\x8E\x0E\xDC\xB7\xB9\x75\xE3\xB2\x43\x3B\x21\xBE\xBB\xD1\xA5\x70\x1E\x67\xB4\xB9\xF4\xA2\xBD\xBB\xED\xB6\xBA\x3F\xF9\x0C\xBC\xE3\xBF\x82\x0F\xF5\xA8\xBB\x7B\xFB\xB8\xBC\xF9\xB1\xBC\xBC\xFC\xBF\xBC\x7C\xF6\xB5\xB9\x3D\x39\xB9\xAD\x04\xCE\xBE\xAE\x7C\x07\xC0\xB4\x8E\xC2\xAE\xFA\xBD\xBC\x80\x92\xC3\xC1\x08\xC2\xC1\xC0\x09\xDE\xBD\x86\x93\xC6\x4D\x3E\x23\x2E\x0F\x63\x3F\x0F\x58\x00\x13\x2D\x40\x23\x2A\x10\x63\x23\x13\x58\x04\x1C\xA5\x42\x0D\xC0\xC2\x08\xC6\x13\x8B\xAE\xB7\xC2\x0A\xD8\xC6\xC2\x1B\xD5\xC0\x82\xB8\xCC\xC7\x1D\xFE\xC7\xC1\x19\x67\x13\x8C\xC7\xBF\xC6\x18\xC0\xCC\xC8\x47\xC0\x60\x22\x43\xC8\xB7\x1E\xEE\x31\x11\x4C\xC5\xBA\x93\xC6\xC4\xCA\x1A\xF9\xC7\xC6\x45\xD6\xCB\x94\xDA\xC9\xCA\x24\xD5\xCE\xCB\x5C\xC9\xC9\x75\x0A\x11\xCA\x05\xF5\xC7\xCC\xBB\x4B\x11\x99\x9A\xCB\xCB\x8D", + "\x4C\x13\xCD\x1C\xD7\xCA\x8D\xF3\xC8\xCD\x36\xC0\x65\x11\x70\xDA\xC6\x6B\x0E\x19\xCE\x2C\xE2\xCE\xCC\x72\xD5\xCD\x97\xCD\xC3\xD0\x29\xC5\xD0\xD0\x8F\x1D\xCC\x9D\x81\xDB\x56\x48\x23\x29\x12\x63\x32\x10\x4B\x93\x1A\xD0\x41\xFF\xCC\xCD\x87\xD8\xD3\xA5\xF1\xC6\xCE\x43\xDB\xD2\xCF\xB0\x34\x11\xA5\x8C\xDD\xD2\x40\xE5\xD2\xD3\x72\xB5\x13\xA8\xA7\xDC\xD3\x4C\xED\xD7\xD3\xC4\x96\x13\xAA\xAE\xD0\xD5\x30\xDF\xCC\xD0\xB0\xC2\x23\x25\x33\xD9\xD6\x4B\xF7\xD6\xD3\xBF\xC6\xD4\x1F\x98\x13\x2D\x4C\x23\x2A\x13\x2C\xBB\x10\xAF\xC1\xDA\xC2\x4E\x0B\xDE\xD6\xD0\xC0\xCE\xB4\xB8\xDC\xD9\x57\xD5\xDB\xC0\x9D\x03\x2E\x27\x63\x2F\x12\x96\xA0\x17\xD9\xD3\xC0\xD8\x6B\x21\x10\xDC\xDC\xA2\x15\xDC\xE2\xC1\xDE\xB0\xBD\xD4\xD4\x5A\xD8\x73\x14\x63\x24\x17\x58\x25\x1C\xA4\x53\x28\xDB\xDD\x72\xA7\x17\xBD\xA8\xD1\xDA\x6A\xFD\xD9\xDD\xFE\xCA\xDC\xBF\xC6\x38\x14\x96\xA9\x13\x2C\xAA\x03\x2F\x2A\x2C\xAC\x15\x7D\xD6\xDE\xCA\xAD\x0E\xE0\x1B\xAE\x1C\xA5\x57\x23\x28\x16\x63\x31\x14\x4B\xB2\x12\xE2\x3F\xF2\xAB\x16\x1D\xFE\x9E\x1F\x0B\x41\x21\x07\x43\x21\x25", + "\x88\x26\xE6\x40\x28\xEF\x36\x95\xC1\x24\xE5\xC1\x2E\xE4\x00\x30\xE3\x3E\x99\xF4\xE1\x3A\x36\xFD\x35\xCE\xA9\xEA\x21\x9B\xD6\x3A\xE6\xE6\x26\x54\x50\x37\x38\x41\xDE\x24\xE4\x28\xD6\x24\xEA\x41\x0E\x0D\x37\xAA\x08\x30\x28\x47\xE4\x2B\xD0\x8A\x2C\xE8\xC4\x0E\xEF\x37\x40\x3B\x2B\xD3\xB7\x22\xE7\xDC\x08\x32\x2C\x5B\xF4\x26\xD2\x83\x28\x3C\xC4\x11\xEC\x3A\x63\xE2\x21\xD5\xBF\x37\xEB\xE0\x19\xED\x37\x40\x32\xE4\x75\x60\xE8\xEB\x9B\x29\xE8\xE9\x50\xEA\x21\xDB\xF3\x37\xEE\x00\x2B\xE9\x38\x7B\xF1\x39\xDE\x89\x21\xF1\xA4\xD4\xED\xE9\x70\xF7\x26\xD6\xF5\xE4\x27\xAE\xFD\x34\xEE\x6E\xF6\xEE\x42\x65\xEF\x37\xA8\xC5\xF3\xEA\x09\x3F\xEF\x7C\x17\xF0\x28\xC5\xC9\xF5\xF1\x48\xFF\x34\xE4\xF3\x38\xF3\xD0\xD1\x39\xEA\x8B\xE1\x39\xDF\x9A\xF1\x3A\xCE\xDD\xF1\x26\xA8\xFD\x37\xEA\x88\xF1\xED\x98\x29\xF4\xF4\x5C\xEA\x22\xD7\xA2\xFF\xF3\x98\x3D\xEC\xF2\xC1\x31\xF4\x62\x33\xF6\xEB\xDE\xED\x27\xF6\x82\xF9\xF6\xE9\xD1\x33\xF5\xE4\xE2\xEB\xF9\xA7\xEE\x2A\xEC\x87\xF5\xF9\xDA\xED\x21\xEA\x4F\x23\xF8\xF5\xEC\xE6\xF8\x96\x08\xFE\x3A\x71\xFA\xF7", + "\xE3\xDD\xFB\x25\xDF\xC6\xEA\xFA\xDA\xF9\xF0\xED\x8C\xF6\xF6\xF2\xFF\x1A\xEE\xE3\xF6\xF8\x4B\x7D\xE4\x3B\xA8\xF2\xE5\xF4\x03\x2C\xF6\x75\x2E\xFF\xF4\x96\x36\xFB\xFA\xEA\x75\x7D\xEC\x77\x7C\xEE\x7E\x78\x5F\x7E\x7E\xE6\x76\x76\xE6\x28\x7F\x6A\x7B\x7E\x91\x74\x13\xDF\x7D\x7F\x31\x10\x7F\x07\x82\x7F\xE5\x70\x7D\xD6\x11\x75\x51\x7C\x80\x01\x1A\x7F\x40\x1C\x7F\x12\x8A\x81\x00\x8B\x74\x0E\x88\x7B\x10\x85\x80\xE2\x75\x81\x03\x83\x7F\x93\x77\x7E\x0F\x5C\x81\x7E\x75\x82\xCE\x7D\x7E\x16\x8F\x7E\x18\x80\x14\xCD\x70\x7E\x92\x70\x7D\x83\x76\x10\x58\x19\x7E\x24\x82\x80\x0F\x80\x7B\x0A\x1F\x83\xBF\x14\x7C\xDC\x75\x83\x11\x82\x81\x2C\x16\x80\xBC\x75\x83\x09\x85\x79\x45\x83\x82\xF9\x72\x83\x3A\x87\x82\x35\x84\x81\x4F\x8B\x82\x17\x8C\x83\x37\x11\x75\x52\x10\x84\x55\x82\x84\x26\x84\x84\x51\x14\x85\x0D\x84\x86\x33\x84\x80\x59\x89\x82\x5B\x83\x84\x2D\x11\x85\xC1\x7A\x10\x61\x87\x84\xDB\x70\x78\xEE\x7B\x84\x4C\x86\x83\x5E\x84\x13\x39\x8B\x87\x5D\x8B\x7C\x1F\x8E\x7E\x20\x8D\x7F\x7A\x8C\x84\x4E\x81\x1C\x7F\x80\x88\x72\x8B\x79\x79\x88", + "\x82\x7D\x81\x13\x8B\x8B\x87\xF4\x76\x85\x80\x8F\x0F\x85\x8F\x7A\x87\x82\x81\x89\x83\x1F\x93\x8C\x84\x8D\x8D\x7A\x8F\x8D\x86\x91\x8D\x12\x9F\x82\x81\x95\x8A\x86\x57\x81\x13\x99\x8D\x79\x9B\x8D\x7F\x9D\x8C\x7C\x08\x8D\x82\xAA\x87\x89\xAF\x8F\x7A\x5A\x8A\x88\xB3\x85\x8A\x4A\x20\x83\x1B\x8A\x7C\x0A\x28\x2A\x30\x87\x7F\x73\x2E\x8B\x96\x80\x88\x32\x75\x87\xED\x20\x83\x46\x88\x87\xA4\x86\x10\xD9\x76\x2C\x30\x8A\x8C\x35\x74\x87\xC2\x8B\x83\x3E\x8A\x73\xD6\x82\x74\xD8\x87\x15\xC7\x8B\x87\x32\x79\x20\xCB\x8D\x8D\x02\x1D\x22\x3C\x79\x10\x3E\x71\x7E\xE8\x8A\x8D\xEB\x87\x8E\x06\x19\x8E\xC0\x87\x72\xEC\x8F\x8E\xF3\x82\x8F\xEE\x86\x8F\x2D\x7A\x10\x41\x72\x8D\xE4\x81\x10\xE2\x8E\x88\xCF\x83\x86\xFC\x8F\x7C\x67\x87\x8F\x07\x15\x8F\x07\x95\x8B\xC8\x81\x16\x08\x9F\x72\x0D\x93\x73\x0F\x90\x8F\xA0\x7D\x8E\xF9\x84\x91\x31\x7D\x73\x11\x99\x91\x06\x91\x10\xFB\x83\x8E\x04\x96\x10\xFF\x82\x8A\x01\x96\x1B\x1A\x95\x91\xF4\x8B\x91\x10\x98\x92\x12\x93\x81\x18\x9A\x92\x25\x97\x91\x16\x95\x8D\xE5\x17\x8D\x1F\x93\x10\x21\x9B\x7F\x90\x86\x10", + "\xB7\x84\x27\xD3\x8F\x90\xA7\x8D\x84\x0A\x1D\x77\xEA\x86\x10\x42\x97\x13\xAD\x83\x94\xDE\x8E\x92\x4A\x96\x92\xF8\x80\x93\x27\x9C\x94\x2B\x7F\x92\x32\x9F\x94\x4E\x9D\x94\x53\x93\x10\x1D\x94\x31\x30\x87\x93\x83\x83\x92\x01\x1D\x8A\xD4\x1D\x93\x28\x9D\x8C\x00\x9C\x85\xFF\x01\x8D\x70\x80\x94\x09\x18\x96\xF3\x1C\x96\x6B\x8A\x96\x41\x8F\x1B\x6E\x9B\x8A\x2D\x12\x73\x3B\x93\x97\x97\x82\x73\xAD\x84\x8D\x6F\x9B\x12\x47\x97\x13\x7C\x94\x97\x2C\x1F\x97\x34\x11\x98\x97\x84\x98\x31\x16\x98\x80\x88\x98\x2D\x18\x97\x80\x8E\x98\xE0\x88\x7E\x72\x9E\x7E\x90\x98\x88\x77\x8D\x96\x94\x99\x93\x03\x17\x97\x99\x9E\x95\x00\x0D\x8A\x95\x9C\x89\xB2\x31\x9A\xB0\x82\x99\xC1\x14\x9A\xB8\x87\x99\xD1\x18\x9A\x9D\x76\x97\xBD\x1C\x9A\x48\x92\x10\xAD\x82\x73\xBF\x84\x13\x8C\x90\x97\x64\x7F\x9A\x9D\x96\x96\x32\x7C\x9A\x32\x70\x7C\x98\x95\x83\xB0\x91\x8F\x69\x80\x95\x01\x10\x9C\xAB\x9B\x9B\x69\x9B\x12\xAE\x98\x92\xC8\x96\x1D\xC3\x94\x13\xD1\x9C\x92\x84\x7F\x90\xCF\x90\x14\xD3\x95\x97\xB2\x37\x9B\x2B\x19\x9D\x2C\x1E\x9D\xCC\x96\x9A\xC1\x96\x96\xE0", + "\x9C\x87\x71\x97\x9A\xCA\x95\x86\xDA\x99\x10\x9C\x92\x9C\x9A\x92\x9B\xBA\x9E\x99\xB5\x9C\x8A\xE9\x9D\x97\x67\x9F\x9E\x01\x1C\x9A\xE5\x95\x9E\x32\x7E\x81\x37\x1B\x9F\xF8\x90\x00\xED\x94\x9E\x01\xA0\x9A\x01\xA3\x9F\x71\x8A\x77\x68\x8F\x95\x0B\xA0\x00\x2F\x26\x87\x09\x11\x01\x0D\xA2\xA1\x62\x81\x95\x15\xAC\x91\x0D\xA5\x94\x35\x92\x10\xBB\x7A\x7A\x6E\x8E\xA1\x09\x1F\x93\x81\x8B\x99\xBD\x1A\x98\x94\x82\x9E\xD1\x16\xA2\xA0\x88\xA2\x86\x79\x10\x0D\x20\xA1\x06\x1F\xA2\x20\xA1\xA3\xBD\x17\x59\xD0\x7F\x7F\x6B\x9C\xA2\x73\x9B\xA3\x3A\xAD\xA3\x05\x94\x15\x53\x89\x10\x64\x91\x10\x43\xA0\x00\x45\xA7\xA4\x41\xA9\x8D\x42\xAA\x10\xDF\x7D\xA4\x4C\xAF\xA4\xEC\x90\xA5\x3A\x92\xA5\x03\x19\x83\x7D\x7D\xA1\x16\xA4\x95\x59\xA6\x95\x0E\x91\x93\x5D\xAA\xA5\x5F\xA8\x95\xB4\x87\x9E\x09\x94\xA3\x11\xA3\xA6\x03\x14\xA1\x64\xA1\x10\x6A\xA6\x93\x0A\x1D\xA6\x0B\x1A\x10\xE6\x86\x10\x0F\xA9\x9B\x09\x15\xA7\xC5\x93\x10\x78\xAE\x8F\x0D\x1A\x10\x32\xA2\x10\x14\x0A\x10\x4E\x27\xA6\x09\x1F\x9C\x83\xA6\x10\x70\xAD\x81\x82\xAF\xA6\x0A\x17\x93\x87\xA9", + "\xA6\x7E\xAB\xA8\x09\x13\xA7\x03\x10\x25\x84\xA6\x10\xCF\x96\xA9\x88\xAA\x9A\x00\x0A\xA9\x90\xA5\x74\x09\x1E\xA9\x02\x19\xA8\x00\x0F\xA7\x01\x12\xAA\x01\x14\xA9\x02\x17\x01\x8C\xA5\xA8\x0A\x1C\xAA\x97\xA2\x90\x03\x10\xAB\x9B\xA0\xAA\x06\x14\xAB\x9F\xA6\xA6\xB7\xA2\xA7\x0A\x1E\x26\x0F\x5A\x01\x18\x88\xA0\xC6\x13\x97\x23\x08\x81\x2F\x1B\x06\x47\x78\x7D\x0A\x15\xAC\xC6\xA9\x10\x6C\x09\xAC\x18\x80\x32\xCD\xA6\x10\x6D\x00\xAD\xD5\x99\x10\xA3\x33\xAD\x03\x1E\x06\xD6\xA0\xA4\xD8\xAA\xAD\x03\x1F\x06\xDD\xA6\x7A\xFE\x30\xAE\x01\x10\x07\xE3\xA1\x7A\x56\x46\xAE\x00\x01\x07\xE9\xA1\x10\xDF\x7C\x49\xEC\xA2\x07\xEF\xA0\x00\x39\x8E\x49\xEC\xA3\x07\xF5\xA7\xAF\xEC\xA0\x00\x74\x05\xAF\x2F\x1E\x4A\xEC\xA5\x07\xF5\xA8\xA5\x01\x1A\x4F\xEC\xA6\x07\xF5\xA1\x98\x24\x50\x7D\xAC\x9F\x12\x45\xA1\x54\x0E\xBD\x1F\x7D\x7F\x53\x13\xB1\x20\x3E\x7B\x52\x17\xB2\x21\x59\x91\x10\x49\x5B\xB1\x03\x17\x07\xF5\xA2\x73\x47\x5C\xAE\x78\x05\xAF\x1D\xB0\x00\x1F\xBB\x7C\x73\x99\x07\x23\xBA\x10\x25\xB6\xAE\x7A\x05\xAF\xCF\x9F\x54\xEC\xAB\x07\x34\xBA\x10", + "\x54\x5C\xAE\x7C\x09\xB3\x09\x1B\xB3\xE6\xAD\x07\xF5\xA4\x0B\x18\x84\x8C\xAE\x16\xAC\xC2\xA0\x30\x2F\x1B\x93\x48\xBC\x52\x10\xBD\x1F\x2F\x14\x9B\x39\x3F\x12\x60\x98\x81\x73\x99\xB4\x15\x3F\x12\x1A\xA0\x1B\x2F\x11\x98\x58\xBC\x26\x2F\x1F\xB0\x18\x85\x78\x5F\xB0\xB5\x0C\x91\x20\x4F\xBF\x82\x22\x3D\xB5\x66\xB1\xA5\x6A\xB1\x33\x2F\x16\xB0\xBB\x2F\x12\x39\x81\x75\x7D\x76\xB4\xB0\x12\xB5\x68\xBD\x92\xD0\x89\x33\xFD\x9D\xB6\x6B\xA6\xA4\x0A\x11\xA8\x6F\xB9\xB7\x8D\xA0\xB8\x03\x1F\xA8\x02\x15\xA4\x10\x15\xB8\xAC\x17\xB5\x88\xB2\x10\x88\x29\xA3\x37\x33\x97\xFE\x97\xB4\x11\x19\xA4\x03\x10\x2D\x8E\xB3\xAC\x87\xBB\xB7\x09\x14\x11\x4B\xA9\x10\x2F\x3D\xB9\xCD\x1E\xB5\x91\xB1\x10\x3E\x3D\xB7\x37\x31\x98\x97\xBC\xB5\x0A\x10\x39\xA3\xB6\x10\xDF\x36\xBA\xD5\x11\x98\x5C\x95\x1F\x2F\x1B\x3E\xB3\xB3\x10\x4A\x46\xBB\x54\xBB\x44\x2F\x1B\xAE\xAC\xB5\x38\x85\x7F\xBA\xAC\x1F\x12\x71\x4D\xBB\x02\x12\x4A\xC0\xBA\xA0\xB6\xA1\x26\x2F\x14\x4A\x4A\xA6\x10\xC9\x41\x8C\x01\x25\xA4\x65\xB0\x7D\xD5\x44\xB9\x85\x35\xA4\xC8\xB6\x1C\x2F\x18\xB0\xD5", + "\xB3\x10\x1A\xB8\xBD\x12\x25\xA4\xB9\xB8\xB9\x09\x16\xB1\xE5\xB2\x10\x4B\x58\xBE\x61\x2F\x7D\xDB\xBB\x7C\x4D\x5E\xBD\x98\x3F\x7D\xE1\xBD\x1C\x2F\x16\x56\xCC\xB1\x10\x8F\x5F\xBC\x6E\xB0\x92\xA9\xB0\x00\x91\x5F\xBF\x00\x00\x5B\x02\xC6\x10\x75\xB5\xC0\xBA\x58\xBF\xF6\x39\x83\xFB\xB5\x1D\x2F\x19\x5D\x08\xC8\x5F\x0B\xC5\xA5\x9F\xB2\x21\x2F\x16\x60\x08\xC6\x62\x19\xC4\x92\x21\xC8\x74\x28\x60\xC1\x9D\x38\x84\xD2\xBA\x10\x2E\x68\xC0\x6A\x63\xC2\x00\x0D\x77\xEB\xB0\xBB\x09\x1F\x66\x08\xC2\x69\x2E\xC2\xB7\xF5\xB6\x7A\x94\x6E\xC2\xD8\x12\xB7\x13\xC6\xAC\xA2\x6F\xA3\x03\x14\x6C\x37\xCB\xC1\x29\xC9\x10\xC6\x62\xC4\x02\x19\x6D\x2E\xCE\x73\x39\xC1\x7A\xDB\x6C\xC3\xF5\x1E\x73\x3F\xC8\x81\xDD\x6A\xC4\x01\x10\x6F\x4D\xC6\xC4\xBA\x2F\x12\xF2\x68\xC5\x00\x05\x70\x2E\xC9\xB2\x4F\xC8\x74\x07\x72\xC5\xAE\x19\xB2\x55\xC0\x7D\x09\x70\xC6\x14\x73\xC6\x5C\xC6\x26\x2F\x16\x71\x60\xC0\x72\x2E\xCF\x9C\x29\xB8\x1D\xEA\x4A\x7F\x2B\x99\xBC\xC6\x47\x93\xD7\x9A\xBB\xC6\x46\xAA\x00\x0A\xAA\x72\xCD\x1F\x44\xB1\x2A\x12\x26\xC8\x00\x04\xAA\x7A\xC6", + "\x4C\x7B\xA0\x00\x8A\xB7\xC8\x09\x16\x0B\x2C\x53\xC9\x9D\xA5\xC0\xD8\x17\x0B\x0B\x85\x1F\xA8\xA0\x00\x70\x20\xBA\x6C\x4F\xC9\xB8\xAD\xC5\xC6\x45\xCA\xA9\xAA\xC9\xF5\x19\x0B\xE6\x25\x14\xBD\xAA\x10\xA1\xCC\xC1\xC6\x41\xCB\x03\x14\xB8\xB2\xC9\x10\xBB\x0C\x52\xC0\xA9\x10\xBE\xA7\xCB\x6C\x4D\xB8\x06\x1E\x29\xA2\xC3\x10\xBC\x03\x16\xBD\x0D\xC9\xAE\x10\x10\x09\x13\xB9\xBE\xC3\x10\xBF\x0C\x52\xC2\xC6\x10\xCA\xCD\xCC\xFE\x40\x2A\xB5\x25\xC0\xC0\x0C\x52\xB6\x29\x10\x9C\xB4\xCD\x66\x21\x0C\xC8\xC0\x1B\xB8\x29\x10\xD1\xC7\xC4\x06\x13\x0C\x63\x14\x0C\xE6\x22\x82\x09\x13\xCE\x06\x1E\x2C\xC3\xCE\x4F\xCC\xA1\xCC\x05\xC6\x0C\x63\x17\x0C\xE6\x2A\xB7\x06\x13\xCF\x03\x10\xCF\xDE\xC0\x51\xFE\xC3\x10\x20\x05\xC0\xC9\x0C\x52\xDD\xC3\x10\xEE\xC6\xCE\xC4\x42\xBA\x06\x15\x2E\xF1\xC1\x10\xCA\x0C\x52\x0E\xD6\x10\xA5\xBF\xCF\xD8\x1B\x0C\xE1\xCC\x1A\x29\x09\xD1\xE2\xBA\x10\xCD\x0B\x44\x90\xB9\x10\x1B\xD3\xC0\x0A\xD2\x10\xCE\x0B\x44\xA8\xB2\xD2\x9A\xB6\xCA\x09\x1F\x0C\x4B\x44\xB6\x0A\x13\xD2\xDE\xAF\xCF\xD0\x0B\x44\xDA\xB1\xD3\x41\x95\xC0", + "\xD1\x0B\x44\xF4\xB8\xD3\x26\xC3\xB7\x0A\x12\x0D\x4B\x4D\xC0\x2A\xD1\xA2\x05\xC3\x0D\x4B\x4D\x77\x51\x72\xD3\x03\x1A\xA2\x7E\xC9\x10\xD4\x0B\x44\x38\xCE\xD3\x06\x12\xB7\x8F\xC9\x10\xD5\x03\x16\xD6\x06\x2E\x4E\xCA\x10\x09\x32\x2E\x05\xC8\x0D\x2C\x52\xAD\x06\x1F\xD5\x16\xDC\x47\x15\xD3\x10\x4C\xDC\xD2\x6C\x4B\xBA\x03\x12\x37\x0F\xD0\x00\xD9\x0C\x52\x70\xD6\x10\xB1\x31\xD7\xD8\x1A\x0D\x1C\xDD\x1C\xB2\xBD\xD0\x05\xCC\x0D\x4B\x44\xC6\xB1\xBA\x10\xA5\x38\xD7\x7C\x49\xAD\x7E\xD1\xD7\xDD\x0B\x44\xCF\x91\x75\x88\xD3\x10\x85\xD7\xD6\x38\x41\xD9\x03\x16\x35\x71\xDE\x0D\x2C\x57\xD7\x06\x1D\xD7\x25\xD1\x4E\xC2\x36\x10\x17\x41\xD7\xDF\x0C\x52\xB5\xBB\x14\x05\xC0\x0E\x4B\x4A\x7F\x51\x75\xDA\x24\xA1\xD7\xE1\x0B\x44\x37\x9B\xDA\x2B\xD4\xC9\x06\x12\x0E\x4B\x44\xC8\xB2\xD7\xAD\xFF\xC3\x0E\x4B\x44\xAA\xB9\xD4\x94\x05\xC4\x0E\x4B\x4C\xC8\xBF\xD3\x10\x62\xB0\x7D\xE5\x0B\x44\x91\xC5\xDC\x02\x12\xA2\x14\xCA\x10\xE6\x0B\x44\xB6\xC3\x10\xCC\xD1\x10\x4E\xDD\xD1\x09\x17\x0E\x4B\x48\xC9\xD5\xD0\x00\x56\xD2\xC8\x09\x18\x0E\x63\x19\x0E\xE6", + "\x2F\xC9\x51\x7C\xBB\x06\x17\x3C\x71\xDB\x0E\x2C\x55\xAE\xEA\x3A\xCA\x38\x41\xDA\xB4\xB0\xDF\x2E\x4B\x41\x06\x18\x45\x71\xDC\x0E\x2C\x57\x44\x8A\xCD\xD9\x00\x0D\x0E\x4B\x48\xCA\x00\x01\x75\xFC\xD3\xA5\x71\xDE\x0E\x4B\x4D\xCB\xD4\xDA\x10\x05\xE9\x94\xFF\xCF\x0E\x4B\x44\xCB\x02\x14\xE0\xD0\xBF\xCF\xF0\x0B\x44\xBB\xC2\xBF\x02\x1D\xE0\x22\xCF\xCF\xF1\x0B\x44\xC0\xCB\xE0\x09\x1C\xE1\xF9\x95\xC0\xF2\x0B\x44\xCC\xC2\xE2\x06\x14\xE2\xF6\xA5\xC0\xF3\x0B\x44\xD3\xCA\xE2\x03\x1C\xE2\xD7\xDC\xBF\x0A\x14\x0F\x4B\x45\xCE\x13\xEC\xE0\x1F\xAC\xD6\x03\x15\x0F\x63\x16\x0F\xE6\x26\xCD\x32\xE2\x10\xBF\xB6\x10\x3A\x41\xD7\xF8\x0C\x52\xC4\xBE\xBB\xF4\xDD\x44\xF8\xDB\xE2\x4F\xE6\x43\x5D\x46\x10\x77\x41\xD7\xF9\x0C\x52\x57\xE6\x10\xCE\xB2\xD9\xB0\x1A\x0F\x7B\xD5\x1D\x93\x49\x10\xF2\xDE\xDF\xFC\x0B\x44\x03\xDF\x50\x63\xE7\xDF\x05\xCD\x0F\x4B\x4B\xCD\x1A\xE1\x10\x6B\xE3\x10\xA0\x46\xD8\x38\x42\xAF\x6C\xE1\xD7\xFE\x0B\x44\x09\xDB\xE3\x09\x18\xE7\x74\xE3\xE5\x3F\x48\xAF\x06\x15\xE7\x5E\xED\x44\x86\xE3\x10\xCB\xB6\xD1\x2C\x5D\xE5\x03\x13", + "\xE7\x3E\xEE\x4F\xD4\xB3\x10\xB4\x41\xD7\x03\xE8\xC6\xB0\x19\x4A\xFD\xD1\xE9\x01\x11\x00\xF5\xA8\x1D\xFC\xCE\xE7\x06\x1A\xE9\x06\xEF\xCF\x02\x0F\xE9\xF5\x11\xD0\xA2\xE3\x10\xA4\xEE\xE0\xFE\xD3\x00\xA8\xEE\x1A\x07\xDB\xEA\x02\x1D\xEA\xF0\x91\xD7\x04\x01\xEB\xB0\x1C\xD0\x45\xE1\x10\xB6\xE1\x10\x5B\xBF\xD4\x54\x1A\xEB\xAC\x13\x2E\x0F\x5F\xEB\x00\x07\xDC\xCB\x76\x00\xC4\xE6\x1C\x13\xDD\xEB\x00\x08\xEC\xCE\xD6\xAC\x07\x0D\xEC\xCD\x1B\xD6\x9D\xEA\x10\xC8\xE5\xE3\xCF\xD1\xA2\xD6\xE5\x1D\x66\xD0\xED\xC8\xEF\xDD\xEC\xB4\x94\x05\xB7\x74\x32\x74\xD6\xD0\xEB\x4A\x09\x17\x4A\x71\xDC\x00\xDF\xEC\x26\x02\xB6\x10\xEC\xE7\xE8\x36\x45\xE9\xA3\xE2\xE8\x66\x47\xBD\x03\x1A\x4D\x71\xDD\x00\xF1\xED\x1F\xFE\xE6\x10\x07\x56\xE7\xB0\x1E\x00\xE8\xED\x1F\xF4\x49\x10\xF8\xEE\xDF\x10\x01\xF0\xA4\xB3\x16\x0B\xF6\x10\x02\x56\xF0\x4D\x44\xBE\x03\x15\xF1\xF6\xEF\x43\x1A\xF3\x10\xDD\xBF\xCF\x11\x00\xF1\x12\x25\xF0\x06\x13\xF1\xFE\xDF\x46\x0E\x57\xCD\x71\xD2\x01\x09\xF1\x20\x6E\xD4\xEB\x01\x19\xF2\x6F\xD5\xC0\x14\x0D\xF2\x12\x26\xD9\x71\xE0\x00", + "\x32\xF2\x10\x5B\xEE\xDF\x16\x06\xF3\x61\x25\xD7\xD0\xEB\xF3\x01\x13\xF0\xFE\xD8\x01\x40\xFA\x2B\x9C\xD0\xF3\x00\x0D\xB0\x06\x13\x51\x71\xDA\x01\x49\xFD\x39\xE7\xB3\x10\x50\xFF\xCF\x1C\x03\xF5\xF7\x3E\xBE\x56\xF5\xC0\x1E\x0A\xF5\x3C\x32\xB1\x4F\xF5\xC0\x20\x00\xF6\x22\x33\x54\x2A\xFF\xCF\x22\x07\x74\xCA\xE3\x10\x8F\xD2\x10\x32\x78\xF6\x33\xF1\xD7\x25\x0C\xF6\xFD\x1A\xD9\x03\x11\xF7\x0A\x1D\xF3\x9C\xE0\x00\x28\x06\xF7\x01\x2A\xDE\xA6\xD9\x10\x72\xF2\x10\x46\xFD\xF7\x2B\x00\xF8\x12\x28\xDE\x79\xF3\x12\x92\xAF\xCF\x2E\x06\xF6\xAE\x15\xE6\x4C\xF1\xB3\x03\x10\xE7\xFE\xD0\x03\x92\xF0\x1B\xF6\xDD\xF8\x09\x16\xF9\x02\x12\xF4\x7D\xF2\x03\x9B\xFC\x1A\x2C\xE4\xB2\x7B\xF5\xC0\x34\x05\xFA\xC6\x1D\xE4\x70\xF0\xB3\x0A\x17\xF8\xB4\xD3\x10\x36\x0C\xFA\xCD\x15\xE5\x9E\xF6\x10\xA0\xF1\x10\x98\xC7\xD5\x06\x18\x03\x22\xF3\x10\x7C\xF9\xED\x09\x1B\xB2\x03\x15\x54\x71\xD9\x03\xC1\xFA\x2B\xF1\xB7\xF9\x05\xCA\x03\x47\x7C\xED\x2F\x10\xE9\x25\xE9\x10\xCD\xF1\xFA\x05\xCE\x03\xD1\xFD\x1F\x89\xE2\x10\x73\x97\xFD\x01\x13\xFC\x40\xD9\x10\x42", + "\x0B\xFD\x01\x2E\xEE\xC5\xB3\x10\xE0\xF0\x00\xB2\xF3\xFE\x85\xE6\xFE\x12\x23\xEF\xC6\xD5\x12\x8F\xFE\xDF\x4A\x0A\xF8\x61\x2F\xF1\xB9\xF3\x10\x36\xB6\x10\xF7\xBF\xCF\x4D\x03\xF9\x66\x13\xFE\x7E\xFC\x71\x6A\x13\x18\x7F\xBA\x16\xE4\x5E\x7E\x85\x04\x00\xD8\x7D\x5C\x71\x02\x08\x86\x4C\x24\x79\xF9\x79\x10\x0D\x81\xF8\x65\x60\x54\x01\x02\xBB\x14\xA7\x74\x01\x86\x0A\x05\x8C\x7F\x05\x67\x0A\x1A\x80\xEC\x02\xF6\x1D\x80\xFF\x75\x7F\x7D\x7A\x0B\x36\x7D\xEA\x0B\xFB\x00\x02\xCC\x20\x5A\x03\x0F\xFF\x7E\x6E\x2E\x02\x00\xBB\x14\x0C\x82\x08\x98\x7D\xEF\x5D\x03\x11\x85\x1F\x6B\x7F\x5C\x57\x81\x01\x0A\xF4\x73\x7C\x81\x00\x06\x3C\x82\x6B\x00\x82\xC9\x72\x67\x69\x7D\xB8\x63\x06\x46\x80\x6C\x15\x2B\x3F\x68\x09\xAD\x7E\xDF\x73\x10\x66\x02\x13\x8C\x0D\x8D\x29\x0A\xA8\x81\x21\x80\xC0\x2B\x83\xB1\x46\x17\xFE\x5A\x10\x7A\x5D\xCE\x3D\xAF\x0C\x50\x06\x5F\x3E\x44\x0B\x2E\x44\x0B\x5C\x40\xED\x44\x09\x91\x44\x0A\x81\x4C\x28\x39\x40\xA2\x09\x8A\x09\x0A\xDC\x44\x0A\x77\x82\x6B\x46\x57\x3B\x8F\xB5\x58\x5B\x3F\x07\x3B\x51\x5C\x3B\x38\x5A\xEA\x40", + "\x7D\x6C\x83\xEB\x65\x5A\xC6\x56\x10\xA5\x38\x63\x5F\xB0\x30\x4E\x1A\x81\x5B\xC6\x52\xFA\x5C\x77\x7F\x01\x07\xEC\x58\x06\x55\x84\xDB\x40\xFA\x18\x84\xDD\x6D\x1E\x47\x49\xE1\x24\x0A\x9F\x81\x78\x63\x5A\x63\x51\x0A\xB3\x6D\x76\x05\x52\x9D\x3F\x0D\xA9\x5A\xE8\x3A\x0A\xA6\x86\x1B\x94\x76\xDC\x0B\x27\x7F\x06\x34\x8B\xB4\x30\x87\x19\x86\x56\xD3\x76\xB9\x7F\x07\x39\x84\xB7\x38\x86\x2F\x98\x40\xC1\x75\x26\x01\x86\x16\x40\x0C\xC6\x55\x1D\x80\x6E\xC5\x81\x19\x90\x3E\x72\x7C\x13\x4C\x85\x4C\x19\x83\x3D\x71\xF4\x10\x86\x3B\x86\xAC\x7D\x61\x4D\x16\x86\x2C\x0E\xE7\x04\x0A\x6D\x8F\x12\x5C\x84\xDF\x4B\x3E\xDE\x83\x26\x4A\x0D\x3C\x60\x14\x29\x58\x51\x09\x59\x6A\x81\x65\x72\x3A\xC1\x68\xA6\x78\x0D\x20\x77\x09\xCF\x4C\x28\x31\x87\x97\x0F\xC3\x13\x63\x3F\x1A\x3F\x44\x08\x1F\x86\x56", }; vl::glr::DecompressSerializedData(compressed, true, dataSolidRows, dataRows, dataBlock, dataRemain, outputStream); } @@ -11775,98 +11926,101 @@ namespace vl::presentation::remoteprotocol L"[1][RType] END [ENDING]", L"[2][RType]< \"bool\" @ >", L"[3][RType]< \"char\" @ >", - L"[4][RType]< \"double\" @ >", - L"[5][RType]< \"float\" @ >", - L"[6][RType]< \"int\" @ >", - L"[7][RType]< \"key\" @ >", - L"[8][RType]< \"string\" @ >", - L"[9][RType]< NAME @ >", - L"[10][RType]< RType \"[\" \"]\" @ >", - L"[11][RType]< RType \"[\" @ \"]\" >", - L"[12][RType]< RType @ \"[\" \"]\" >", - L"[13][RAttributeParameter] BEGIN ", - L"[14][RAttributeParameter] END [ENDING]", - L"[15][RAttributeParameter]CPP_NAME @", - L"[16][RAttribute] BEGIN ", - L"[17][RAttribute] END [ENDING]", - L"[18][RAttribute]< \"[\" @ ATT_NAME [ \"(\" RAttributeParameter \")\" ] \"]\" >", - L"[19][RAttribute]< \"[\" ATT_NAME @ [ \"(\" RAttributeParameter \")\" ] \"]\" >", - L"[20][RAttribute]< \"[\" ATT_NAME [ \"(\" @ RAttributeParameter \")\" ] \"]\" >", - L"[21][RAttribute]< \"[\" ATT_NAME [ \"(\" RAttributeParameter \")\" @ ] \"]\" >", - L"[22][RAttribute]< \"[\" ATT_NAME [ \"(\" RAttributeParameter \")\" ] \"]\" @ >", - L"[23][RAttribute]< \"[\" ATT_NAME [ \"(\" RAttributeParameter @ \")\" ] \"]\" >", - L"[24][REnumMember] BEGIN ", - L"[25][REnumMember] END [ENDING]", - L"[26][REnumMember]< NAME \",\" @ >", - L"[27][REnumMember]< NAME @ \",\" >", - L"[28][REnum] BEGIN ", - L"[29][REnum] END [ENDING]", - L"[30][REnum]< \"enum\" @ NAME \"{\" { REnumMember } \"}\" >", - L"[31][REnum]< \"enum\" NAME \"{\" @ { REnumMember } \"}\" >", - L"[32][REnum]< \"enum\" NAME \"{\" { REnumMember @ } \"}\" >", - L"[33][REnum]< \"enum\" NAME \"{\" { REnumMember } \"}\" @ >", - L"[34][REnum]< \"enum\" NAME @ \"{\" { REnumMember } \"}\" >", - L"[35][RStructMember] BEGIN ", - L"[36][RStructMember] END [ENDING]", - L"[37][RStructMember]< \"var\" @ NAME \":\" RType \";\" >", - L"[38][RStructMember]< \"var\" NAME \":\" @ RType \";\" >", - L"[39][RStructMember]< \"var\" NAME \":\" RType \";\" @ >", - L"[40][RStructMember]< \"var\" NAME \":\" RType @ \";\" >", - L"[41][RStructMember]< \"var\" NAME @ \":\" RType \";\" >", - L"[42][RStruct] BEGIN ", - L"[43][RStruct] END [ENDING]", - L"[44][RStruct]< \"struct\" @ NAME \"{\" { RStructMember } \"}\" >", - L"[45][RStruct]< \"struct\" NAME \"{\" @ { RStructMember } \"}\" >", - L"[46][RStruct]< \"struct\" NAME \"{\" { RStructMember @ } \"}\" >", - L"[47][RStruct]< \"struct\" NAME \"{\" { RStructMember } \"}\" @ >", - L"[48][RStruct]< \"struct\" NAME @ \"{\" { RStructMember } \"}\" >", - L"[49][RMessageRequest] BEGIN ", - L"[50][RMessageRequest] END [ENDING]", - L"[51][RMessageRequest]< \"request\" \":\" @ RType \";\" >", - L"[52][RMessageRequest]< \"request\" \":\" RType \";\" @ >", - L"[53][RMessageRequest]< \"request\" \":\" RType @ \";\" >", - L"[54][RMessageRequest]< \"request\" @ \":\" RType \";\" >", - L"[55][RMessageResponse] BEGIN ", - L"[56][RMessageResponse] END [ENDING]", - L"[57][RMessageResponse]< \"response\" \":\" @ RType \";\" >", - L"[58][RMessageResponse]< \"response\" \":\" RType \";\" @ >", - L"[59][RMessageResponse]< \"response\" \":\" RType @ \";\" >", - L"[60][RMessageResponse]< \"response\" @ \":\" RType \";\" >", - L"[61][RMessage] BEGIN ", - L"[62][RMessage] END [ENDING]", - L"[63][RMessage]< \"message\" @ NAME \"{\" [ RMessageRequest ] [ RMessageResponse ] \"}\" >", - L"[64][RMessage]< \"message\" NAME \"{\" @ [ RMessageRequest ] [ RMessageResponse ] \"}\" >", - L"[65][RMessage]< \"message\" NAME \"{\" [ RMessageRequest @ ] [ RMessageResponse ] \"}\" >", - L"[66][RMessage]< \"message\" NAME \"{\" [ RMessageRequest ] [ RMessageResponse @ ] \"}\" >", - L"[67][RMessage]< \"message\" NAME \"{\" [ RMessageRequest ] [ RMessageResponse ] \"}\" @ >", - L"[68][RMessage]< \"message\" NAME @ \"{\" [ RMessageRequest ] [ RMessageResponse ] \"}\" >", - L"[69][REventRequest] BEGIN ", - L"[70][REventRequest] END [ENDING]", - L"[71][REventRequest]< \"request\" \":\" @ RType \";\" >", - L"[72][REventRequest]< \"request\" \":\" RType \";\" @ >", - L"[73][REventRequest]< \"request\" \":\" RType @ \";\" >", - L"[74][REventRequest]< \"request\" @ \":\" RType \";\" >", - L"[75][REvent] BEGIN ", - L"[76][REvent] END [ENDING]", - L"[77][REvent]< \"event\" @ NAME \"{\" [ REventRequest ] \"}\" >", - L"[78][REvent]< \"event\" NAME \"{\" @ [ REventRequest ] \"}\" >", - L"[79][REvent]< \"event\" NAME \"{\" [ REventRequest @ ] \"}\" >", - L"[80][REvent]< \"event\" NAME \"{\" [ REventRequest ] \"}\" @ >", - L"[81][REvent]< \"event\" NAME @ \"{\" [ REventRequest ] \"}\" >", - L"[82][RDeclDetail] BEGIN ", - L"[83][RDeclDetail] END [ENDING]", - L"[84][RDeclDetail]<< !REnum @ >>", - L"[85][RDeclDetail]<< !REvent @ >>", - L"[86][RDeclDetail]<< !RMessage @ >>", - L"[87][RDeclDetail]<< !RStruct @ >>", - L"[88][RDecl] BEGIN ", - L"[89][RDecl] END [ENDING]", - L"[90][RDecl]<< { RAttribute @ } !RDeclDetail >>", - L"[91][RDecl]<< { RAttribute } !RDeclDetail @ >>", - L"[92][Schema] BEGIN ", - L"[93][Schema] END [ENDING]", - L"[94][Schema]< RDecl @ { RDecl } >", - L"[95][Schema]< RDecl { RDecl @ } >", + L"[4][RType]< \"color\" @ >", + L"[5][RType]< \"double\" @ >", + L"[6][RType]< \"float\" @ >", + L"[7][RType]< \"int\" @ >", + L"[8][RType]< \"key\" @ >", + L"[9][RType]< \"string\" @ >", + L"[10][RType]< NAME @ >", + L"[11][RType]< RType \"?\" @ >", + L"[12][RType]< RType \"[\" \"]\" @ >", + L"[13][RType]< RType \"[\" @ \"]\" >", + L"[14][RType]< RType @ \"?\" >", + L"[15][RType]< RType @ \"[\" \"]\" >", + L"[16][RAttributeParameter] BEGIN ", + L"[17][RAttributeParameter] END [ENDING]", + L"[18][RAttributeParameter]CPP_NAME @", + L"[19][RAttribute] BEGIN ", + L"[20][RAttribute] END [ENDING]", + L"[21][RAttribute]< \"[\" @ ATT_NAME [ \"(\" RAttributeParameter \")\" ] \"]\" >", + L"[22][RAttribute]< \"[\" ATT_NAME @ [ \"(\" RAttributeParameter \")\" ] \"]\" >", + L"[23][RAttribute]< \"[\" ATT_NAME [ \"(\" @ RAttributeParameter \")\" ] \"]\" >", + L"[24][RAttribute]< \"[\" ATT_NAME [ \"(\" RAttributeParameter \")\" @ ] \"]\" >", + L"[25][RAttribute]< \"[\" ATT_NAME [ \"(\" RAttributeParameter \")\" ] \"]\" @ >", + L"[26][RAttribute]< \"[\" ATT_NAME [ \"(\" RAttributeParameter @ \")\" ] \"]\" >", + L"[27][REnumMember] BEGIN ", + L"[28][REnumMember] END [ENDING]", + L"[29][REnumMember]< NAME \",\" @ >", + L"[30][REnumMember]< NAME @ \",\" >", + L"[31][REnum] BEGIN ", + L"[32][REnum] END [ENDING]", + L"[33][REnum]< \"enum\" @ NAME \"{\" { REnumMember } \"}\" >", + L"[34][REnum]< \"enum\" NAME \"{\" @ { REnumMember } \"}\" >", + L"[35][REnum]< \"enum\" NAME \"{\" { REnumMember @ } \"}\" >", + L"[36][REnum]< \"enum\" NAME \"{\" { REnumMember } \"}\" @ >", + L"[37][REnum]< \"enum\" NAME @ \"{\" { REnumMember } \"}\" >", + L"[38][RStructMember] BEGIN ", + L"[39][RStructMember] END [ENDING]", + L"[40][RStructMember]< \"var\" @ NAME \":\" RType \";\" >", + L"[41][RStructMember]< \"var\" NAME \":\" @ RType \";\" >", + L"[42][RStructMember]< \"var\" NAME \":\" RType \";\" @ >", + L"[43][RStructMember]< \"var\" NAME \":\" RType @ \";\" >", + L"[44][RStructMember]< \"var\" NAME @ \":\" RType \";\" >", + L"[45][RStruct] BEGIN ", + L"[46][RStruct] END [ENDING]", + L"[47][RStruct]< \"struct\" @ NAME \"{\" { RStructMember } \"}\" >", + L"[48][RStruct]< \"struct\" NAME \"{\" @ { RStructMember } \"}\" >", + L"[49][RStruct]< \"struct\" NAME \"{\" { RStructMember @ } \"}\" >", + L"[50][RStruct]< \"struct\" NAME \"{\" { RStructMember } \"}\" @ >", + L"[51][RStruct]< \"struct\" NAME @ \"{\" { RStructMember } \"}\" >", + L"[52][RMessageRequest] BEGIN ", + L"[53][RMessageRequest] END [ENDING]", + L"[54][RMessageRequest]< \"request\" \":\" @ RType \";\" >", + L"[55][RMessageRequest]< \"request\" \":\" RType \";\" @ >", + L"[56][RMessageRequest]< \"request\" \":\" RType @ \";\" >", + L"[57][RMessageRequest]< \"request\" @ \":\" RType \";\" >", + L"[58][RMessageResponse] BEGIN ", + L"[59][RMessageResponse] END [ENDING]", + L"[60][RMessageResponse]< \"response\" \":\" @ RType \";\" >", + L"[61][RMessageResponse]< \"response\" \":\" RType \";\" @ >", + L"[62][RMessageResponse]< \"response\" \":\" RType @ \";\" >", + L"[63][RMessageResponse]< \"response\" @ \":\" RType \";\" >", + L"[64][RMessage] BEGIN ", + L"[65][RMessage] END [ENDING]", + L"[66][RMessage]< \"message\" @ NAME \"{\" [ RMessageRequest ] [ RMessageResponse ] \"}\" >", + L"[67][RMessage]< \"message\" NAME \"{\" @ [ RMessageRequest ] [ RMessageResponse ] \"}\" >", + L"[68][RMessage]< \"message\" NAME \"{\" [ RMessageRequest @ ] [ RMessageResponse ] \"}\" >", + L"[69][RMessage]< \"message\" NAME \"{\" [ RMessageRequest ] [ RMessageResponse @ ] \"}\" >", + L"[70][RMessage]< \"message\" NAME \"{\" [ RMessageRequest ] [ RMessageResponse ] \"}\" @ >", + L"[71][RMessage]< \"message\" NAME @ \"{\" [ RMessageRequest ] [ RMessageResponse ] \"}\" >", + L"[72][REventRequest] BEGIN ", + L"[73][REventRequest] END [ENDING]", + L"[74][REventRequest]< \"request\" \":\" @ RType \";\" >", + L"[75][REventRequest]< \"request\" \":\" RType \";\" @ >", + L"[76][REventRequest]< \"request\" \":\" RType @ \";\" >", + L"[77][REventRequest]< \"request\" @ \":\" RType \";\" >", + L"[78][REvent] BEGIN ", + L"[79][REvent] END [ENDING]", + L"[80][REvent]< \"event\" @ NAME \"{\" [ REventRequest ] \"}\" >", + L"[81][REvent]< \"event\" NAME \"{\" @ [ REventRequest ] \"}\" >", + L"[82][REvent]< \"event\" NAME \"{\" [ REventRequest @ ] \"}\" >", + L"[83][REvent]< \"event\" NAME \"{\" [ REventRequest ] \"}\" @ >", + L"[84][REvent]< \"event\" NAME @ \"{\" [ REventRequest ] \"}\" >", + L"[85][RDeclDetail] BEGIN ", + L"[86][RDeclDetail] END [ENDING]", + L"[87][RDeclDetail]<< !REnum @ >>", + L"[88][RDeclDetail]<< !REvent @ >>", + L"[89][RDeclDetail]<< !RMessage @ >>", + L"[90][RDeclDetail]<< !RStruct @ >>", + L"[91][RDecl] BEGIN ", + L"[92][RDecl] END [ENDING]", + L"[93][RDecl]<< { RAttribute @ } !RDeclDetail >>", + L"[94][RDecl]<< { RAttribute } !RDeclDetail @ >>", + L"[95][Schema] BEGIN ", + L"[96][Schema] END [ENDING]", + L"[97][Schema]< RDecl @ { RDecl } >", + L"[98][Schema]< RDecl { RDecl @ } >", }; return results[index]; } @@ -11938,6 +12092,8 @@ GuiRemoteProtocolAstInsReceiver : public vl::glr::AstInsReceiverBase return vl::Ptr(new vl::presentation::remoteprotocol::GuiRpMessageRequest); case GuiRemoteProtocolClasses::MessageResponse: return vl::Ptr(new vl::presentation::remoteprotocol::GuiRpMessageResponse); + case GuiRemoteProtocolClasses::OptionalType: + return vl::Ptr(new vl::presentation::remoteprotocol::GuiRpOptionalType); case GuiRemoteProtocolClasses::PrimitiveType: return vl::Ptr(new vl::presentation::remoteprotocol::GuiRpPrimitiveType); case GuiRemoteProtocolClasses::ReferenceType: @@ -11976,6 +12132,8 @@ GuiRemoteProtocolAstInsReceiver : public vl::glr::AstInsReceiverBase return vl::glr::AssemblerSetObjectField(&vl::presentation::remoteprotocol::GuiRpMessageRequest::type, object, field, value, cppFieldName); case GuiRemoteProtocolFields::MessageResponse_type: return vl::glr::AssemblerSetObjectField(&vl::presentation::remoteprotocol::GuiRpMessageResponse::type, object, field, value, cppFieldName); + case GuiRemoteProtocolFields::OptionalType_element: + return vl::glr::AssemblerSetObjectField(&vl::presentation::remoteprotocol::GuiRpOptionalType::element, object, field, value, cppFieldName); case GuiRemoteProtocolFields::Schema_declarations: return vl::glr::AssemblerSetObjectField(&vl::presentation::remoteprotocol::GuiRpSchema::declarations, object, field, value, cppFieldName); case GuiRemoteProtocolFields::StructDecl_members: @@ -12034,6 +12192,7 @@ GuiRemoteProtocolAstInsReceiver : public vl::glr::AstInsReceiverBase L"MessageDecl", L"MessageRequest", L"MessageResponse", + L"OptionalType", L"PrimitiveType", L"ReferenceType", L"Schema", @@ -12042,7 +12201,7 @@ GuiRemoteProtocolAstInsReceiver : public vl::glr::AstInsReceiverBase L"Type", }; vl::vint index = (vl::vint)type; - return 0 <= index && index < 16 ? results[index] : nullptr; + return 0 <= index && index < 17 ? results[index] : nullptr; } const wchar_t* GuiRemoteProtocolCppTypeName(GuiRemoteProtocolClasses type) @@ -12058,6 +12217,7 @@ GuiRemoteProtocolAstInsReceiver : public vl::glr::AstInsReceiverBase L"vl::presentation::remoteprotocol::GuiRpMessageDecl", L"vl::presentation::remoteprotocol::GuiRpMessageRequest", L"vl::presentation::remoteprotocol::GuiRpMessageResponse", + L"vl::presentation::remoteprotocol::GuiRpOptionalType", L"vl::presentation::remoteprotocol::GuiRpPrimitiveType", L"vl::presentation::remoteprotocol::GuiRpReferenceType", L"vl::presentation::remoteprotocol::GuiRpSchema", @@ -12066,7 +12226,7 @@ GuiRemoteProtocolAstInsReceiver : public vl::glr::AstInsReceiverBase L"vl::presentation::remoteprotocol::GuiRpType", }; vl::vint index = (vl::vint)type; - return 0 <= index && index < 16 ? results[index] : nullptr; + return 0 <= index && index < 17 ? results[index] : nullptr; } const wchar_t* GuiRemoteProtocolFieldName(GuiRemoteProtocolFields field) @@ -12085,6 +12245,7 @@ GuiRemoteProtocolAstInsReceiver : public vl::glr::AstInsReceiverBase L"MessageDecl::response", L"MessageRequest::type", L"MessageResponse::type", + L"OptionalType::element", L"PrimitiveType::type", L"ReferenceType::name", L"Schema::declarations", @@ -12093,7 +12254,7 @@ GuiRemoteProtocolAstInsReceiver : public vl::glr::AstInsReceiverBase L"StructMember::type", }; vl::vint index = (vl::vint)field; - return 0 <= index && index < 19 ? results[index] : nullptr; + return 0 <= index && index < 20 ? results[index] : nullptr; } const wchar_t* GuiRemoteProtocolCppFieldName(GuiRemoteProtocolFields field) @@ -12112,6 +12273,7 @@ GuiRemoteProtocolAstInsReceiver : public vl::glr::AstInsReceiverBase L"vl::presentation::remoteprotocol::GuiRpMessageDecl::response", L"vl::presentation::remoteprotocol::GuiRpMessageRequest::type", L"vl::presentation::remoteprotocol::GuiRpMessageResponse::type", + L"vl::presentation::remoteprotocol::GuiRpOptionalType::element", L"vl::presentation::remoteprotocol::GuiRpPrimitiveType::type", L"vl::presentation::remoteprotocol::GuiRpReferenceType::name", L"vl::presentation::remoteprotocol::GuiRpSchema::declarations", @@ -12120,7 +12282,7 @@ GuiRemoteProtocolAstInsReceiver : public vl::glr::AstInsReceiverBase L"vl::presentation::remoteprotocol::GuiRpStructMember::type", }; vl::vint index = (vl::vint)field; - return 0 <= index && index < 19 ? results[index] : nullptr; + return 0 <= index && index < 20 ? results[index] : nullptr; } vl::Ptr GuiRemoteProtocolAstInsReceiver::ResolveAmbiguity(vl::vint32_t type, vl::collections::Array>& candidates) @@ -12171,6 +12333,7 @@ namespace vl::presentation::remoteprotocol L"STRING", L"CHAR", L"KEY", + L"COLOR", L"CPP_NAME", L"ATT_NAME", L"NAME", @@ -12183,6 +12346,7 @@ namespace vl::presentation::remoteprotocol L"COLON", L"SEMICOLON", L"COMMA", + L"QUESTION", L"SPACE", }; vl::vint index = (vl::vint)token; @@ -12206,6 +12370,7 @@ namespace vl::presentation::remoteprotocol L"string", L"char", L"key", + L"color", nullptr, nullptr, nullptr, @@ -12218,6 +12383,7 @@ namespace vl::presentation::remoteprotocol L":", L";", L",", + L"?", nullptr, }; vl::vint index = (vl::vint)token; @@ -12241,9 +12407,10 @@ namespace vl::presentation::remoteprotocol L"string", L"char", L"key", - L"(::[a-zA-Z_][a-zA-Z0-9<>]*){1,}", - L"@[a-zA-Z_][a-zA-Z0-9]*", - L"[a-zA-Z_][a-zA-Z0-9]*", + L"color", + L"(::[a-zA-Z_][a-zA-Z_0-9<>]*){1,}", + L"@[a-zA-Z_][a-zA-Z_0-9]*", + L"[a-zA-Z_][a-zA-Z_0-9]*", L"/{", L"/}", L"/[", @@ -12253,6 +12420,7 @@ namespace vl::presentation::remoteprotocol L":", L";", L",", + L"/?", L"/s+", }; vl::vint index = (vl::vint)token; @@ -12261,19 +12429,19 @@ namespace vl::presentation::remoteprotocol void GuiRemoteProtocolLexerData(vl::stream::IStream& outputStream) { - static const vl::vint dataLength = 1555; // 16760 bytes before compressing + static const vl::vint dataLength = 1604; // 18064 bytes before compressing static const vl::vint dataBlock = 256; - static const vl::vint dataRemain = 19; + static const vl::vint dataRemain = 68; static const vl::vint dataSolidRows = 6; static const vl::vint dataRows = 7; static const char* compressed[] = { - "\x78\x41\x00\x00\x0B\x06\x00\x00\x59\x00\x01\xAD\x01\x84\x81\x80\x16\x82\x09\x08\x84\x8A\x0B\x84\x81\x06\x87\x04\xA0\x11\x84\x88\x14\x88\x83\x14\x17\x84\x87\x86\x84\x80\x18\x83\x1C\x04\xBA\x21\x84\x8B\x1C\x90\x82\x1E\x27\x84\xBE\x0A\x94\x80\x21\x96\x82\x41\x04\x9A\x24\x8B\x2C\x98\x83\x2E\x37\x84\x9F\x3A\x94\x81\x31\x9E\x82\x62\x40\x84\x83\x33\xA4\x80\x32\xA3\x04\xE5\x09\xA4\x86\x34\xA4\x83\x33\x4F\x84\xA8\x32\xA4\x81\x35\xAA\x82\x6A\x58\x84\x8B\x3B\xAC\x80\x36\xAF\x04\xED\x21\xA4\x8E\x34\xB0\x83\x37\x67\x84\xB0\x2A\xB4\x81\x39\xB6\x82\x72\x70\x84\x93\x33\xBC\x80\x3A\xBB\x04\xF5\x39\xA4\x86\x3C\xBC\x83\x3B\x04\xF8\x04\x99\x33\xC4\x82\x3C\xC3\x04\xFB\x09\xC4\x8D\x3C\xC4\x83\x0B\x8F\x91\xC1\x90\xC1\x83\x08\x82\x0A\x04\x96\x04\x9F\x7C\xCF\x7C\x06\x82\x15\x1B\xDD\xC3\xDF\x81\x82\x06\x82\x11\x04\x92\x04\x87\xD6\xD0\x82\x03\x0D\x81\x89\x81\x82\x04\x80\x04\xD6\xB8\x81\x87\x19\xD0\x03\x04\xDE\x02\xBC\xAD\xC0\x02\xE2\xE5\x00\x83\x01\xC1\x84\x81\x09\xEE\xD1\x83\x06\x82\x10\x22\xE3\xD3\xE4\xED\xEA\xEB\x0C\xD2\xD6\xDA\xF8", - "\xE1\x82\xED\xCE\x0C\x04\xDC\xC0\x02\xF4\xF1\xF2\xF3\x80\xE5\xE8\xE7\xE3\xFB\xF1\xF4\xF6\xF5\xF0\xEF\xF2\xEE\xF4\xF9\xEE\xEF\xFB\xF8\x9D\xE2\xF9\xF5\xEB\xFF\xFB\xFA\xF1\x40\x83\x7D\x7B\x04\x81\x4A\x05\x81\x03\x81\x8B\x7B\x06\x08\xBE\x7C\x7F\x83\xDB\x76\x7F\x82\x83\x11\x8A\x86\x85\x82\x18\x82\x8A\x85\x83\x04\x5C\x0C\x87\x85\x10\xA1\x8D\x7E\x84\xFC\x54\x87\x77\x87\x00\x1D\x08\x8B\x86\x17\xAC\x89\x87\x8A\x24\xA2\x83\x85\x8C\xF8\x66\x83\x89\x8B\x04\x5E\x00\x8C\x8E\x3C\xAF\x8D\x8E\x8B\x32\x81\x9F\x3E\x8D\x25\xB4\x8A\x7F\x8E\x3E\x89\x92\x83\x07\x48\xAE\x8E\x7A\x90\x32\x84\x99\x7E\x94\xA3\x4E\x9D\x90\x8A\x12\x7F\x87\x94\x88\x50\xA1\x84\x97\x7F\x46\x9C\x66\x96\x96\x17\xA1\x0B\x96\x92\x48\x9D\x9E\x95\x98\x15\x80\x05\x8F\x99\x63\x89\x92\x08\x9C\x69\xAA\x93\x8D\x77\x51\xAC\x91\x9E\x7B\x23\x34\x94\x98\x9A\x3D\xB6\x97\x9E\x9B\x79\xB8\x9E\x76\x8B\x24\x3E\x90\xA3\xA2\x7B\xAC\x92\xA0\x75\x25\x0E\xAF\xA3\xA4\x94\x95\xA6\xA7\xA5\xD4\x66\x01\x8E\xA6\x01\x5C\xA0\x02\xA7\xA0\x84\x41\xA9\xA7\xA2\xA5\xA4\xAB\xA9\x9F\xA6\xA9\xA8\xAA", - "\xA3\xAB\xAE\xA9\xAB\xB0\xAA\xA8\xA7\x8D\x84\xA2\x8F\x96\x98\x8A\x8D\xAF\x9E\xAE\x18\xB3\xAE\xAF\xAF\xC0\x81\xB2\xB3\xB0\xC4\x85\xB6\xB3\xB1\xC8\x89\xBA\xB3\xB2\xCC\x8D\xBE\xB3\xB3\xD0\x91\xB2\xB7\xB4\xD4\x95\xB6\xB7\xB5\xD8\x99\xB7\xB7\x09\x04\x5C\xB1\x42\xB7\x00\x20\xBA\xB7\xB8\xE4\xB7\xAD\x9B\x9B\xBB\xB9\xA8\x91\x45\xE9\x9C\x91\xB2\xB9\x27\x86\xAD\x98\xAF\xF4\xAA\xBF\x9F\xB0\xF0\xB4\xA8\xB8\xA3\xF6\xBC\xB7\x84\x46\xF7\x82\xB9\xBC\x75\xE6\xAE\x8A\x09\xBF\xF5\xAD\xB2\x7C\xBE\x92\x84\xCA\x9C\xC2\x10\xC1\x4B\x09\xBF\x0C\xF2\xB0\x85\xC1\x11\xFE\xBB\xA3\x46\x1A\xC3\xC6\x9E\xC7\x55\x8F\xCA\xC1\xC2\x49\x83\x41\x7E\x0B\x8A\x95\xC5\xAF\x9A\x16\xF4\xA4\xC8\xAF\x2F\x19\xCF\x92\xC0\x0D\xD3\x78\xC7\xC8\x32\xE8\x8E\x46\xC2\x2A\xC1\x97\xCD\xC7\xFD\xB1\x09\xCD\x7C\x3D\xC5\xAB\xC9\xBC\x40\xF8\xCA\xD2\x7C\x32\x35\x9F\xB9\xCD\x21\xED\xC4\x77\x0C\x43\xC9\xD6\xD6\x80\x45\xF6\xA2\xCB\xD5\x55\xFC\xA4\x0F\x7A\xE3\xB5\x01\x8E\xD8\x01\x64\xD0\x02\xD9\x68\xC4\x49\xD9\xD9\x6A\xED\xDC\xDB\xDB\x67\xEE\xD1\xDC\xDC\x6B\xF3\xD6\xDD\xDD\x78", - "\xF2\xD3\xB2\x0D\x50\xDD\x6C\xDE\xD4\xD3\x7F\xD0\x02\xE0\x84\xC4\x45\xE1\x40\x87\xC3\xE6\xE3\xE2\x88\xCC\xEA\xE1\xE3\x90\xCF\xE2\xE5\xE2\x94\xCE\xE2\xE0\x7E\xE0\x99\xED\xB5\xDF\xE4\x9D\xE6\xB0\xC8\x47\x80\xE1\xD4\xD7\x4B\xEF\xC8\x89\xD6\x2C\xC7\xDE\xC9\xD7\x04\x77\x0C\xEA\xBB\xC0\xA0\xE8\xAE\xE8\xA1\xE4\xEA\xC4\x0E\xAF\xCB\xC4\xCC\xED\x87\x9B\xD4\xCA\x48\xA5\xC8\x90\x49\xC0\x4F\xFC\xE7\xB8\x98\xC1\xC9\xF9\x91\x49\x4B\xE8\xE7\xC6\xEF\xB9\xE6\xE1\x40\x4A\xC4\xF1\xEC\xE7\x90\xD0\xCA\xFC\xAD\x0F\x55\xCE\xF3\xA3\xBE\xD2\xD8\x8B\x4A\xF6\x67\x9E\xF5\x92\xF1\xE1\xE9\xF9\xC6\xF9\x53\xAC\x9F\x0D\xF4\xF0\xF0\xEF\xAE\xEC\xD8\xE8\xFF\x48\xF9\xF8\xF6\xEC\xFB\xBE\xE0\xF1\xFB\xA1\x4C\xCA\x7B\x7C\xF2\x2A\x7E\x61\xFC\x6A\x79\x80\xC2\x42\x08\x41\x43\x09\x3A\x05\x81\x26\x81\x2B\x70\x80\x7E\x10\x84\x82\x82\x15\x87\x81\x16\x99\x80\x06\x9B\x80\x01\x0B\x9D\x82\x83\x1F\x9C\x82\x07\xA3\x80\x84\x12\x86\x7B\x52\x97\x72\x45\x0A\xDE\x35\x73\xC8\x6D\x83\x72\x96\x71\x86\x0B\xB2\x80\x87\x19\xB6\x85\x86\x04\x98\x50\xFD\x3F\x67\x80\xDB\x61\x7A", - "\x80\xBD\x76\x7E\x01\xD5\x64\x09\xF2\x7B\x71\x87\xFC\x63\x82\x78\x45\x0E\x7F\x1E\xB3\x65\x78\x48\x83\x81\xFF\x43\x87\x42\x23\x3E\x78\x88\xC7\x7E\x3B\x11\x4D\x8C\x8B\x13\x8F\x53\x87\xD9\x78\x40\x12\x5D\x8E\x87\xEB\x7E\x67\x7A\x3C\x84\x8D\x12\x39\x78\x8A\xA4\x53\x8D\x8C\x54\x96\x69\x1B\xFA\x5A\x88\x32\xB1\x4A\x09\x46\x90\x8B\x19\xC2\x80\x8E\x0C\x4B\x0E\x8E\x66\x86\x6B\x1E\xD1\x83\x77\x3E\x8E\x89\x65\x09\x8B\x81\x03\xA0\x83\x34\x09\xB7\x3E\x84\x21\x91\x90\x24\x93\x95\x85\x4A\xA2\x86\x92\x92\x98\x92\x23\xC5\x5C\x09\x40\x9E\x77\x93\xDF\x62\x91\x1D\xF1\x87\x91\xEA\x73\x78\x8D\x61\x85\x96\xED\x4D\x09\x8E\xEB\x5E\x8D\x80\x84\x95\x7E\xC6\x4E\x00\x90\x9E\x47\x8B\x90\x6F\x8E\x47\x13\x35\x9A\x63\x39\xB0\x91\x97\xBC\x8E\x3C\x14\x08\x9A\x8E\x51\x81\x8E\x90\x28\x51\x0B\x15\xB7\x96\x99\x79\x41\x9D\x7B\xCC\x9A\x68\x1F\x82\x42\x0B\x67\x8D\x7A\x5B\x53\x11\x45\x36\x81\x2B\x9A\x00\x1D\x9F\x9B\x04\x20\x9C\x37\xE1\x94\x9D\x71\xA6\x9E\x9B\xE5\x88\x9F\x39\xE2\x9A\x9D\x76\xAC\x9F\x9D\xE9\x9E\x96\xCD\x29\x96\x9B\x3E\xB2\x9B\x74\xC0\x84", - "\x94\x19\xF7\x95\x77\x7C\xB2\x3C\x0A\xF5\x9C\x54\x3F\x85\x9E\x9E\x55\xBC\x55\x0A\xAD\x87\x97\x2B\xF3\x93\x9B\x80\xAB\x3E\x0A\xC4\x8E\x95\x2C\xEE\x83\x94\x64\xBA\x9E\x94\xBE\x57\x0A\x22\xF2\x5A\xA3\x80\x1D\xA3\x65\x1F\xB8\x3F\x47\xA3\xA4\x20\x92\x9E\xA5\xA4\x28\xA7\xA6\x4A\x80\x06\xA4\x96\xA9\xA6\xA5\x2B\xAD\xA6\x4C\xAF\xA3\xA7\x85\xAA\x48\x8C\x0D\xB7\xA2\x45\x8B\x53\xA0\x59\x85\xA6\xA1\xD7\x85\x9A\x34\xB1\x9E\x44\x2C\x00\xAD\x97\xC2\x5F\xA0\x03\x9C\xAF\xA5\xD1\x21\xA7\x3E\x35\xB0\xA6\x54\xD1\xA4\xAA\x9A\x96\xA9\xA6\x57\xB3\xA9\x56\xCF\xA2\xA9\xD4\x7F\xA2\xA7\x06\xAC\x4E\x3F\x5F\x1C\x32\xB2\x9C\x37\x1E\xEF\x1F\x1D\x00\x00\x25\x21\x80\x11\x3E\xAD\xD0\x31\xAC\x5C\xF3\xA0\x01\xB7\xB5\xAA\xAE\x77\xB4\xAC\x65\x00\x0C\x40\xBA\xA9\x31\x20\xAB\x35\x33\x65\x20\x39\x32\x82\x20\x39\x3E\x07\x54\xAE\x5D\x8B\xB8\xAE\xC6\x8A\xB5\xB1\x90\xA1\x21\x5F\x80\x0F\x38\x03\x6D\xAF\xB1\x98\xB9\xAE\x66\xF6\xA7\x37\xCC\xB6\xAD\x34\xC3\x24\x21\x65\x80\x0B\x38\xCF\x91\xB2\xB3\xBB\x39\xB3\x67\x4D\x3C\xAF\xD7\x27\xB6\xB1\x9A\xB3\x36\x66\x93", - "\xB5\x37\x80\x3E\x36\xB4\x01\x2C\x20\x6B\xC8\x31\x20\xE0\x34\xAD\x38\x04\x20", + "\x90\x46\x00\x00\x3C\x06\x00\x00\x5E\x00\x01\xAE\x01\x84\x81\x81\x16\x82\x09\x08\x84\x8A\x0B\x84\x81\x06\x87\x04\xA0\x11\x84\x88\x14\x88\x83\x14\x17\x84\xAC\x1A\x84\x80\x18\x83\x1C\x04\xBA\x21\x84\x8B\x1C\x90\x82\x1E\x27\x84\xBE\x0A\x94\x87\x1D\x96\x82\x40\x30\x84\x81\x24\x82\x2C\x83\x2D\x37\x84\x9D\x3A\x94\x87\x2D\x9E\x82\x61\x40\x84\x82\x33\xA4\x83\x30\xA3\x04\xE4\x09\xA4\x85\x34\xA4\x82\x33\x4F\x84\xA7\x32\xA4\x80\x35\xAA\x82\x69\x58\x84\x8A\x3B\xAC\x83\x34\xAF\x04\xEC\x21\xA4\x8D\x34\xB0\x82\x37\x67\x84\xAF\x2A\xB4\x80\x39\xB6\x82\x71\x70\x84\x92\x33\xBC\x83\x38\xBB\x04\xF4\x39\xA4\x85\x3C\xBC\x82\x3B\x7F\x84\xB7\x24\x88\x3C\x81\x3C\xC3\x04\xFA\x09\xC4\x8B\x3C\xC4\x83\x3E\x8F\x84\x98\x12\xC4\xC9\x83\xC9\x80\x13\x04\x94\x04\x86\x0C\x83\x7F\xCF\xFF\x0C\x04\x95\x0E\xC8\xD2\xD3\x0B\x10\x81\x8E\x04\x81\x0C\x82\x08\x82\xAB\xAA\xC4\x86\x0D\x81\x81\x85\x80\x02\x04\x88\x10\xDC\xD9\x83\x03\xDE\x00\x0B\x00\xE4\x00\xE1\xD8\x00\xE3\xC6\x85\x04\x83\x05\xE4\x81\x01\xE6\xB2\x81\x8F\x04\x80\x0D\xD2\xD3\xEB\xD8\xD9\xDA\xFA", + "\x06\xEA\xEE\xEE\xD3\xDC\x81\x9B\xE4\x89\x0C\x81\xF0\x00\xE7\xE9\xE6\xEB\xF1\x82\xF5\xF6\xF6\xE8\xF0\xEE\xF1\xFF\xF5\xF8\xFB\xFB\xF3\xF9\xDD\xFF\xEC\xFD\xFC\xD1\xF3\xFE\x7C\x70\x81\x76\xFA\x76\x75\x80\x7E\xF2\x49\x86\x7F\x06\x0A\x88\x86\x80\x7C\x1C\x0D\x83\x81\x80\x14\x9E\x73\x85\x85\xD7\x57\x80\x7A\x84\x1C\x8F\x8E\x86\x83\x20\x87\x83\x7D\x07\x1D\xA0\x88\x87\x89\x19\xBB\x78\x8A\x86\xFF\x65\x87\x7A\x07\x2E\xB1\x8F\x86\x88\x32\xA6\x88\x8B\x8D\x2C\xA7\x89\x8F\x3F\x34\xB6\x7F\x05\x8D\x3D\xA1\x80\x91\x8D\x37\xB8\x8A\x8A\x8E\x47\xBC\x83\x93\x8C\x4B\xB7\x72\x44\x93\x50\x82\x96\x7D\x91\x2B\x89\x95\x87\x8E\x41\x99\x9D\x91\x08\x4D\x9A\x93\x94\x95\x18\xBB\x87\x95\x92\x5E\x92\x96\x9B\x79\x22\x1D\x9A\x9B\x97\x60\x94\x82\x9A\x9B\x64\xAB\x97\x99\x8D\x23\x32\x91\x91\x9B\x63\xA2\x70\x98\x96\x76\x84\x44\x0A\x9C\x25\x3D\x91\x94\x9E\x70\xBA\x94\x94\x9F\x51\xA7\x76\x0A\xA0\x73\x89\xAD\x90\xA1\x27\xA7\x06\x94\xA4\x94\x95\xA6\xA7\xA5\x98\xA7\x85\x46\xA1\xD7\x5B\xA0\x02\xA7\xA0\x96\x41\x41\xA8\xA3\xA2\xAF\xA6\xA9\xA4\xA7\xA5\xAB\xAA", + "\xAA\xAD\xA9\xAB\xAB\xA8\xA6\xA9\xA4\x81\x93\x81\x88\xA1\xA3\xB8\xA5\x9A\xAE\x9C\xB3\xBD\xAE\xAF\xAF\xC0\x81\xB2\xB3\xB0\xC4\x85\xB6\xB3\xB1\xC8\x89\xBA\xB3\xB2\xCC\x8D\xBE\xB3\xB3\xD0\x91\xB2\xB7\xB4\xD4\x95\xB6\xB7\xB5\xD8\x99\xBA\xB7\xB6\xDC\xA7\x88\x45\x40\xDF\x80\x01\xB9\xB8\xDD\xA5\xB7\xB7\x9B\xB6\xB1\x9E\xA3\xBA\xB9\xB5\x8A\x08\xA3\xC2\xA8\xBE\x7F\xAD\xBB\xAC\xB5\xBD\xBB\xEC\xB1\xB5\xAF\xBC\xEA\xB8\xBE\xBF\xBD\x41\xAB\x04\x91\xB0\xF2\xBD\x74\xBD\x89\x1B\x76\xBC\xA0\xC0\xF0\x7A\xBC\xA6\x91\x0F\xED\x8A\xC3\xC4\xFF\xB0\x77\x40\xC5\xF3\x4E\xC0\x01\x9B\x07\xD8\xCB\xC1\x89\x03\x5E\xC1\xC7\xAC\x05\xC2\x8D\xBC\xC3\x22\xE6\x9F\x08\x7C\x1E\x69\xCA\xC4\xC7\x27\xDF\xC4\xC5\x0C\x32\xF6\x80\xB1\xC9\xDF\x5D\xC5\xC5\xCA\xF7\xB2\x0F\xA0\xC1\xFB\x86\xC1\xCC\xCF\x72\xB3\x05\xCD\xC6\x40\xE3\xC1\x9B\xD0\x3B\xCD\xD8\xC8\x00\x34\x03\xC7\xCD\xD0\x26\xCA\xD7\x79\x0D\x47\xD9\xDE\xC9\xD2\x1B\xFB\x9C\xD3\xD3\x07\xB6\x0A\xD4\xAE\x2F\xDE\xD6\xD7\xD8\x60\xF2\x97\x0D\xC3\xDD\xB8\x09\x92\xDB\x01\x70\xD0\x02\xDC\x74\xC4\x45\xDD\xDC\x76", + "\xF9\xD8\xDF\xDE\x73\xFA\xDD\xDC\xDF\x77\xFF\xD2\xE1\xE0\x84\xFE\xD2\xB0\x48\x4A\xD5\x88\xE1\xD7\xD8\x4B\xEE\xE3\x47\x90\xC1\x4F\xE2\xE4\x91\xC0\x03\xE6\xE5\x95\xD7\xEA\xE5\xE6\x9C\xD4\xEE\xE4\xE6\x9F\xFD\x73\xB9\x46\xE0\x94\xD6\xBB\xE9\xC5\xB8\xC6\x87\xD7\x68\xED\xE3\xA0\xD7\x30\xE7\xD4\xD0\xC5\x22\x73\xEE\xBD\xD9\x87\xAC\xE6\xED\x90\x25\x7B\xE5\x88\xEE\x45\xBA\xCF\xD1\x0F\xAE\xF7\x78\x49\xBE\xB0\xE6\xDC\xE1\x8A\xBE\xCD\xF0\x8B\x4A\x5B\xD3\xD9\xE1\xA1\xCB\xDB\x8E\xF1\xDA\xEC\xAE\x48\xF2\xF4\xD5\xD5\x92\xEE\xD3\x35\xF1\x47\xF6\xE9\x78\xAA\xE3\x7B\xF7\xD8\xE6\x94\x4F\xF8\xDB\xFF\xA6\xF8\xAD\xE8\xC5\xF9\xFB\xBD\xC0\xD0\xCD\xF7\x67\xE7\x42\x12\xFF\xFE\x1F\xB5\xFE\xF7\xFD\x4A\x56\x3F\x10\x7C\x70\x7C\x8A\x7E\x78\x49\xF1\x6C\x7D\x01\x80\x04\x08\x78\x49\x79\x77\x09\x8B\x83\xBD\x45\x05\x79\x03\x8B\x69\x82\xF3\x64\x83\x9D\x41\x56\x08\x82\x07\x0D\x3B\x1D\x81\x21\x08\x80\x83\x84\xED\x23\x87\x84\x04\x28\x86\x08\xA9\x8C\x85\x15\xAE\x80\x00\x2A\x90\x85\x0B\xB2\x8F\x85\x18\xB6\x83\x86\x37\x8F\x87\xE1\x64\x7A\x3B\xC5\x7D\x85", + "\x73\xA0\x61\x8B\xE6\x1F\x73\x88\x21\x80\x8D\x88\x48\x87\x88\x0F\xCA\x71\x76\x00\x99\x82\x81\xE9\x76\x81\x9E\x4E\x8A\x82\x46\x48\x0F\x67\xDC\x6D\x8B\xF9\x20\x49\x09\x2A\x90\x8B\x89\x10\x80\x83\x14\xDB\x8F\x88\x5C\x4A\x0C\x80\x52\x94\x7B\x16\xCB\x0E\x8A\x09\x92\x6E\x7D\x60\x8C\x78\x15\xEC\x5C\x09\x36\x91\x8F\x81\xC1\x7A\x76\x1B\xEC\x5D\x09\x0A\xB8\x8E\x7E\x64\x96\x8C\x1A\xFF\x8F\x7F\x40\x9F\x8E\x79\x4E\x18\x88\x1C\xD3\x79\x5C\x0C\xA3\x6F\x09\x82\x8C\x91\xA5\x6F\x78\x3A\xE1\x51\x93\x8F\x36\x6B\x92\x18\xEA\x80\x7E\x4C\xA5\x88\x0A\x0E\x80\x5B\x08\x9F\x8C\x53\x18\xA6\x81\x49\x39\x94\x86\x2A\xA9\x9C\x94\x1C\xAE\x95\x86\xAF\x8B\x95\x2C\xA6\x95\x59\x28\x31\x88\x75\xB8\x9C\x5E\x24\xC2\x6E\x91\x43\x9E\x97\x8D\xBE\x54\x92\x1C\x86\x9F\x96\x05\x92\x0A\x91\xC1\x97\x96\xC4\x73\x8D\x69\x29\x17\x95\x4C\x69\x8D\x90\x33\xF7\x54\x0B\x67\x80\x9D\x57\xC2\x96\x7B\x34\xD6\x91\x4B\x2A\x3C\x54\x90\x08\x9B\x9A\x2F\xF3\x36\x0B\x41\x99\x8C\x89\x9D\x85\x8E\x3A\xDF\x97\x9D\x30\x84\x9F\x40\x57\x1C\x99\xD3\x51\x9A\x96\x71\x85\x9F\x9E\xF4\x7D", + "\x58\x16\x49\x4B\x9F\x80\x3D\x98\x00\xFF\x81\xA0\x41\x02\xAE\x9F\x81\x86\xA5\xA0\x08\xA0\xA3\x41\x8A\xA9\xA0\x82\x8C\xA7\xA1\x0E\xB1\xA3\x42\xF4\x9C\x96\x7B\xAB\x9B\x9C\xBF\x60\x9F\x05\x96\xA2\x9F\x32\x94\xA5\x6A\x1C\xBF\x41\x16\x1D\xA8\x98\x6C\x8A\x98\x7F\x7A\x97\xA3\x02\xB6\x26\x80\x8D\xA3\x89\x9D\x24\xBF\x40\x4E\x51\x7A\x92\x2D\xB0\xA0\xA3\x38\xB9\x92\xAF\x5C\x0E\x83\xEE\x3C\xA1\x20\x3F\xA0\x81\x50\xDA\x31\xA9\xA2\x84\x26\xA8\x40\xA7\xAA\x52\xC9\xAC\xA8\x00\x08\xAE\xA9\x4B\xB0\xA9\x53\xCF\xA4\xAB\xA8\x95\xAD\xA9\x1F\xB9\x65\x4A\xB1\xAB\x81\xAC\xAB\x75\x97\xF8\x97\x92\x57\xDB\x8F\x9D\x06\x7B\x21\xA7\x1E\xA1\x59\x50\xA4\x9B\x79\xA7\x84\xA9\x49\x57\xB2\xAA\x5C\xF1\xA4\xAE\xAB\xB6\xAB\xAA\x77\xB3\xAD\x5E\xEE\xAE\xA4\x4E\x95\x94\xAB\x2A\xBD\x3E\x3F\x5F\x1F\x33\x3F\x20\x36\xB0\xFD\x1F\x04\x40\x05\x21\x21\xD6\x0D\xB4\x35\x90\xAF\xB2\x64\x80\x0E\xB0\xCA\x91\xB6\xB2\x93\xB7\x30\x00\x24\x43\xB3\xD7\x18\x32\x33\xA3\x3C\x30\x41\x28\x31\x21\xF2\x0B\x44\x20\x11\x53\xB1\x65\xAB\xB7\xB2\xD6\xAA\xB5\xB5\xB0\xB3\xB0\x67\x80", + "\x05\x3B\x80\x29\xB4\xB1\xAE\xB8\xB2\x6E\xB9\xB5\xB3\xDD\x2F\xB7\xB7\x00\x0F\x22\x74\x54\x3E\x39\xD8\xBB\xB6\xB8\xBF\x20\xBA\x68\x13\xB3\x3B\x80\x33\xB4\x36\xC0\xBC\xB6\x42\x13\xB6\x39\xD9\xB9\x31\x20\xC2\x31\xB9\x6D\x00\x0D\xB8\x00\x0C\x39\x20\xC4\x2C\xB8\x41\x4A\x31\x20", }; vl::glr::DecompressSerializedData(compressed, true, dataSolidRows, dataRows, dataBlock, dataRemain, outputStream); } diff --git a/Import/GacUICompiler.h b/Import/GacUICompiler.h index fd3386e5..1e5d2f3a 100644 --- a/Import/GacUICompiler.h +++ b/Import/GacUICompiler.h @@ -1082,6 +1082,7 @@ namespace vl::presentation::remoteprotocol class GuiRpMessageDecl; class GuiRpMessageRequest; class GuiRpMessageResponse; + class GuiRpOptionalType; class GuiRpPrimitiveType; class GuiRpReferenceType; class GuiRpSchema; @@ -1099,6 +1100,7 @@ namespace vl::presentation::remoteprotocol String = 4, Char = 5, Key = 6, + Color = 7, }; class GuiRpType abstract : public vl::glr::ParsingAstBase, vl::reflection::Description @@ -1109,6 +1111,7 @@ namespace vl::presentation::remoteprotocol public: virtual void Visit(GuiRpPrimitiveType* node) = 0; virtual void Visit(GuiRpReferenceType* node) = 0; + virtual void Visit(GuiRpOptionalType* node) = 0; virtual void Visit(GuiRpArrayType* node) = 0; }; @@ -1132,6 +1135,14 @@ namespace vl::presentation::remoteprotocol void Accept(GuiRpType::IVisitor* visitor) override; }; + class GuiRpOptionalType : public GuiRpType, vl::reflection::Description + { + public: + vl::Ptr element; + + void Accept(GuiRpType::IVisitor* visitor) override; + }; + class GuiRpArrayType : public GuiRpType, vl::reflection::Description { public: @@ -1243,6 +1254,7 @@ namespace vl::reflection::description DECL_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpPrimitiveTypes) DECL_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpPrimitiveType) DECL_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpReferenceType) + DECL_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpOptionalType) DECL_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpArrayType) DECL_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpAttribute) DECL_TYPE_INFO(vl::presentation::remoteprotocol::GuiRpDeclaration) @@ -1271,6 +1283,11 @@ namespace vl::reflection::description INVOKE_INTERFACE_PROXY(Visit, node); } + void Visit(vl::presentation::remoteprotocol::GuiRpOptionalType* node) override + { + INVOKE_INTERFACE_PROXY(Visit, node); + } + void Visit(vl::presentation::remoteprotocol::GuiRpArrayType* node) override { INVOKE_INTERFACE_PROXY(Visit, node); @@ -1341,6 +1358,7 @@ namespace vl::presentation::remoteprotocol::json_visitor virtual void PrintFields(GuiRpMessageDecl* node); virtual void PrintFields(GuiRpMessageRequest* node); virtual void PrintFields(GuiRpMessageResponse* node); + virtual void PrintFields(GuiRpOptionalType* node); virtual void PrintFields(GuiRpPrimitiveType* node); virtual void PrintFields(GuiRpReferenceType* node); virtual void PrintFields(GuiRpSchema* node); @@ -1351,6 +1369,7 @@ namespace vl::presentation::remoteprotocol::json_visitor protected: void Visit(GuiRpPrimitiveType* node) override; void Visit(GuiRpReferenceType* node) override; + void Visit(GuiRpOptionalType* node) override; void Visit(GuiRpArrayType* node) override; void Visit(GuiRpEnumDecl* node) override; @@ -1401,12 +1420,13 @@ namespace vl::presentation::remoteprotocol MessageDecl = 7, MessageRequest = 8, MessageResponse = 9, - PrimitiveType = 10, - ReferenceType = 11, - Schema = 12, - StructDecl = 13, - StructMember = 14, - Type = 15, + OptionalType = 10, + PrimitiveType = 11, + ReferenceType = 12, + Schema = 13, + StructDecl = 14, + StructMember = 15, + Type = 16, }; enum class GuiRemoteProtocolFields : vl::vint32_t @@ -1424,12 +1444,13 @@ namespace vl::presentation::remoteprotocol MessageDecl_response = 10, MessageRequest_type = 11, MessageResponse_type = 12, - PrimitiveType_type = 13, - ReferenceType_name = 14, - Schema_declarations = 15, - StructDecl_members = 16, - StructMember_name = 17, - StructMember_type = 18, + OptionalType_element = 13, + PrimitiveType_type = 14, + ReferenceType_name = 15, + Schema_declarations = 16, + StructDecl_members = 17, + StructMember_name = 18, + StructMember_type = 19, }; extern const wchar_t* GuiRemoteProtocolTypeName(GuiRemoteProtocolClasses type); @@ -1480,22 +1501,24 @@ namespace vl::presentation::remoteprotocol STRING = 11, CHAR = 12, KEY = 13, - CPP_NAME = 14, - ATT_NAME = 15, - NAME = 16, - OPEN_BRACE = 17, - CLOSE_BRACE = 18, - OPEN_ARRAY = 19, - CLOSE_ARRAY = 20, - OPEN = 21, - CLOSE = 22, - COLON = 23, - SEMICOLON = 24, - COMMA = 25, - SPACE = 26, + COLOR = 14, + CPP_NAME = 15, + ATT_NAME = 16, + NAME = 17, + OPEN_BRACE = 18, + CLOSE_BRACE = 19, + OPEN_ARRAY = 20, + CLOSE_ARRAY = 21, + OPEN = 22, + CLOSE = 23, + COLON = 24, + SEMICOLON = 25, + COMMA = 26, + QUESTION = 27, + SPACE = 28, }; - constexpr vl::vint GuiRemoteProtocolTokenCount = 27; + constexpr vl::vint GuiRemoteProtocolTokenCount = 29; extern bool GuiRemoteProtocolTokenDeleter(vl::vint token); extern const wchar_t* GuiRemoteProtocolTokenId(GuiRemoteProtocolTokens token); extern const wchar_t* GuiRemoteProtocolTokenDisplayText(GuiRemoteProtocolTokens token); @@ -1522,20 +1545,20 @@ namespace vl::presentation::remoteprotocol enum class ParserStates { RType = 0, - RAttributeParameter = 13, - RAttribute = 16, - REnumMember = 24, - REnum = 28, - RStructMember = 35, - RStruct = 42, - RMessageRequest = 49, - RMessageResponse = 55, - RMessage = 61, - REventRequest = 69, - REvent = 75, - RDeclDetail = 82, - RDecl = 88, - Schema = 92, + RAttributeParameter = 16, + RAttribute = 19, + REnumMember = 27, + REnum = 31, + RStructMember = 38, + RStruct = 45, + RMessageRequest = 52, + RMessageResponse = 58, + RMessage = 64, + REventRequest = 72, + REvent = 78, + RDeclDetail = 85, + RDecl = 91, + Schema = 95, }; const wchar_t* ParserRuleName(vl::vint index); @@ -1584,6 +1607,7 @@ namespace vl::presentation struct GuiRpSymbols { collections::Dictionary cppMapping; + collections::Dictionary cppNamespaces; collections::SortedList dropRepeatDeclNames; collections::SortedList dropConsecutiveDeclNames; collections::Dictionary enumDecls; diff --git a/Import/GacUIReflection.cpp b/Import/GacUIReflection.cpp index 2990a8da..135d7f56 100644 --- a/Import/GacUIReflection.cpp +++ b/Import/GacUIReflection.cpp @@ -1316,6 +1316,7 @@ Type Declaration (Class) CLASS_MEMBER_PROPERTY_READONLY_FAST(RelatedControl) CLASS_MEMBER_PROPERTY_READONLY_FAST(RelatedControlHost) CLASS_MEMBER_PROPERTY_READONLY_FAST(RelatedCursor) + CLASS_MEMBER_PROPERTY_READONLY_FAST(RelatedHitTestResult) CLASS_MEMBER_PROPERTY_FAST(InternalMargin) CLASS_MEMBER_PROPERTY_FAST(PreferredMinSize) @@ -1327,7 +1328,7 @@ Type Declaration (Class) CLASS_MEMBER_METHOD(RemoveChild, {L"child"}) CLASS_MEMBER_METHOD(MoveChild, {L"child" _ L"newIndex"}) CLASS_MEMBER_METHOD(Render, {L"size"}) - CLASS_MEMBER_METHOD(FindComposition, {L"location" _ L"forMouseEvent"}) + CLASS_MEMBER_METHOD(FindVisibleComposition, {L"location" _ L"forMouseEvent"}) CLASS_MEMBER_GUIEVENT(CachedMinSizeChanged) CLASS_MEMBER_GUIEVENT(CachedBoundsChanged) diff --git a/Import/Vlpp.h b/Import/Vlpp.h index 631e7734..16ff00c8 100644 --- a/Import/Vlpp.h +++ b/Import/Vlpp.h @@ -190,6 +190,21 @@ Basic Types if(bool __scope_variable_flag__=true)\ for(TYPE VARIABLE = VALUE;__scope_variable_flag__;__scope_variable_flag__=false) + /// + /// Base type of all classes. + /// This type has a virtual destructor, making all derived classes destructors virtual. + /// In this way an object is allowed to be deleted using a pointer of a qualified base type pointing to this object. + /// + class Object + { + public: + virtual ~Object() = default; + }; + +/*********************************************************************** +Type Traits +***********************************************************************/ + template struct TypeTuple { @@ -219,28 +234,6 @@ Basic Types template struct RemoveCVRefArrayCtad { using Type = T*; }; - /// - /// Base type of all classes. - /// This type has a virtual destructor, making all derived classes destructors virtual. - /// In this way an object is allowed to be deleted using a pointer of a qualified base type pointing to this object. - /// - class Object - { - public: - virtual ~Object() = default; - }; - - template - union BinaryRetriver - { - T t; - char binary[sizeof(T) > minSize ? sizeof(T) : minSize]; - }; - -/*********************************************************************** -Type Traits -***********************************************************************/ - /// Type for specify and create a representative value for comparing another value of a specific type for containers. /// The element type for containers. template @@ -741,7 +734,7 @@ namespace vl { Reset(); } - else + else if (this != &nullable) { if constexpr (std::is_copy_assignable_v) { @@ -768,7 +761,7 @@ namespace vl { Reset(); } - else + else if (this != &nullable) { if constexpr (std::is_move_assignable_v) { @@ -5163,6 +5156,7 @@ vl::Func /// Type of the functor to copy. /// The functor to copy. It could be a lambda expression, or any types that has operator() members. template + requires(!std::is_same_v, Func>) Func(C&& function) requires ( std::is_invocable_v @@ -6044,6 +6038,525 @@ Range-Based For-Loop Iterator with Index #endif +/*********************************************************************** +.\PRIMITIVES\VARIANT.H +***********************************************************************/ +/*********************************************************************** +Author: Zihan Chen (vczh) +Licensed under https://github.com/vczh-libraries/License +***********************************************************************/ + +#ifndef VCZH_VARIANT +#define VCZH_VARIANT + + +#ifdef VCZH_CHECK_MEMORY_LEAKS_NEW +#undef new +#endif + +namespace vl +{ + template + struct VariantIndex + { + static constexpr vint value = I; + }; + + template + struct Overloading : TCallbacks ... + { + using TCallbacks::operator()...; + }; + + template + Overloading(TCallbacks&&...) -> Overloading...>; +} + +namespace vl::variant_internal +{ + template + consteval T MaxOf(T first, TArgs ...others) + { + T result = first; + T nexts[] = { others... }; + for (T next : nexts) + { + if (result < next) result = next; + } + return result; + } + template + consteval T MaxOf(T first) + { + return first; + } + + template + struct VariantElement + { + template + requires(std::is_same_v) + static consteval VariantIndex IndexOf() { return {}; } + + static consteval VariantIndex IndexOfCast(const T&) { return {}; } + static consteval VariantIndex IndexOfCast(T&&) { return {}; } + + template + static bool i_Apply(vint index, char* buffer, TCallback&& callback) + { + if (I != index) return false; + callback(*reinterpret_cast(buffer)); + return true; + } + + template + static bool i_Apply(vint index, const char* buffer, TCallback&& callback) + { + if (I != index) return false; + callback(*reinterpret_cast(buffer)); + return true; + } + + static bool i_CopyCtor(vint index, char* buffer, const char* source) + { + if constexpr (std::is_copy_constructible_v) + { + if (I != index) return false; + new (buffer)T(*reinterpret_cast(source)); + return true; + } + else + { + return false; + } + } + + static bool i_MoveCtor(vint index, char* buffer, char* source) + { + if constexpr (std::is_move_constructible_v) + { + if (I != index) return false; + new (buffer)T(std::move(*reinterpret_cast(source))); + return true; + } + else + { + return false; + } + } + + static bool i_Dtor(vint index, char* buffer) + { + if (I != index) return false; + reinterpret_cast(buffer)->~T(); + return true; + } + + static bool i_CopyAssign(vint index, char* buffer, const char* source) + { + if constexpr (std::is_copy_assignable_v) + { + if (I != index) return false; + *reinterpret_cast(buffer) = *reinterpret_cast(source); + return true; + } + else + { + return false; + } + } + + static bool i_MoveAssign(vint index, char* buffer, char* source) + { + if constexpr (std::is_move_constructible_v) + { + if (I != index) return false; + *reinterpret_cast(buffer) = std::move(*reinterpret_cast(source)); + return true; + } + else + { + return false; + } + } + + template + static void Ctor(VariantIndex, char* buffer, TArgs&& ...args) + { + new (buffer)T(std::forward(args)...); + } + + static void DefaultCtor(VariantIndex, char* buffer) + { + new (buffer)T(); + } + + static void CopyCtor(VariantIndex, char* buffer, const T& source) + { + new (buffer)T(source); + } + + static void MoveCtor(VariantIndex, char* buffer, T&& source) + { + new (buffer)T(std::move(source)); + } + + template + static void Assign(VariantIndex, char* buffer, TArg&& value) + { + *reinterpret_cast(buffer) = std::forward(value); + } + + static void CopyAssign(VariantIndex, char* buffer, const T& source) + { + *reinterpret_cast(buffer) = source; + } + + static void MoveAssign(VariantIndex, char* buffer, T&& source) + { + *reinterpret_cast(buffer) = std::move(source); + } + }; + + template + struct VariantElementPack; + + template + struct VariantElementPack, TElements...> : VariantElement... + { + using VariantElement::IndexOf...; + using VariantElement::IndexOfCast...; + using VariantElement::DefaultCtor...; + using VariantElement::Ctor...; + using VariantElement::CopyCtor...; + using VariantElement::MoveCtor...; + using VariantElement::Assign...; + using VariantElement::CopyAssign...; + using VariantElement::MoveAssign...; + + template + static void Apply(vint index, char* buffer, TCallback&& callback) + { + bool result = (VariantElement::i_Apply(index, buffer, std::forward(callback)) || ...); + CHECK_ERROR(result, L"vl::variant_internal::VariantElementPack<...>::Apply(...)#Internal error: none of elements are selected."); + } + + template + static void Apply(vint index, const char* buffer, TCallback&& callback) + { + bool result = (VariantElement::i_Apply(index, buffer, std::forward(callback)) || ...); + CHECK_ERROR(result, L"vl::variant_internal::VariantElementPack<...>::Apply(...)#Internal error: none of elements are selected."); + } + + static void CopyCtor(vint index, char* buffer, const char* source) + { + bool result = (VariantElement::i_CopyCtor(index, buffer, source) || ...); + CHECK_ERROR(result, L"vl::variant_internal::VariantElementPack<...>::CopyCtor(...)#Internal error: none of elements are selected."); + } + + static void MoveCtor(vint index, char* buffer, char* source) + { + bool result = (VariantElement::i_MoveCtor(index, buffer, source) || ...); + CHECK_ERROR(result, L"vl::variant_internal::VariantElementPack<...>::MoveCtor(...)#Internal error: none of elements are selected."); + } + + static void Dtor(vint index, char* buffer) + { + bool result = (VariantElement::i_Dtor(index, buffer) || ...); + CHECK_ERROR(result, L"vl::variant_internal::VariantElementPack<...>::Dtor(...)#Internal error: none of elements are selected."); + } + + static void CopyAssign(vint index, char* buffer, const char* source) + { + bool result = (VariantElement::i_CopyAssign(index, buffer, source) || ...); + CHECK_ERROR(result, L"vl::variant_internal::VariantElementPack<...>::CopyAssign(...)#Internal error: none of elements are selected."); + } + + static void MoveAssign(vint index, char* buffer, char* source) + { + bool result = (VariantElement::i_MoveAssign(index, buffer, source) || ...); + CHECK_ERROR(result, L"vl::variant_internal::VariantElementPack<...>::MoveAssign(...)#Internal error: none of elements are selected."); + } + }; +} + +namespace vl +{ + template + concept VariantElementType = requires() + { + std::is_same_v>; + }; + + template + class alignas(TElements...) Variant + { + public: + template + friend class Variant; + + using ElementPack = variant_internal::VariantElementPack, TElements...>; + + template + static constexpr vint IndexOf = decltype(ElementPack::template IndexOf())::value; + + template + static constexpr vint IndexOfCast = decltype(ElementPack::template IndexOfCast(std::declval()))::value; + + static constexpr std::size_t MaxSize = variant_internal::MaxOf(sizeof(TElements)...); + vint index = -1; + char buffer[MaxSize]; + + public: + Variant() + requires(std::is_default_constructible_v>>) + : index(0) + { + ElementPack::DefaultCtor(VariantIndex<0>{}, buffer); + } + + Variant(const Variant& variant) + : index(variant.index) + { + ElementPack::CopyCtor(index, buffer, variant.buffer); + } + + Variant(Variant&& variant) + : index(variant.index) + { + ElementPack::MoveCtor(index, buffer, variant.buffer); + } + + template + requires((std::is_same_v || ...)) + Variant(const T& element) + { + constexpr auto i = IndexOf; + index = i; + ElementPack::CopyCtor(VariantIndex{}, buffer, element); + } + + template + requires((std::is_same_v || ...)) + Variant(T&& element) + { + constexpr auto i = IndexOf; + index = i; + ElementPack::MoveCtor(VariantIndex{}, buffer, std::move(element)); + } + + template + Variant(VariantIndex i, TArgs&& ...args) + : index(I) + { + ElementPack::Ctor(i, buffer, std::forward(args)...); + } + + template + requires( + !std::is_same_v, Variant> && + ((!std::is_same_v, TElements>) && ...) + ) + Variant(T&& value) + { + constexpr auto i = IndexOfCast; + index = i; + ElementPack::Ctor(VariantIndex{}, buffer, std::forward(value)); + } + + ~Variant() + { + ElementPack::Dtor(index, buffer); + } + + Variant& operator=(const Variant& variant) + { + if (this != &variant) + { + if (index == variant.index) + { + ElementPack::CopyAssign(index, buffer, variant.buffer); + } + else + { + ElementPack::Dtor(index, buffer); + index = variant.index; + ElementPack::CopyCtor(index, buffer, variant.buffer); + } + } + return *this; + } + + Variant& operator=(Variant&& variant) + { + if (this != &variant) + { + if (index == variant.index) + { + ElementPack::MoveAssign(index, buffer, variant.buffer); + } + else + { + ElementPack::Dtor(index, buffer); + index = variant.index; + ElementPack::MoveCtor(index, buffer, variant.buffer); + } + } + return *this; + } + + template + requires((std::is_same_v || ...)) + Variant& operator=(const T& element) + { + constexpr auto i = IndexOf; + if (index == i) + { + ElementPack::CopyAssign(VariantIndex{}, buffer, element); + } + else + { + ElementPack::Dtor(index, buffer); + index = i; + ElementPack::CopyCtor(VariantIndex{}, buffer, element); + } + return *this; + } + + template + requires((std::is_same_v || ...)) + Variant& operator=(T&& element) + { + constexpr auto i = IndexOf; + if (index == i) + { + ElementPack::MoveAssign(VariantIndex{}, buffer, std::move(element)); + } + else + { + ElementPack::Dtor(index, buffer); + index = i; + ElementPack::MoveCtor(VariantIndex{}, buffer, std::move(element)); + } + return *this; + } + + template + Variant& Set(VariantIndex i, T&& value) + { + if (index == I) + { + ElementPack::Assign(i, buffer, std::forward(value)); + } + else + { + ElementPack::Dtor(index, buffer); + index = I; + ElementPack::Ctor(i, buffer, std::forward(value)); + } + return *this; + } + + template + requires( + !std::is_same_v, Variant> && + ((!std::is_same_v, TElements>) && ...) + ) + Variant& operator=(T&& value) + { + constexpr auto i = IndexOfCast; + return Set(VariantIndex{}, std::forward(value)); + } + + vint Index() const + { + return index; + } + + template + requires((std::is_same_v || ...)) + T& Get()& + { + auto result = TryGet(); + CHECK_ERROR(result != nullptr, L"vl::Variant::Get()#Content does not match the type."); + return *result; + } + + template + requires((std::is_same_v || ...)) + T&& Get()&& + { + auto result = TryGet(); + CHECK_ERROR(result != nullptr, L"vl::Variant::Get()#Content does not match the type."); + return std::move(*result); + } + + template + requires((std::is_same_v || ...)) + const T& Get() const& + { + auto result = TryGet(); + CHECK_ERROR(result != nullptr, L"vl::Variant::Get()#Content does not match the type."); + return *result; + } + + template + requires((std::is_same_v || ...)) + T* TryGet() + { + return const_cast(static_cast*>(this)->TryGet()); + } + + template + requires((std::is_same_v || ...)) + const T* TryGet() const + { + constexpr auto i = IndexOf; + return index == i ? reinterpret_cast(buffer) : nullptr; + } + + template + void Apply(TCallback&& callback) + { + ElementPack::Apply(index, buffer, std::forward(callback)); + } + + template + void Apply(TCallback&& callback) const + { + ElementPack::Apply(index, buffer, std::forward(callback)); + } + + template + bool TryApply(TCallback&& callback) + { + bool result = true; + Apply(Overloading( + std::forward(callback), + [&result](...) { result = false; } + )); + return result; + } + + template + bool TryApply(TCallback&& callback) const + { + bool result = true; + Apply(Overloading( + std::forward(callback), + [&result](...) { result = false; } + )); + return result; + } + }; +} + +#ifdef VCZH_CHECK_MEMORY_LEAKS_NEW +#define new VCZH_CHECK_MEMORY_LEAKS_NEW +#endif + +#endif + /*********************************************************************** .\STRINGS\STRING.H ***********************************************************************/ diff --git a/Tools/Reflection32.bin b/Tools/Reflection32.bin index d071f5f8..dbc90493 100644 Binary files a/Tools/Reflection32.bin and b/Tools/Reflection32.bin differ diff --git a/Tools/Reflection64.bin b/Tools/Reflection64.bin index cc489c0c..12396da8 100644 Binary files a/Tools/Reflection64.bin and b/Tools/Reflection64.bin differ diff --git a/Tutorial/GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/Source/DemoPartialClasses.cpp index f677f0d7..fa34bf94 100644 --- a/Tutorial/GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/Source/DemoPartialClasses.cpp @@ -21053,7 +21053,7 @@ Class (::demo::ElementTabPageConstructor) } (this->__vwsn_precompile_6 = ::vl::Ptr<::vl::presentation::elements::GuiSolidBorderElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiSolidBorderElement>())); { - ::vl::__vwsn::This(this->__vwsn_precompile_6.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint32_t>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_6.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_6.Obj())->SetColor(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString::Unmanaged(L"#FFFF00"))); @@ -21101,7 +21101,7 @@ Class (::demo::ElementTabPageConstructor) } (this->__vwsn_precompile_12 = ::vl::Ptr<::vl::presentation::elements::GuiSolidBackgroundElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiSolidBackgroundElement>())); { - ::vl::__vwsn::This(this->__vwsn_precompile_12.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint32_t>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_12.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_12.Obj())->SetColor(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString::Unmanaged(L"#FFFF00"))); @@ -21296,7 +21296,7 @@ Class (::demo::ElementTabPageConstructor) ::vl::__vwsn::This(this->__vwsn_precompile_30.Obj())->SetColor1(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString::Unmanaged(L"#FFFF00"))); } { - ::vl::__vwsn::This(this->__vwsn_precompile_30.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint32_t>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_30.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_30.Obj())->SetDirection(::vl::presentation::elements::GuiGradientBackgroundElement::Direction::Horizontal); @@ -21319,7 +21319,7 @@ Class (::demo::ElementTabPageConstructor) ::vl::__vwsn::This(this->__vwsn_precompile_32.Obj())->SetColor1(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString::Unmanaged(L"#FFFF00"))); } { - ::vl::__vwsn::This(this->__vwsn_precompile_32.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint32_t>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_32.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_32.Obj())->SetDirection(::vl::presentation::elements::GuiGradientBackgroundElement::Direction::Vertical); @@ -21342,7 +21342,7 @@ Class (::demo::ElementTabPageConstructor) ::vl::__vwsn::This(this->__vwsn_precompile_34.Obj())->SetColor1(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString::Unmanaged(L"#FFFF00"))); } { - ::vl::__vwsn::This(this->__vwsn_precompile_34.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint32_t>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_34.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_34.Obj())->SetDirection(::vl::presentation::elements::GuiGradientBackgroundElement::Direction::Slash); @@ -21365,7 +21365,7 @@ Class (::demo::ElementTabPageConstructor) ::vl::__vwsn::This(this->__vwsn_precompile_36.Obj())->SetColor1(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString::Unmanaged(L"#FFFF00"))); } { - ::vl::__vwsn::This(this->__vwsn_precompile_36.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint32_t>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint32_t>(5); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_36.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::RoundRect; __vwsn_temp__.radiusX = static_cast<::vl::vint>(10); __vwsn_temp__.radiusY = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_36.Obj())->SetDirection(::vl::presentation::elements::GuiGradientBackgroundElement::Direction::Backslash); diff --git a/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x64 b/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x64 index 4f22d111..fd2859d2 100644 Binary files a/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x64 and b/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x64 differ diff --git a/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x86 b/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x86 index 2f2e9353..757e6b40 100644 Binary files a/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x86 and b/Tutorial/GacUI_HelloWorlds/UIRes/Xml.bin.x86 differ