mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-14 04:31:07 +08:00
Update to VS 2017
This commit is contained in:
+1969
-1778
File diff suppressed because it is too large
Load Diff
+205
-122
File diff suppressed because it is too large
Load Diff
+22
-27
@@ -401,8 +401,8 @@ Type Declaration
|
||||
BEGIN_INTERFACE_MEMBER_NOPROXY(INativeAsyncService)
|
||||
CLASS_MEMBER_METHOD(IsInMainThread, {L"type"})
|
||||
CLASS_MEMBER_METHOD(InvokeAsync, {L"proc"})
|
||||
CLASS_MEMBER_METHOD(InvokeInMainThread, {L"proc"})
|
||||
CLASS_MEMBER_METHOD(InvokeInMainThreadAndWait, {L"proc" _ L"milliseconds"})
|
||||
CLASS_MEMBER_METHOD(InvokeInMainThread, {L"window" _ L"proc"})
|
||||
CLASS_MEMBER_METHOD(InvokeInMainThreadAndWait, {L"window" _ L"proc" _ L"milliseconds"})
|
||||
CLASS_MEMBER_METHOD(DelayExecute, {L"proc" _ L"milliseconds"})
|
||||
CLASS_MEMBER_METHOD(DelayExecuteInMainThread, {L"proc" _ L"milliseconds"})
|
||||
END_INTERFACE_MEMBER(INativeAsyncService)
|
||||
@@ -947,6 +947,7 @@ Type Declaration
|
||||
CLASS_MEMBER_BASE(GuiGraphicsSite)
|
||||
CLASS_MEMBER_CONSTRUCTOR(GuiBoundsComposition*(), NO_PARAMETER)
|
||||
|
||||
CLASS_MEMBER_PROPERTY_FAST(SizeAffectParent)
|
||||
CLASS_MEMBER_PROPERTY_EVENT_FAST(Bounds, BoundsChanged)
|
||||
CLASS_MEMBER_PROPERTY_FAST(AlignmentToParent)
|
||||
|
||||
@@ -1156,20 +1157,6 @@ Type Declaration
|
||||
CLASS_MEMBER_CONSTRUCTOR(GuiRepeatFlowComposition*(), NO_PARAMETER)
|
||||
END_CLASS_MEMBER(GuiRepeatFlowComposition)
|
||||
|
||||
BEGIN_INTERFACE_MEMBER(IGuiGraphicsAnimation)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(TotalLength)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(CurrentPosition)
|
||||
|
||||
CLASS_MEMBER_METHOD(Play, {L"currentPosition" _ L"totalLength"})
|
||||
CLASS_MEMBER_METHOD(Stop, NO_PARAMETER)
|
||||
END_INTERFACE_MEMBER(IGuiGraphicsAnimation)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiGraphicsAnimationManager)
|
||||
CLASS_MEMBER_METHOD(AddAnimation, {L"animation"})
|
||||
CLASS_MEMBER_METHOD(HasAnimation, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(Play, NO_PARAMETER)
|
||||
END_CLASS_MEMBER(GuiGraphicsAnimationManager)
|
||||
|
||||
BEGIN_INTERFACE_MEMBER_NOPROXY(IGuiShortcutKeyItem)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(Manager)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(Name)
|
||||
@@ -1322,10 +1309,11 @@ Type Declaration
|
||||
CLASS_MEMBER_METHOD(CloseTooltip, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(IsInMainThread, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(InvokeAsync, {L"proc"})
|
||||
CLASS_MEMBER_METHOD(InvokeInMainThread, {L"proc"})
|
||||
CLASS_MEMBER_METHOD(InvokeInMainThreadAndWait, {L"proc" _ L"milliseconds"})
|
||||
CLASS_MEMBER_METHOD(InvokeInMainThread, {L"controlHost" _ L"proc"})
|
||||
CLASS_MEMBER_METHOD(InvokeInMainThreadAndWait, {L"controlHost" _ L"proc" _ L"milliseconds"})
|
||||
CLASS_MEMBER_METHOD(DelayExecute, {L"proc" _ L"milliseconds"})
|
||||
CLASS_MEMBER_METHOD(DelayExecuteInMainThread, {L"proc" _ L"milliseconds"})
|
||||
CLASS_MEMBER_METHOD(RunGuiTask, { L"controlHost" _ L"proc" })
|
||||
END_CLASS_MEMBER(GuiApplication)
|
||||
|
||||
BEGIN_ENUM_ITEM(ThemeName)
|
||||
@@ -1568,7 +1556,6 @@ Type Declaration
|
||||
CLASS_MEMBER_PROPERTY_FAST(ClientSize)
|
||||
CLASS_MEMBER_PROPERTY_FAST(Bounds)
|
||||
CLASS_MEMBER_PROPERTY_FAST(ShortcutKeyManager)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(AnimationManager)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(RelatedScreen)
|
||||
|
||||
CLASS_MEMBER_METHOD(ForceCalculateSizeImmediately, NO_PARAMETER)
|
||||
@@ -2679,16 +2666,13 @@ Type Declaration
|
||||
CLASS_MEMBER_PROPERTY_FAST(Shape)
|
||||
END_CLASS_MEMBER(GuiGradientBackgroundElement)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiRadialGradientBackgroundElement)
|
||||
BEGIN_CLASS_MEMBER(GuiInnerShadowElement)
|
||||
CLASS_MEMBER_BASE(IGuiGraphicsElement)
|
||||
CLASS_MEMBER_EXTERNALCTOR(Ptr<GuiRadialGradientBackgroundElement>(), NO_PARAMETER, vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiRadialGradientBackgroundElement>)
|
||||
|
||||
CLASS_MEMBER_METHOD(SetColors, {L"value1" _ L"value2"})
|
||||
CLASS_MEMBER_EXTERNALCTOR(Ptr<GuiInnerShadowElement>(), NO_PARAMETER, vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiInnerShadowElement>)
|
||||
|
||||
CLASS_MEMBER_PROPERTY_FAST(Color1)
|
||||
CLASS_MEMBER_PROPERTY_FAST(Color2)
|
||||
CLASS_MEMBER_PROPERTY_FAST(Shape)
|
||||
END_CLASS_MEMBER(GuiRadialGradientBackgroundElement)
|
||||
CLASS_MEMBER_PROPERTY_FAST(Color)
|
||||
CLASS_MEMBER_PROPERTY_FAST(Thickness)
|
||||
END_CLASS_MEMBER(GuiInnerShadowElement)
|
||||
|
||||
BEGIN_ENUM_ITEM(GuiGradientBackgroundElement::Direction)
|
||||
ENUM_ITEM_NAMESPACE(GuiGradientBackgroundElement)
|
||||
@@ -3150,6 +3134,16 @@ Type Declaration
|
||||
BEGIN_CLASS_MEMBER(GuiComponent)
|
||||
END_CLASS_MEMBER(GuiComponent)
|
||||
|
||||
BEGIN_INTERFACE_MEMBER(IGuiAnimation)
|
||||
CLASS_MEMBER_BASE(IDescriptable)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(Stopped)
|
||||
|
||||
CLASS_MEMBER_METHOD(Start, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(Pause, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(Resume, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(Run, NO_PARAMETER)
|
||||
END_INTERFACE_MEMBER(IGuiAnimation)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiInstanceRootObject)
|
||||
CLASS_MEMBER_METHOD_OVERLOAD(FinalizeInstanceRecursively, {L"thisObject"}, void(GuiInstanceRootObject::*)(GuiTemplate*))
|
||||
CLASS_MEMBER_METHOD_OVERLOAD(FinalizeInstanceRecursively, {L"thisObject"}, void(GuiInstanceRootObject::*)(GuiCustomControl*))
|
||||
@@ -3162,6 +3156,7 @@ Type Declaration
|
||||
CLASS_MEMBER_METHOD(UpdateSubscriptions, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(AddComponent, {L"component"})
|
||||
CLASS_MEMBER_METHOD(AddControlHostComponent, {L"controlHost"})
|
||||
CLASS_MEMBER_METHOD(AddAnimation, { L"animation" })
|
||||
END_CLASS_MEMBER(GuiInstanceRootObject)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiTemplate)
|
||||
|
||||
+17
-13
@@ -180,7 +180,7 @@ Type List (Elements)
|
||||
F(presentation::elements::GuiSolidBackgroundElement)\
|
||||
F(presentation::elements::GuiGradientBackgroundElement)\
|
||||
F(presentation::elements::GuiGradientBackgroundElement::Direction)\
|
||||
F(presentation::elements::GuiRadialGradientBackgroundElement)\
|
||||
F(presentation::elements::GuiInnerShadowElement)\
|
||||
F(presentation::elements::GuiSolidLabelElement)\
|
||||
F(presentation::elements::GuiImageFrameElement)\
|
||||
F(presentation::elements::GuiPolygonElement)\
|
||||
@@ -227,8 +227,6 @@ Type List (Compositions)
|
||||
F(presentation::compositions::GuiRepeatCompositionBase)\
|
||||
F(presentation::compositions::GuiRepeatStackComposition)\
|
||||
F(presentation::compositions::GuiRepeatFlowComposition)\
|
||||
F(presentation::compositions::IGuiGraphicsAnimation)\
|
||||
F(presentation::compositions::GuiGraphicsAnimationManager)\
|
||||
F(presentation::compositions::IGuiShortcutKeyItem)\
|
||||
F(presentation::compositions::IGuiShortcutKeyManager)\
|
||||
F(presentation::compositions::GuiShortcutKeyManager)\
|
||||
@@ -265,6 +263,7 @@ Type List (Templates)
|
||||
F(presentation::controls::ITabCommandExecutor)\
|
||||
F(presentation::controls::IDatePickerCommandExecutor)\
|
||||
F(presentation::controls::GuiComponent)\
|
||||
F(presentation::controls::IGuiAnimation)\
|
||||
F(presentation::controls::GuiInstanceRootObject)\
|
||||
F(presentation::templates::GuiTemplate)\
|
||||
F(presentation::templates::GuiListItemTemplate)\
|
||||
@@ -615,27 +614,32 @@ Macros
|
||||
Interface Proxy (Compositions)
|
||||
***********************************************************************/
|
||||
|
||||
BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(presentation::compositions::IGuiGraphicsAnimation)
|
||||
vint GetTotalLength()override
|
||||
BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(presentation::controls::IGuiAnimation)
|
||||
void Start()override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY_NOPARAMS(GetTotalLength);
|
||||
INVOKE_INTERFACE_PROXY_NOPARAMS(Start);
|
||||
}
|
||||
|
||||
vint GetCurrentPosition()override
|
||||
void Pause()override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY_NOPARAMS(GetCurrentPosition);
|
||||
INVOKE_INTERFACE_PROXY_NOPARAMS(Pause);
|
||||
}
|
||||
|
||||
void Play(vint currentPosition, vint totalLength)override
|
||||
void Resume()override
|
||||
{
|
||||
INVOKE_INTERFACE_PROXY(Play, currentPosition, totalLength);
|
||||
INVOKE_INTERFACE_PROXY_NOPARAMS(Resume);
|
||||
}
|
||||
|
||||
void Stop()override
|
||||
void Run()override
|
||||
{
|
||||
INVOKE_INTERFACE_PROXY_NOPARAMS(Stop);
|
||||
INVOKE_INTERFACE_PROXY_NOPARAMS(Run);
|
||||
}
|
||||
END_INTERFACE_PROXY(presentation::compositions::IGuiGraphicsAnimation)
|
||||
|
||||
bool GetStopped()override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY_NOPARAMS(GetStopped);
|
||||
}
|
||||
END_INTERFACE_PROXY(presentation::controls::IGuiAnimation)
|
||||
|
||||
BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(presentation::compositions::IGuiAxis)
|
||||
presentation::Size RealSizeToVirtualSize(presentation::Size size)override
|
||||
|
||||
+131
-197
@@ -1246,7 +1246,6 @@ IMPLEMENT_BRUSH_ELEMENT_RENDERER
|
||||
CreateBrush(newRenderTarget);\
|
||||
}\
|
||||
TRENDERER::TRENDERER()\
|
||||
:brush(0)\
|
||||
{\
|
||||
}\
|
||||
void TRENDERER::Render(Rect bounds)\
|
||||
@@ -1311,36 +1310,6 @@ IMPLEMENT_BRUSH_ELEMENT_RENDERER
|
||||
}\
|
||||
}\
|
||||
|
||||
#define IMPLEMENT_BRUSH_ELEMENT_RENDERER_RADIAL_GRADIENT_BRUSH(TRENDERER)\
|
||||
void TRENDERER::CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget)\
|
||||
{\
|
||||
if(_renderTarget)\
|
||||
{\
|
||||
oldColor=Pair<Color, Color>(element->GetColor1(), element->GetColor2());\
|
||||
brush=_renderTarget->CreateDirect2DRadialBrush(oldColor.key, oldColor.value);\
|
||||
}\
|
||||
}\
|
||||
void TRENDERER::DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget)\
|
||||
{\
|
||||
if(_renderTarget && brush)\
|
||||
{\
|
||||
_renderTarget->DestroyDirect2DRadialBrush(oldColor.key, oldColor.value);\
|
||||
brush=0;\
|
||||
}\
|
||||
}\
|
||||
void TRENDERER::OnElementStateChanged()\
|
||||
{\
|
||||
if(renderTarget)\
|
||||
{\
|
||||
Pair<Color, Color> color=Pair<Color, Color>(element->GetColor1(), element->GetColor2());\
|
||||
if(oldColor!=color)\
|
||||
{\
|
||||
DestroyBrush(renderTarget);\
|
||||
CreateBrush(renderTarget);\
|
||||
}\
|
||||
}\
|
||||
}\
|
||||
|
||||
/***********************************************************************
|
||||
GuiSolidBorderElementRenderer
|
||||
***********************************************************************/
|
||||
@@ -1400,12 +1369,12 @@ Gui3DBorderElementRenderer
|
||||
if(brush1)
|
||||
{
|
||||
_renderTarget->DestroyDirect2DBrush(oldColor1);
|
||||
brush1=0;
|
||||
brush1 = nullptr;
|
||||
}
|
||||
if(brush2)
|
||||
{
|
||||
_renderTarget->DestroyDirect2DBrush(oldColor2);
|
||||
brush2=0;
|
||||
brush2 = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1426,8 +1395,6 @@ Gui3DBorderElementRenderer
|
||||
}
|
||||
|
||||
Gui3DBorderElementRenderer::Gui3DBorderElementRenderer()
|
||||
:brush1(0)
|
||||
,brush2(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1478,12 +1445,12 @@ Gui3DSplitterElementRenderer
|
||||
if(brush1)
|
||||
{
|
||||
_renderTarget->DestroyDirect2DBrush(oldColor1);
|
||||
brush1=0;
|
||||
brush1 = nullptr;
|
||||
}
|
||||
if(brush2)
|
||||
{
|
||||
_renderTarget->DestroyDirect2DBrush(oldColor2);
|
||||
brush2=0;
|
||||
brush2 = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1504,8 +1471,6 @@ Gui3DSplitterElementRenderer
|
||||
}
|
||||
|
||||
Gui3DSplitterElementRenderer::Gui3DSplitterElementRenderer()
|
||||
:brush1(0)
|
||||
,brush2(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1668,46 +1633,130 @@ GuiGradientBackgroundElementRenderer
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
GuiRadialGradientBackgroundElementRenderer
|
||||
GuiInnerShadowElementRenderer
|
||||
***********************************************************************/
|
||||
|
||||
IMPLEMENT_BRUSH_ELEMENT_RENDERER_RADIAL_GRADIENT_BRUSH(GuiRadialGradientBackgroundElementRenderer)
|
||||
IMPLEMENT_BRUSH_ELEMENT_RENDERER(GuiRadialGradientBackgroundElementRenderer)
|
||||
void GuiInnerShadowElementRenderer::CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget)
|
||||
{
|
||||
D2D1_POINT_2F center;
|
||||
center.x = ((FLOAT)bounds.x1 + (FLOAT)bounds.x2) / 2;
|
||||
center.y = ((FLOAT)bounds.y1 + (FLOAT)bounds.y2) / 2;
|
||||
brush->SetCenter(center);
|
||||
brush->SetRadiusX((FLOAT)bounds.Width() / 2);
|
||||
brush->SetRadiusY((FLOAT)bounds.Height() / 2);
|
||||
|
||||
ID2D1RenderTarget* d2dRenderTarget=renderTarget->GetDirect2DRenderTarget();
|
||||
auto shape = element->GetShape();
|
||||
|
||||
switch(shape.shapeType)
|
||||
if (_renderTarget)
|
||||
{
|
||||
case ElementShapeType::Rectangle:
|
||||
d2dRenderTarget->FillRectangle(
|
||||
D2D1::RectF((FLOAT)bounds.x1, (FLOAT)bounds.y1, (FLOAT)bounds.x2, (FLOAT)bounds.y2),
|
||||
brush
|
||||
);
|
||||
break;
|
||||
case ElementShapeType::Ellipse:
|
||||
d2dRenderTarget->FillEllipse(
|
||||
D2D1::Ellipse(D2D1::Point2F((bounds.x1+bounds.x2)/2.0f, (bounds.y1+bounds.y2)/2.0f), bounds.Width()/2.0f, bounds.Height()/2.0f),
|
||||
brush
|
||||
);
|
||||
break;
|
||||
case ElementShapeType::RoundRect:
|
||||
d2dRenderTarget->FillRoundedRectangle(
|
||||
D2D1::RoundedRect(
|
||||
D2D1::RectF((FLOAT)bounds.x1 + 0.5f, (FLOAT)bounds.y1 + 0.5f, (FLOAT)bounds.x2 - 0.5f, (FLOAT)bounds.y2 - 0.5f),
|
||||
(FLOAT)shape.radiusX,
|
||||
(FLOAT)shape.radiusY
|
||||
),
|
||||
brush
|
||||
);
|
||||
break;
|
||||
oldColor = element->GetColor();
|
||||
transparentColor = Color(oldColor.r, oldColor.g, oldColor.b, 0);
|
||||
linearBrush = _renderTarget->CreateDirect2DLinearBrush(transparentColor, oldColor);
|
||||
radialBrush = _renderTarget->CreateDirect2DRadialBrush(transparentColor, oldColor);
|
||||
}
|
||||
}
|
||||
|
||||
void GuiInnerShadowElementRenderer::DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget)
|
||||
{
|
||||
if (_renderTarget)
|
||||
{
|
||||
_renderTarget->DestroyDirect2DLinearBrush(transparentColor, oldColor);
|
||||
_renderTarget->DestroyDirect2DRadialBrush(transparentColor, oldColor);
|
||||
|
||||
linearBrush = nullptr;
|
||||
radialBrush = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void GuiInnerShadowElementRenderer::InitializeInternal()
|
||||
{
|
||||
}
|
||||
|
||||
void GuiInnerShadowElementRenderer::FinalizeInternal()
|
||||
{
|
||||
DestroyBrush(renderTarget);
|
||||
}
|
||||
|
||||
void GuiInnerShadowElementRenderer::RenderTargetChangedInternal(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget)
|
||||
{
|
||||
DestroyBrush(oldRenderTarget);
|
||||
CreateBrush(newRenderTarget);
|
||||
}
|
||||
|
||||
GuiInnerShadowElementRenderer::GuiInnerShadowElementRenderer()
|
||||
{
|
||||
}
|
||||
|
||||
void GuiInnerShadowElementRenderer::Render(Rect bounds)
|
||||
{
|
||||
vint w = bounds.Width();
|
||||
vint h = bounds.Height();
|
||||
vint t = element->GetThickness();
|
||||
vint bW = w - 2 * t;
|
||||
vint bH = h - 2 * t;
|
||||
if (bW > 0 && bH > 0)
|
||||
{
|
||||
vint x1 = bounds.Left();
|
||||
vint x4 = bounds.Right();
|
||||
vint x2 = x1 + t;
|
||||
vint x3 = x4 - t;
|
||||
|
||||
vint y1 = bounds.Top();
|
||||
vint y4 = bounds.Bottom();
|
||||
vint y2 = y1 + t;
|
||||
vint y3 = y4 - t;
|
||||
|
||||
auto d2dRenderTarget = renderTarget->GetDirect2DRenderTarget();
|
||||
{
|
||||
// top
|
||||
linearBrush->SetStartPoint(D2D1::Point2F((FLOAT)x2, (FLOAT)y2));
|
||||
linearBrush->SetEndPoint(D2D1::Point2F((FLOAT)x2, (FLOAT)y1));
|
||||
d2dRenderTarget->FillRectangle(D2D1::RectF((FLOAT)x2, (FLOAT)y1, (FLOAT)x3, (FLOAT)y2), linearBrush);
|
||||
}
|
||||
{
|
||||
// bottom
|
||||
linearBrush->SetStartPoint(D2D1::Point2F((FLOAT)x2, (FLOAT)y3));
|
||||
linearBrush->SetEndPoint(D2D1::Point2F((FLOAT)x2, (FLOAT)y4));
|
||||
d2dRenderTarget->FillRectangle(D2D1::RectF((FLOAT)x2, (FLOAT)y3, (FLOAT)x3, (FLOAT)y4), linearBrush);
|
||||
}
|
||||
{
|
||||
// left
|
||||
linearBrush->SetStartPoint(D2D1::Point2F((FLOAT)x2, (FLOAT)y2));
|
||||
linearBrush->SetEndPoint(D2D1::Point2F((FLOAT)x1, (FLOAT)y2));
|
||||
d2dRenderTarget->FillRectangle(D2D1::RectF((FLOAT)x1, (FLOAT)y2, (FLOAT)x2, (FLOAT)y3), linearBrush);
|
||||
}
|
||||
{
|
||||
// right
|
||||
linearBrush->SetStartPoint(D2D1::Point2F((FLOAT)x3, (FLOAT)y2));
|
||||
linearBrush->SetEndPoint(D2D1::Point2F((FLOAT)x4, (FLOAT)y2));
|
||||
d2dRenderTarget->FillRectangle(D2D1::RectF((FLOAT)x3, (FLOAT)y2, (FLOAT)x4, (FLOAT)y3), linearBrush);
|
||||
}
|
||||
|
||||
radialBrush->SetRadiusX((FLOAT)t);
|
||||
radialBrush->SetRadiusY((FLOAT)t);
|
||||
{
|
||||
// left-top
|
||||
radialBrush->SetCenter(D2D1::Point2F((FLOAT)x2, (FLOAT)y2));
|
||||
d2dRenderTarget->FillRectangle(D2D1::RectF((FLOAT)x1, (FLOAT)y1, (FLOAT)x2, (FLOAT)y2), radialBrush);
|
||||
}
|
||||
{
|
||||
// left-bottom
|
||||
radialBrush->SetCenter(D2D1::Point2F((FLOAT)x3, (FLOAT)y2));
|
||||
d2dRenderTarget->FillRectangle(D2D1::RectF((FLOAT)x3, (FLOAT)y1, (FLOAT)x4, (FLOAT)y2), radialBrush);
|
||||
}
|
||||
{
|
||||
// right-top
|
||||
radialBrush->SetCenter(D2D1::Point2F((FLOAT)x2, (FLOAT)y3));
|
||||
d2dRenderTarget->FillRectangle(D2D1::RectF((FLOAT)x1, (FLOAT)y3, (FLOAT)x2, (FLOAT)y4), radialBrush);
|
||||
}
|
||||
{
|
||||
// right-bottom
|
||||
radialBrush->SetCenter(D2D1::Point2F((FLOAT)x3, (FLOAT)y3));
|
||||
d2dRenderTarget->FillRectangle(D2D1::RectF((FLOAT)x3, (FLOAT)y3, (FLOAT)x4, (FLOAT)y4), radialBrush);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GuiInnerShadowElementRenderer::OnElementStateChanged()
|
||||
{
|
||||
if (renderTarget)
|
||||
{
|
||||
if (oldColor != element->GetColor())
|
||||
{
|
||||
DestroyBrush(renderTarget);
|
||||
CreateBrush(renderTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1729,7 +1778,7 @@ GuiSolidLabelElementRenderer
|
||||
if(_renderTarget && brush)
|
||||
{
|
||||
_renderTarget->DestroyDirect2DBrush(oldColor);
|
||||
brush=0;
|
||||
brush = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1749,7 +1798,7 @@ GuiSolidLabelElementRenderer
|
||||
{
|
||||
IWindowsDirect2DResourceManager* resourceManager=GetWindowsDirect2DResourceManager();
|
||||
resourceManager->DestroyDirect2DTextFormat(oldFont);
|
||||
textFormat=0;
|
||||
textFormat = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1793,7 +1842,7 @@ GuiSolidLabelElementRenderer
|
||||
if(textLayout)
|
||||
{
|
||||
textLayout->Release();
|
||||
textLayout=0;
|
||||
textLayout = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1873,11 +1922,6 @@ GuiSolidLabelElementRenderer
|
||||
}
|
||||
|
||||
GuiSolidLabelElementRenderer::GuiSolidLabelElementRenderer()
|
||||
:brush(0)
|
||||
,textFormat(0)
|
||||
,textLayout(0)
|
||||
,oldText(L"")
|
||||
,oldMaxWidth(-1)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2184,7 +2228,7 @@ GuiPolygonElementRenderer
|
||||
{
|
||||
if(geometry)
|
||||
{
|
||||
geometry=0;
|
||||
geometry = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2270,9 +2314,6 @@ GuiPolygonElementRenderer
|
||||
}
|
||||
|
||||
GuiPolygonElementRenderer::GuiPolygonElementRenderer()
|
||||
:borderBrush(0)
|
||||
,backgroundBrush(0)
|
||||
,geometry(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -4362,7 +4403,7 @@ void RendererMainDirect2D()
|
||||
elements_windows_d2d::Gui3DSplitterElementRenderer::Register();
|
||||
elements_windows_d2d::GuiSolidBackgroundElementRenderer::Register();
|
||||
elements_windows_d2d::GuiGradientBackgroundElementRenderer::Register();
|
||||
elements_windows_d2d::GuiRadialGradientBackgroundElementRenderer::Register();
|
||||
elements_windows_d2d::GuiInnerShadowElementRenderer::Register();
|
||||
elements_windows_d2d::GuiSolidLabelElementRenderer::Register();
|
||||
elements_windows_d2d::GuiImageFrameElementRenderer::Register();
|
||||
elements_windows_d2d::GuiPolygonElementRenderer::Register();
|
||||
@@ -9559,112 +9600,6 @@ GuiGradientBackgroundElementRenderer
|
||||
{
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
GuiRadialGradientBackgroundElementRenderer
|
||||
***********************************************************************/
|
||||
|
||||
void GuiRadialGradientBackgroundElementRenderer::InitializeInternal()
|
||||
{
|
||||
IWindowsGDIResourceManager* resourceManager = GetWindowsGDIResourceManager();
|
||||
oldColor = element->GetColor2();
|
||||
pen = resourceManager->CreateGdiPen(oldColor);
|
||||
brush = resourceManager->CreateGdiBrush(oldColor);
|
||||
}
|
||||
|
||||
void GuiRadialGradientBackgroundElementRenderer::FinalizeInternal()
|
||||
{
|
||||
IWindowsGDIResourceManager* resourceManager = GetWindowsGDIResourceManager();
|
||||
resourceManager->DestroyGdiPen(oldColor);
|
||||
resourceManager->DestroyGdiBrush(oldColor);
|
||||
}
|
||||
|
||||
void GuiRadialGradientBackgroundElementRenderer::RenderTargetChangedInternal(IWindowsGDIRenderTarget* oldRenderTarget, IWindowsGDIRenderTarget* newRenderTarget)
|
||||
{
|
||||
}
|
||||
|
||||
void GuiRadialGradientBackgroundElementRenderer::Render(Rect bounds)
|
||||
{
|
||||
Color color1 = element->GetColor1();
|
||||
Color color2 = element->GetColor2();
|
||||
if (color1.a > 0 || color2.a > 0)
|
||||
{
|
||||
Ptr<WinRegion> targetRegion, oldRegion, newRegion;
|
||||
auto shape = element->GetShape();
|
||||
switch (shape.shapeType)
|
||||
{
|
||||
case ElementShapeType::Rectangle:
|
||||
targetRegion = new WinRegion(bounds.x1, bounds.y1, bounds.x2 + 1, bounds.y2 + 1, true);
|
||||
break;
|
||||
case ElementShapeType::Ellipse:
|
||||
targetRegion = new WinRegion(bounds.x1, bounds.y1, bounds.x2 + 1, bounds.y2 + 1, false);
|
||||
break;
|
||||
case ElementShapeType::RoundRect:
|
||||
targetRegion = new WinRegion(bounds.x1, bounds.y1, bounds.x2 + 1, bounds.y2 + 1, shape.radiusX * 2, shape.radiusY * 2);
|
||||
break;
|
||||
}
|
||||
|
||||
oldRegion = renderTarget->GetDC()->GetClipRegion();
|
||||
newRegion = new WinRegion(oldRegion, targetRegion, RGN_AND);
|
||||
renderTarget->GetDC()->ClipRegion(newRegion);
|
||||
|
||||
renderTarget->GetDC()->SetPen(pen);
|
||||
renderTarget->GetDC()->SetBrush(brush);
|
||||
renderTarget->GetDC()->FillRect(bounds.Left(), bounds.Top(), bounds.Right(), bounds.Bottom());
|
||||
{
|
||||
const vint triangleCount = 64;
|
||||
TRIVERTEX vertices[triangleCount + 1];
|
||||
GRADIENT_TRIANGLE triangles[triangleCount];
|
||||
|
||||
vint cx = (bounds.x1 + bounds.x2) / 2;
|
||||
vint cy = (bounds.y1 + bounds.y2) / 2;
|
||||
vint rx = bounds.Width() / 2;
|
||||
vint ry = bounds.Height() / 2;
|
||||
for (vint i = 0; i < triangleCount; i++)
|
||||
{
|
||||
vertices[i].Red = color2.r << 8;
|
||||
vertices[i].Green = color2.g << 8;
|
||||
vertices[i].Blue = color2.b << 8;
|
||||
vertices[i].Alpha = color2.a << 8;
|
||||
|
||||
double theta = 3.1416 * 2 * i / triangleCount;
|
||||
vertices[i].x = (LONG)(cx + cos(theta) * rx);
|
||||
vertices[i].y = (LONG)(cy + sin(theta) * ry);
|
||||
}
|
||||
vertices[triangleCount].Red = color1.r << 8;
|
||||
vertices[triangleCount].Green = color1.g << 8;
|
||||
vertices[triangleCount].Blue = color1.b << 8;
|
||||
vertices[triangleCount].Alpha = color1.a << 8;
|
||||
vertices[triangleCount].x = (LONG)cx;
|
||||
vertices[triangleCount].y = (LONG)cy;
|
||||
|
||||
for (vint i = 0; i < triangleCount; i++)
|
||||
{
|
||||
triangles[i].Vertex1 = (ULONG)triangleCount;
|
||||
triangles[i].Vertex2 = (ULONG)i;
|
||||
triangles[i].Vertex3 = (ULONG)(i + 1) % triangleCount;
|
||||
}
|
||||
|
||||
renderTarget->GetDC()->GradientTriangle(vertices, sizeof(vertices) / sizeof(*vertices), triangles, sizeof(triangles) / sizeof(*triangles));
|
||||
}
|
||||
|
||||
renderTarget->GetDC()->ClipRegion(oldRegion);
|
||||
}
|
||||
}
|
||||
|
||||
void GuiRadialGradientBackgroundElementRenderer::OnElementStateChanged()
|
||||
{
|
||||
Color color = element->GetColor2();
|
||||
if (oldColor != color)
|
||||
{
|
||||
IWindowsGDIResourceManager* resourceManager = GetWindowsGDIResourceManager();
|
||||
resourceManager->DestroyGdiPen(oldColor);
|
||||
resourceManager->DestroyGdiBrush(oldColor);
|
||||
oldColor = color;
|
||||
pen = resourceManager->CreateGdiPen(oldColor);
|
||||
brush = resourceManager->CreateGdiBrush(oldColor);
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
GuiSolidLabelElementRenderer
|
||||
***********************************************************************/
|
||||
@@ -10742,7 +10677,6 @@ void RendererMainGDI()
|
||||
elements_windows_gdi::Gui3DSplitterElementRenderer::Register();
|
||||
elements_windows_gdi::GuiSolidBackgroundElementRenderer::Register();
|
||||
elements_windows_gdi::GuiGradientBackgroundElementRenderer::Register();
|
||||
elements_windows_gdi::GuiRadialGradientBackgroundElementRenderer::Register();
|
||||
elements_windows_gdi::GuiSolidLabelElementRenderer::Register();
|
||||
elements_windows_gdi::GuiImageFrameElementRenderer::Register();
|
||||
elements_windows_gdi::GuiPolygonElementRenderer::Register();
|
||||
@@ -11119,7 +11053,7 @@ WindowsAsyncService
|
||||
ThreadPoolLite::Queue(proc);
|
||||
}
|
||||
|
||||
void WindowsAsyncService::InvokeInMainThread(const Func<void()>& proc)
|
||||
void WindowsAsyncService::InvokeInMainThread(INativeWindow* window, const Func<void()>& proc)
|
||||
{
|
||||
SPIN_LOCK(taskListLock)
|
||||
{
|
||||
@@ -11128,7 +11062,7 @@ WindowsAsyncService
|
||||
}
|
||||
}
|
||||
|
||||
bool WindowsAsyncService::InvokeInMainThreadAndWait(const Func<void()>& proc, vint milliseconds)
|
||||
bool WindowsAsyncService::InvokeInMainThreadAndWait(INativeWindow* window, const Func<void()>& proc, vint milliseconds)
|
||||
{
|
||||
Semaphore semaphore;
|
||||
semaphore.Create(0, 1);
|
||||
|
||||
+31
-31
@@ -601,8 +601,8 @@ namespace vl
|
||||
void ExecuteAsyncTasks();
|
||||
bool IsInMainThread()override;
|
||||
void InvokeAsync(const Func<void()>& proc)override;
|
||||
void InvokeInMainThread(const Func<void()>& proc)override;
|
||||
bool InvokeInMainThreadAndWait(const Func<void()>& proc, vint milliseconds)override;
|
||||
void InvokeInMainThread(INativeWindow* window, const Func<void()>& proc)override;
|
||||
bool InvokeInMainThreadAndWait(INativeWindow* window, const Func<void()>& proc, vint milliseconds)override;
|
||||
Ptr<INativeDelay> DelayExecute(const Func<void()>& proc, vint milliseconds)override;
|
||||
Ptr<INativeDelay> DelayExecuteInMainThread(const Func<void()>& proc, vint milliseconds)override;
|
||||
};
|
||||
@@ -1303,7 +1303,7 @@ namespace vl
|
||||
DEFINE_GUI_GRAPHICS_RENDERER(TELEMENT, TRENDERER, IWindowsDirect2DRenderTarget)\
|
||||
protected:\
|
||||
TBRUSHPROPERTY oldColor;\
|
||||
TBRUSH* brush;\
|
||||
TBRUSH* brush = nullptr;\
|
||||
void CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget);\
|
||||
void DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget);\
|
||||
void InitializeInternal();\
|
||||
@@ -1330,8 +1330,8 @@ Renderers
|
||||
protected:
|
||||
Color oldColor1;
|
||||
Color oldColor2;
|
||||
ID2D1SolidColorBrush* brush1;
|
||||
ID2D1SolidColorBrush* brush2;
|
||||
ID2D1SolidColorBrush* brush1 = nullptr;
|
||||
ID2D1SolidColorBrush* brush2 = nullptr;
|
||||
|
||||
void CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget);
|
||||
void DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget);
|
||||
@@ -1351,8 +1351,8 @@ Renderers
|
||||
protected:
|
||||
Color oldColor1;
|
||||
Color oldColor2;
|
||||
ID2D1SolidColorBrush* brush1;
|
||||
ID2D1SolidColorBrush* brush2;
|
||||
ID2D1SolidColorBrush* brush1 = nullptr;
|
||||
ID2D1SolidColorBrush* brush2 = nullptr;
|
||||
|
||||
void CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget);
|
||||
void DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget);
|
||||
@@ -1377,10 +1377,26 @@ Renderers
|
||||
DEFINE_BRUSH_ELEMENT_RENDERER(GuiGradientBackgroundElement, GuiGradientBackgroundElementRenderer, ID2D1LinearGradientBrush, ColorPair)
|
||||
};
|
||||
|
||||
class GuiRadialGradientBackgroundElementRenderer : public Object, public IGuiGraphicsRenderer
|
||||
class GuiInnerShadowElementRenderer : public Object, public IGuiGraphicsRenderer
|
||||
{
|
||||
typedef collections::Pair<Color, Color> ColorPair;
|
||||
DEFINE_BRUSH_ELEMENT_RENDERER(GuiRadialGradientBackgroundElement, GuiRadialGradientBackgroundElementRenderer, ID2D1RadialGradientBrush, ColorPair)
|
||||
DEFINE_GUI_GRAPHICS_RENDERER(GuiInnerShadowElement, GuiInnerShadowElementRenderer, IWindowsDirect2DRenderTarget)
|
||||
protected:
|
||||
Color oldColor;
|
||||
Color transparentColor;
|
||||
ID2D1LinearGradientBrush* linearBrush = nullptr;
|
||||
ID2D1RadialGradientBrush* radialBrush = nullptr;
|
||||
|
||||
void CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget);
|
||||
void DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget);
|
||||
void InitializeInternal();
|
||||
void FinalizeInternal();
|
||||
void RenderTargetChangedInternal(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget);
|
||||
public:
|
||||
GuiInnerShadowElementRenderer();
|
||||
|
||||
void Render(Rect bounds)override;
|
||||
void OnElementStateChanged()override;
|
||||
};
|
||||
|
||||
class GuiSolidLabelElementRenderer : public Object, public IGuiGraphicsRenderer
|
||||
@@ -1390,10 +1406,10 @@ Renderers
|
||||
Color oldColor;
|
||||
FontProperties oldFont;
|
||||
WString oldText;
|
||||
ID2D1SolidColorBrush* brush;
|
||||
Direct2DTextFormatPackage* textFormat;
|
||||
IDWriteTextLayout* textLayout;
|
||||
vint oldMaxWidth;
|
||||
ID2D1SolidColorBrush* brush = nullptr;
|
||||
Direct2DTextFormatPackage* textFormat = nullptr;
|
||||
IDWriteTextLayout* textLayout = nullptr;
|
||||
vint oldMaxWidth = -1;
|
||||
|
||||
void CreateBrush(IWindowsDirect2DRenderTarget* _renderTarget);
|
||||
void DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget);
|
||||
@@ -1437,8 +1453,8 @@ Renderers
|
||||
protected:
|
||||
Color oldBorderColor;
|
||||
Color oldBackgroundColor;
|
||||
ID2D1SolidColorBrush* borderBrush;
|
||||
ID2D1SolidColorBrush* backgroundBrush;
|
||||
ID2D1SolidColorBrush* borderBrush = nullptr;
|
||||
ID2D1SolidColorBrush* backgroundBrush = nullptr;
|
||||
collections::Array<Point> oldPoints;
|
||||
ComPtr<ID2D1PathGeometry> geometry;
|
||||
|
||||
@@ -1749,22 +1765,6 @@ Renderers
|
||||
void OnElementStateChanged()override;
|
||||
};
|
||||
|
||||
class GuiRadialGradientBackgroundElementRenderer : public Object, public IGuiGraphicsRenderer
|
||||
{
|
||||
DEFINE_GUI_GRAPHICS_RENDERER(GuiRadialGradientBackgroundElement, GuiRadialGradientBackgroundElementRenderer, IWindowsGDIRenderTarget)
|
||||
protected:
|
||||
Color oldColor;
|
||||
Ptr<windows::WinPen> pen;
|
||||
Ptr<windows::WinBrush> brush;
|
||||
|
||||
void InitializeInternal();
|
||||
void FinalizeInternal();
|
||||
void RenderTargetChangedInternal(IWindowsGDIRenderTarget* oldRenderTarget, IWindowsGDIRenderTarget* newRenderTarget);
|
||||
public:
|
||||
void Render(Rect bounds)override;
|
||||
void OnElementStateChanged()override;
|
||||
};
|
||||
|
||||
class GuiSolidLabelElementRenderer : public Object, public IGuiGraphicsRenderer
|
||||
{
|
||||
DEFINE_GUI_GRAPHICS_RENDERER(GuiSolidLabelElement, GuiSolidLabelElementRenderer, IWindowsGDIRenderTarget)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -79,13 +79,13 @@
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:0 column:4 rowSpan:2">
|
||||
<RadialGradientBackground Color1="#FFFF00" Color2="#0000FF"/>
|
||||
<InnerShadow Color="#FFFF00" Thickness="10"/>
|
||||
</Cell>
|
||||
<Cell Site="row:2 column:4 rowSpan:2">
|
||||
<RadialGradientBackground Color1="#FFFF00" Color2="#0000FF" Shape="shapeType:Ellipse"/>
|
||||
<InnerShadow Color="#FF00FF" Thickness="20"/>
|
||||
</Cell>
|
||||
<Cell Site="row:4 column:4 rowSpan:2">
|
||||
<RadialGradientBackground Color1="#FFFF00" Color2="#0000FF" Shape="shapeType:RoundRect radiusX:10 radiusY:5"/>
|
||||
<InnerShadow Color="#00FFFF" Thickness="30"/>
|
||||
</Cell>
|
||||
</Table>
|
||||
</TabPage>
|
||||
|
||||
+18
-15
@@ -7922,12 +7922,12 @@ Class (::demo::ElementTabPageConstructor)
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_37)->SetSite(static_cast<::vl::vint>(0), static_cast<::vl::vint>(4), static_cast<::vl::vint>(2), static_cast<::vl::vint>(1));
|
||||
}
|
||||
(this->__vwsn_precompile_38 = ::vl::Ptr<::vl::presentation::elements::GuiRadialGradientBackgroundElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiRadialGradientBackgroundElement>()));
|
||||
(this->__vwsn_precompile_38 = ::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiInnerShadowElement>()));
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_38.Obj())->SetColor2(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#0000FF", false)));
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_38.Obj())->SetThickness(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"10", false)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_38.Obj())->SetColor1(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#FFFF00", false)));
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_38.Obj())->SetColor(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#FFFF00", false)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_37)->SetOwnedElement(::vl::Ptr<::vl::presentation::elements::IGuiGraphicsElement>(this->__vwsn_precompile_38));
|
||||
@@ -7939,15 +7939,12 @@ Class (::demo::ElementTabPageConstructor)
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_39)->SetSite(static_cast<::vl::vint>(2), static_cast<::vl::vint>(4), static_cast<::vl::vint>(2), static_cast<::vl::vint>(1));
|
||||
}
|
||||
(this->__vwsn_precompile_40 = ::vl::Ptr<::vl::presentation::elements::GuiRadialGradientBackgroundElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiRadialGradientBackgroundElement>()));
|
||||
(this->__vwsn_precompile_40 = ::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiInnerShadowElement>()));
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_40.Obj())->SetColor2(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#0000FF", false)));
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_40.Obj())->SetThickness(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"20", false)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_40.Obj())->SetColor1(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#FFFF00", false)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_40.Obj())->SetShape([&](){ ::vl::presentation::elements::ElementShape __vwsn_temp__; __vwsn_temp__.shapeType = ::vl::presentation::elements::ElementShapeType::Ellipse; return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_40.Obj())->SetColor(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#FF00FF", false)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_39)->SetOwnedElement(::vl::Ptr<::vl::presentation::elements::IGuiGraphicsElement>(this->__vwsn_precompile_40));
|
||||
@@ -7959,15 +7956,12 @@ Class (::demo::ElementTabPageConstructor)
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_41)->SetSite(static_cast<::vl::vint>(4), static_cast<::vl::vint>(4), static_cast<::vl::vint>(2), static_cast<::vl::vint>(1));
|
||||
}
|
||||
(this->__vwsn_precompile_42 = ::vl::Ptr<::vl::presentation::elements::GuiRadialGradientBackgroundElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiRadialGradientBackgroundElement>()));
|
||||
(this->__vwsn_precompile_42 = ::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiInnerShadowElement>()));
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_42.Obj())->SetColor2(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#0000FF", false)));
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_42.Obj())->SetThickness(::vl::__vwsn::Parse<::vl::vint>(::vl::WString(L"30", false)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_42.Obj())->SetColor1(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#FFFF00", false)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_42.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_42.Obj())->SetColor(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#00FFFF", false)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_41)->SetOwnedElement(::vl::Ptr<::vl::presentation::elements::IGuiGraphicsElement>(this->__vwsn_precompile_42));
|
||||
@@ -10939,6 +10933,7 @@ Class (::demo::MyTextItem)
|
||||
{
|
||||
return this->__vwsn_prop_Name;
|
||||
}
|
||||
|
||||
void MyTextItem::SetName(const ::vl::WString& __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Name = __vwsn_value_);
|
||||
@@ -10948,6 +10943,7 @@ Class (::demo::MyTextItem)
|
||||
{
|
||||
return this->__vwsn_prop_Checked;
|
||||
}
|
||||
|
||||
void MyTextItem::SetChecked(bool __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Checked = __vwsn_value_);
|
||||
@@ -10965,6 +10961,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_Name;
|
||||
}
|
||||
|
||||
void MyDataItem::SetName(const ::vl::WString& __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Name = __vwsn_value_);
|
||||
@@ -10974,6 +10971,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_Gender;
|
||||
}
|
||||
|
||||
void MyDataItem::SetGender(::demo::MyGender __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Gender = __vwsn_value_);
|
||||
@@ -10983,6 +10981,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_Category;
|
||||
}
|
||||
|
||||
void MyDataItem::SetCategory(::demo::MyCategory __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Category = __vwsn_value_);
|
||||
@@ -10992,6 +10991,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_Birthday;
|
||||
}
|
||||
|
||||
void MyDataItem::SetBirthday(::vl::DateTime __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Birthday = __vwsn_value_);
|
||||
@@ -11001,6 +11001,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_Website;
|
||||
}
|
||||
|
||||
void MyDataItem::SetWebsite(const ::vl::WString& __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Website = __vwsn_value_);
|
||||
@@ -11010,6 +11011,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_LargeImage;
|
||||
}
|
||||
|
||||
void MyDataItem::SetLargeImage(::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_LargeImage = __vwsn_value_);
|
||||
@@ -11019,6 +11021,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_SmallImage;
|
||||
}
|
||||
|
||||
void MyDataItem::SetSmallImage(::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_SmallImage = __vwsn_value_);
|
||||
|
||||
+21
-5
@@ -763,11 +763,11 @@ namespace demo
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_35 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::Ptr<::vl::presentation::elements::GuiGradientBackgroundElement> __vwsn_precompile_36 = ::vl::Ptr<::vl::presentation::elements::GuiGradientBackgroundElement>();
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_37 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::Ptr<::vl::presentation::elements::GuiRadialGradientBackgroundElement> __vwsn_precompile_38 = ::vl::Ptr<::vl::presentation::elements::GuiRadialGradientBackgroundElement>();
|
||||
::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement> __vwsn_precompile_38 = ::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement>();
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_39 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::Ptr<::vl::presentation::elements::GuiRadialGradientBackgroundElement> __vwsn_precompile_40 = ::vl::Ptr<::vl::presentation::elements::GuiRadialGradientBackgroundElement>();
|
||||
::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement> __vwsn_precompile_40 = ::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement>();
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_41 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::Ptr<::vl::presentation::elements::GuiRadialGradientBackgroundElement> __vwsn_precompile_42 = ::vl::Ptr<::vl::presentation::elements::GuiRadialGradientBackgroundElement>();
|
||||
::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement> __vwsn_precompile_42 = ::vl::Ptr<::vl::presentation::elements::GuiInnerShadowElement>();
|
||||
void __vwsn_initialize_instance_(::demo::ElementTabPage* __vwsn_this_);
|
||||
public:
|
||||
ElementTabPageConstructor();
|
||||
@@ -1665,11 +1665,14 @@ namespace demo
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MyTextItem>;
|
||||
#endif
|
||||
public:
|
||||
private:
|
||||
::vl::WString __vwsn_prop_Name = ::vl::WString(L"", false);
|
||||
public:
|
||||
::vl::WString GetName();
|
||||
void SetName(const ::vl::WString& __vwsn_value_);
|
||||
private:
|
||||
bool __vwsn_prop_Checked = false;
|
||||
public:
|
||||
bool GetChecked();
|
||||
void SetChecked(bool __vwsn_value_);
|
||||
MyTextItem();
|
||||
@@ -1680,26 +1683,39 @@ namespace demo
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MyDataItem>;
|
||||
#endif
|
||||
public:
|
||||
private:
|
||||
::vl::WString __vwsn_prop_Name = ::vl::WString(L"", false);
|
||||
public:
|
||||
::vl::WString GetName();
|
||||
void SetName(const ::vl::WString& __vwsn_value_);
|
||||
private:
|
||||
::demo::MyGender __vwsn_prop_Gender = ::demo::MyGender::Male;
|
||||
public:
|
||||
::demo::MyGender GetGender();
|
||||
void SetGender(::demo::MyGender __vwsn_value_);
|
||||
private:
|
||||
::demo::MyCategory __vwsn_prop_Category = ::demo::MyCategory::White;
|
||||
public:
|
||||
::demo::MyCategory GetCategory();
|
||||
void SetCategory(::demo::MyCategory __vwsn_value_);
|
||||
private:
|
||||
::vl::DateTime __vwsn_prop_Birthday = ::vl::__vwsn::Parse<::vl::DateTime>(::vl::WString(L"2000-01-01 00:00:00.000", false));
|
||||
public:
|
||||
::vl::DateTime GetBirthday();
|
||||
void SetBirthday(::vl::DateTime __vwsn_value_);
|
||||
private:
|
||||
::vl::WString __vwsn_prop_Website = ::vl::WString(L"", false);
|
||||
public:
|
||||
::vl::WString GetWebsite();
|
||||
void SetWebsite(const ::vl::WString& __vwsn_value_);
|
||||
private:
|
||||
::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_prop_LargeImage = ::vl::Ptr<::vl::presentation::GuiImageData>();
|
||||
public:
|
||||
::vl::Ptr<::vl::presentation::GuiImageData> GetLargeImage();
|
||||
void SetLargeImage(::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_value_);
|
||||
private:
|
||||
::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_prop_SmallImage = ::vl::Ptr<::vl::presentation::GuiImageData>();
|
||||
public:
|
||||
::vl::Ptr<::vl::presentation::GuiImageData> GetSmallImage();
|
||||
void SetSmallImage(::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_value_);
|
||||
MyDataItem();
|
||||
|
||||
@@ -3335,6 +3335,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_Name;
|
||||
}
|
||||
|
||||
void MyDataItem::SetName(const ::vl::WString& __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Name = __vwsn_value_);
|
||||
@@ -3344,6 +3345,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_Gender;
|
||||
}
|
||||
|
||||
void MyDataItem::SetGender(::demo::MyGender __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Gender = __vwsn_value_);
|
||||
@@ -3353,6 +3355,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_Category;
|
||||
}
|
||||
|
||||
void MyDataItem::SetCategory(::demo::MyCategory __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Category = __vwsn_value_);
|
||||
@@ -3362,6 +3365,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_Birthday;
|
||||
}
|
||||
|
||||
void MyDataItem::SetBirthday(::vl::DateTime __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Birthday = __vwsn_value_);
|
||||
@@ -3371,6 +3375,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_Website;
|
||||
}
|
||||
|
||||
void MyDataItem::SetWebsite(const ::vl::WString& __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Website = __vwsn_value_);
|
||||
@@ -3380,6 +3385,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_LargeImage;
|
||||
}
|
||||
|
||||
void MyDataItem::SetLargeImage(::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_LargeImage = __vwsn_value_);
|
||||
@@ -3389,6 +3395,7 @@ Class (::demo::MyDataItem)
|
||||
{
|
||||
return this->__vwsn_prop_SmallImage;
|
||||
}
|
||||
|
||||
void MyDataItem::SetSmallImage(::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_SmallImage = __vwsn_value_);
|
||||
|
||||
@@ -677,26 +677,39 @@ namespace demo
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MyDataItem>;
|
||||
#endif
|
||||
public:
|
||||
private:
|
||||
::vl::WString __vwsn_prop_Name = ::vl::WString(L"", false);
|
||||
public:
|
||||
::vl::WString GetName();
|
||||
void SetName(const ::vl::WString& __vwsn_value_);
|
||||
private:
|
||||
::demo::MyGender __vwsn_prop_Gender = ::demo::MyGender::Male;
|
||||
public:
|
||||
::demo::MyGender GetGender();
|
||||
void SetGender(::demo::MyGender __vwsn_value_);
|
||||
private:
|
||||
::demo::MyCategory __vwsn_prop_Category = ::demo::MyCategory::White;
|
||||
public:
|
||||
::demo::MyCategory GetCategory();
|
||||
void SetCategory(::demo::MyCategory __vwsn_value_);
|
||||
private:
|
||||
::vl::DateTime __vwsn_prop_Birthday = ::vl::__vwsn::Parse<::vl::DateTime>(::vl::WString(L"2000-01-01 00:00:00.000", false));
|
||||
public:
|
||||
::vl::DateTime GetBirthday();
|
||||
void SetBirthday(::vl::DateTime __vwsn_value_);
|
||||
private:
|
||||
::vl::WString __vwsn_prop_Website = ::vl::WString(L"", false);
|
||||
public:
|
||||
::vl::WString GetWebsite();
|
||||
void SetWebsite(const ::vl::WString& __vwsn_value_);
|
||||
private:
|
||||
::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_prop_LargeImage = ::vl::Ptr<::vl::presentation::GuiImageData>();
|
||||
public:
|
||||
::vl::Ptr<::vl::presentation::GuiImageData> GetLargeImage();
|
||||
void SetLargeImage(::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_value_);
|
||||
private:
|
||||
::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_prop_SmallImage = ::vl::Ptr<::vl::presentation::GuiImageData>();
|
||||
public:
|
||||
::vl::Ptr<::vl::presentation::GuiImageData> GetSmallImage();
|
||||
void SetSmallImage(::vl::Ptr<::vl::presentation::GuiImageData> __vwsn_value_);
|
||||
MyDataItem();
|
||||
|
||||
@@ -1684,6 +1684,7 @@ Class (::demo::MyTextItem)
|
||||
{
|
||||
return this->__vwsn_prop_Name;
|
||||
}
|
||||
|
||||
void MyTextItem::SetName(const ::vl::WString& __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Name = __vwsn_value_);
|
||||
@@ -1693,6 +1694,7 @@ Class (::demo::MyTextItem)
|
||||
{
|
||||
return this->__vwsn_prop_Checked;
|
||||
}
|
||||
|
||||
void MyTextItem::SetChecked(bool __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Checked = __vwsn_value_);
|
||||
|
||||
@@ -307,11 +307,14 @@ namespace demo
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MyTextItem>;
|
||||
#endif
|
||||
public:
|
||||
private:
|
||||
::vl::WString __vwsn_prop_Name = ::vl::WString(L"", false);
|
||||
public:
|
||||
::vl::WString GetName();
|
||||
void SetName(const ::vl::WString& __vwsn_value_);
|
||||
private:
|
||||
bool __vwsn_prop_Checked = false;
|
||||
public:
|
||||
bool GetChecked();
|
||||
void SetChecked(bool __vwsn_value_);
|
||||
MyTextItem();
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
buttonDownload.Enabled = false;
|
||||
var text = $Await demo::IViewModel::DownloadAsync(ViewModel, func(progress : int):void
|
||||
{
|
||||
Application::GetApplication().InvokeInMainThreadAndWait(func():void
|
||||
Application::GetApplication().InvokeInMainThreadAndWait(self, func():void
|
||||
{
|
||||
progressBar.Position = progress;
|
||||
}, -1);
|
||||
|
||||
@@ -77,7 +77,7 @@ Closures
|
||||
|
||||
void __vwsnf2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___::operator()(::vl::vint progress) const
|
||||
{
|
||||
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(LAMBDA(::vl_workflow_global::__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____(progress, __vwsnthis_0)), (- static_cast<::vl::vint>(1)));
|
||||
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(static_cast<::vl::presentation::controls::GuiControlHost*>(__vwsnthis_0->self), LAMBDA(::vl_workflow_global::__vwsnf3_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____(progress, __vwsnthis_0)), (- static_cast<::vl::vint>(1)));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -114,7 +114,7 @@ Closures
|
||||
|
||||
void __vwsnf5_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____::operator()(::vl::vint progress) const
|
||||
{
|
||||
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(LAMBDA(::vl_workflow_global::__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance_____(progress, __vwsnthis_0)), (- static_cast<::vl::vint>(1)));
|
||||
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(static_cast<::vl::presentation::controls::GuiControlHost*>(__vwsnthis_0->self), LAMBDA(::vl_workflow_global::__vwsnf6_Demo_demo_MainWindowConstructor___vwsn_initialize_instance_____(progress, __vwsnthis_0)), (- static_cast<::vl::vint>(1)));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -140,7 +140,7 @@ Closures
|
||||
|
||||
void __vwsnf7_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume_::operator()(::vl::vint progress) const
|
||||
{
|
||||
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(LAMBDA(::vl_workflow_global::__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume__(progress, __vwsnthis_0, __vwsnthis_1)), (- static_cast<::vl::vint>(1)));
|
||||
::vl::__vwsn::This(::vl::presentation::controls::GetApplication())->InvokeInMainThreadAndWait(static_cast<::vl::presentation::controls::GuiControlHost*>(__vwsnthis_1->self), LAMBDA(::vl_workflow_global::__vwsnf8_Demo_demo_MainWindowConstructor___vwsn_initialize_instance____Resume__(progress, __vwsnthis_0, __vwsnthis_1)), (- static_cast<::vl::vint>(1)));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user