mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-22 15:11:25 +08:00
GacUI_Layout\SharedSize
This commit is contained in:
+19
-9
@@ -7482,7 +7482,7 @@ GuiSharedSizeItemComposition
|
||||
if (parentRoot)
|
||||
{
|
||||
parentRoot->childItems.Remove(this);
|
||||
parentRoot = 0;
|
||||
parentRoot = nullptr;
|
||||
}
|
||||
|
||||
auto current = GetParent();
|
||||
@@ -7503,13 +7503,28 @@ GuiSharedSizeItemComposition
|
||||
if (parentRoot)
|
||||
{
|
||||
parentRoot->childItems.Add(this);
|
||||
Size minSize;
|
||||
if (sharedWidth)
|
||||
{
|
||||
vint index = parentRoot->itemWidths.Keys().IndexOf(group);
|
||||
if (index != -1)
|
||||
{
|
||||
minSize.x = parentRoot->itemWidths.Values()[index];
|
||||
}
|
||||
}
|
||||
if (sharedHeight)
|
||||
{
|
||||
vint index = parentRoot->itemHeights.Keys().IndexOf(group);
|
||||
if (index != -1)
|
||||
{
|
||||
minSize.y = parentRoot->itemHeights.Values()[index];
|
||||
}
|
||||
}
|
||||
SetPreferredMinSize(minSize);
|
||||
}
|
||||
}
|
||||
|
||||
GuiSharedSizeItemComposition::GuiSharedSizeItemComposition()
|
||||
:parentRoot(0)
|
||||
, sharedWidth(false)
|
||||
, sharedHeight(false)
|
||||
{
|
||||
SetMinSizeLimitation(GuiGraphicsComposition::LimitToElementAndChildren);
|
||||
}
|
||||
@@ -7619,11 +7634,6 @@ GuiSharedSizeRootComposition
|
||||
}
|
||||
}
|
||||
|
||||
void GuiSharedSizeRootComposition::UpdateBounds()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
GuiSharedSizeRootComposition::GuiSharedSizeRootComposition()
|
||||
{
|
||||
}
|
||||
|
||||
+3
-4
@@ -8239,10 +8239,10 @@ namespace vl
|
||||
class GuiSharedSizeItemComposition : public GuiBoundsComposition, public Description<GuiSharedSizeItemComposition>
|
||||
{
|
||||
protected:
|
||||
GuiSharedSizeRootComposition* parentRoot;
|
||||
GuiSharedSizeRootComposition* parentRoot = nullptr;
|
||||
WString group;
|
||||
bool sharedWidth;
|
||||
bool sharedHeight;
|
||||
bool sharedWidth = false;
|
||||
bool sharedHeight = false;
|
||||
|
||||
void Update();
|
||||
void OnParentLineChanged()override;
|
||||
@@ -8282,7 +8282,6 @@ namespace vl
|
||||
void AddSizeComponent(collections::Dictionary<WString, vint>& sizes, const WString& group, vint sizeComponent);
|
||||
void CollectSizes(collections::Dictionary<WString, vint>& widths, collections::Dictionary<WString, vint>& heights);
|
||||
void AlignSizes(collections::Dictionary<WString, vint>& widths, collections::Dictionary<WString, vint>& heights);
|
||||
void UpdateBounds();
|
||||
public:
|
||||
GuiSharedSizeRootComposition();
|
||||
~GuiSharedSizeRootComposition();
|
||||
|
||||
@@ -23,6 +23,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Responsive1", "Responsive1\
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Responsive2", "Responsive2\Responsive2.vcxproj", "{747D66CE-7F4C-44A0-BE17-99C23C8AC55F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SharedSize", "SharedSize\SharedSize.vcxproj", "{8E2665E6-4FB4-429D-8D9F-E538B5D9894C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -89,6 +91,14 @@ Global
|
||||
{747D66CE-7F4C-44A0-BE17-99C23C8AC55F}.Release|Win32.Build.0 = Release|Win32
|
||||
{747D66CE-7F4C-44A0-BE17-99C23C8AC55F}.Release|x64.ActiveCfg = Release|x64
|
||||
{747D66CE-7F4C-44A0-BE17-99C23C8AC55F}.Release|x64.Build.0 = Release|x64
|
||||
{8E2665E6-4FB4-429D-8D9F-E538B5D9894C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8E2665E6-4FB4-429D-8D9F-E538B5D9894C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8E2665E6-4FB4-429D-8D9F-E538B5D9894C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8E2665E6-4FB4-429D-8D9F-E538B5D9894C}.Debug|x64.Build.0 = Debug|x64
|
||||
{8E2665E6-4FB4-429D-8D9F-E538B5D9894C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8E2665E6-4FB4-429D-8D9F-E538B5D9894C}.Release|Win32.Build.0 = Release|Win32
|
||||
{8E2665E6-4FB4-429D-8D9F-E538B5D9894C}.Release|x64.ActiveCfg = Release|x64
|
||||
{8E2665E6-4FB4-429D-8D9F-E538B5D9894C}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#define GAC_HEADER_USE_NAMESPACE
|
||||
#include "UI/Source/Demo.h"
|
||||
#include <Windows.h>
|
||||
|
||||
using namespace vl::collections;
|
||||
using namespace vl::stream;
|
||||
|
||||
void GuiMain()
|
||||
{
|
||||
{
|
||||
FileStream fileStream(L"../UIRes/SharedSize.bin", FileStream::ReadOnly);
|
||||
auto resource = GuiResource::LoadPrecompiledBinary(fileStream);
|
||||
GetResourceManager()->SetResource(resource);
|
||||
}
|
||||
demo::MainWindow window;
|
||||
window.MoveToScreenCenter();
|
||||
GetApplication()->Run(&window);
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{8E2665E6-4FB4-429D-8D9F-E538B5D9894C}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>SharedSize</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)..\..\..\Import;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)..\..\..\Import;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)..\..\..\Import;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(ProjectDir)..\..\..\Import;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Main.cpp" />
|
||||
<ClCompile Include="UI\Source\DemoPartialClasses.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Xml Include="UI\RepeatComponents.xml" />
|
||||
<Xml Include="UI\Resource.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="UI\Source\Demo.h" />
|
||||
<ClInclude Include="UI\Source\DemoPartialClasses.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Lib\GacUILite\GacUILite.vcxproj">
|
||||
<Project>{96c559ca-9718-4bec-a053-28a0ab6a8ca2}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="UI">
|
||||
<UniqueIdentifier>{4deca4b7-50c2-4fd0-a3ad-0f3bfaf42e42}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UI\Source\DemoPartialClasses.cpp">
|
||||
<Filter>UI</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Xml Include="UI\Resource.xml">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Xml>
|
||||
<Xml Include="UI\RepeatComponents.xml">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Xml>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="UI\Source\DemoPartialClasses.h">
|
||||
<Filter>UI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="UI\Source\Demo.h">
|
||||
<Filter>UI</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,231 @@
|
||||
<Folder>
|
||||
<Instance name="SharedSizeItemTemplateResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::SharedSizeItemTemplate">
|
||||
<ref.Parameter Name="ViewModel" Class="demo::MyTextItem"/>
|
||||
<ControlTemplate MinSizeLimitation="LimitToElementAndChildren">
|
||||
<SharedSizeItem Group="EnglishNumber" SharedWidth="true" AlignmentToParent="left:0 top:0 right:0 bottom:0">
|
||||
<Button Text-bind="ViewModel.Name">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
</Button>
|
||||
</SharedSizeItem>
|
||||
</ControlTemplate>
|
||||
</Instance>
|
||||
</Instance>
|
||||
|
||||
<Instance name="SharedSizeTextItemTemplateResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::SharedSizeTextItemTemplate">
|
||||
<ref.Parameter Name="ViewModel" Class="demo::MyTextItem"/>
|
||||
<TextListItemTemplate ref.Name="self" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<SharedSizeItem Group="EnglishNumber" SharedWidth="true" AlignmentToParent="left:-1 top:5 right:5 bottom:5">
|
||||
<SolidLabel Text-bind="ViewModel.Name" Font-bind="self.Font" Color-bind="self.TextColor"/>
|
||||
</SharedSizeItem>
|
||||
</TextListItemTemplate>
|
||||
</Instance>
|
||||
</Instance>
|
||||
|
||||
<Instance name="EnglishNumbersControllerResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::EnglishNumbersController">
|
||||
<ref.Members>
|
||||
<![CDATA[
|
||||
@cpp:Private
|
||||
var counter : int = 0;
|
||||
|
||||
prop ItemsToBind : observe MyTextItem^[] = {} {const, not observe}
|
||||
|
||||
@cpp:Private
|
||||
func ToText_1to9(i : int) : string
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 1: { return "one"; }
|
||||
case 2: { return "two"; }
|
||||
case 3: { return "three"; }
|
||||
case 4: { return "four"; }
|
||||
case 5: { return "five"; }
|
||||
case 6: { return "six"; }
|
||||
case 7: { return "seven"; }
|
||||
case 8: { return "eight"; }
|
||||
case 9: { return "nine"; }
|
||||
}
|
||||
raise "ToText_1to9: Number out of range.";
|
||||
}
|
||||
|
||||
@cpp:Private
|
||||
func ToText_11to19(i : int) : string
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 1: { return "eleven"; }
|
||||
case 2: { return "twelve"; }
|
||||
case 3: { return "thirteen"; }
|
||||
case 4: { return "fourteen"; }
|
||||
case 5: { return "fifteen"; }
|
||||
case 6: { return "sixteen"; }
|
||||
case 7: { return "seventeen"; }
|
||||
case 8: { return "eightteen"; }
|
||||
case 9: { return "nineteen"; }
|
||||
}
|
||||
raise "ToText_11to19: Number out of range.";
|
||||
}
|
||||
|
||||
@cpp:Private
|
||||
func NumberToText_1To99(i : int) : string
|
||||
{
|
||||
switch (i / 10)
|
||||
{
|
||||
case 0: { return ToText_1to9(i % 10); }
|
||||
case 1: { return i == 10 ? "ten" : ToText_11to19(i % 10); }
|
||||
case 2: { return i % 10 == 0 ? "twenty" : "twenty-" & ToText_1to9(i % 10); }
|
||||
case 3: { return i % 10 == 0 ? "thirty" : "thirty-" & ToText_1to9(i % 10); }
|
||||
case 4: { return i % 10 == 0 ? "fourty" : "fourty-" & ToText_1to9(i % 10); }
|
||||
case 5: { return i % 10 == 0 ? "fifty" : "fifty-" & ToText_1to9(i % 10); }
|
||||
case 6: { return i % 10 == 0 ? "sixty" : "sixty-" & ToText_1to9(i % 10); }
|
||||
case 7: { return i % 10 == 0 ? "seventy" : "seventy-" & ToText_1to9(i % 10); }
|
||||
case 8: { return i % 10 == 0 ? "eighty" : "eighty-" & ToText_1to9(i % 10); }
|
||||
case 9: { return i % 10 == 0 ? "ninety" : "ninety-" & ToText_1to9(i % 10); }
|
||||
}
|
||||
raise "NumberToText_1To99: Number out of range.";
|
||||
}
|
||||
|
||||
@cpp:Private
|
||||
func NumberToText_0to999(i : int) : string
|
||||
{
|
||||
if (i < 100) { return NumberToText_1To99(i); }
|
||||
return ToText_1to9(i / 100) & " hundred" & (i % 100 == 0 ? "" : " and " & NumberToText_1To99(i % 100));
|
||||
}
|
||||
|
||||
@cpp:Private
|
||||
func NumberToText(i : int) : string
|
||||
{
|
||||
if (i == 0) { return "zero"; }
|
||||
if (i < 1000) { return NumberToText_0to999(i); }
|
||||
return "Number too large: " & i;
|
||||
}
|
||||
]]>
|
||||
</ref.Members>
|
||||
<CustomControl ref.Name="self">
|
||||
<GroupBox Text-bind="self.Text">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:-1"/>
|
||||
<att.ContainerComposition-set InternalMargin="left:5 top:0 right:5 bottom:5"/>
|
||||
<Stack Direction="Vertical" Padding="5" AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<StackItem>
|
||||
<Button Alt="A" Text="Add 10 items">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<ev.Clicked-eval>
|
||||
<![CDATA[
|
||||
{
|
||||
for (i in range [0, 9])
|
||||
{
|
||||
var textItem = new demo::MyTextItem^();
|
||||
textItem.Name = self.NumberToText(self.counter + i);
|
||||
self.ItemsToBind.Add(textItem);
|
||||
}
|
||||
|
||||
self.counter = self.counter + 10;
|
||||
}
|
||||
]]>
|
||||
</ev.Clicked-eval>
|
||||
</Button>
|
||||
</StackItem>
|
||||
<StackItem>
|
||||
<Button Alt="O" Text="Remove odd items">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<ev.Clicked-eval>
|
||||
<![CDATA[
|
||||
{
|
||||
var i = 0;
|
||||
while (i < self.ItemsToBind.Count)
|
||||
{
|
||||
self.ItemsToBind.RemoveAt(i);
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</ev.Clicked-eval>
|
||||
</Button>
|
||||
</StackItem>
|
||||
<StackItem>
|
||||
<Button Alt="E" Text="Remove even items">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<ev.Clicked-eval>
|
||||
<![CDATA[
|
||||
{
|
||||
var i = 1;
|
||||
while (i < self.ItemsToBind.Count)
|
||||
{
|
||||
self.ItemsToBind.RemoveAt(i);
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</ev.Clicked-eval>
|
||||
</Button>
|
||||
</StackItem>
|
||||
<StackItem>
|
||||
<Button Alt="C" Text="Clear">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<ev.Clicked-eval>
|
||||
<![CDATA[
|
||||
{
|
||||
self.ItemsToBind.Clear();
|
||||
}
|
||||
]]>
|
||||
</ev.Clicked-eval>
|
||||
</Button>
|
||||
</StackItem>
|
||||
<StackItem>
|
||||
<Button Alt="R" Text="Reset Counter">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<ev.Clicked-eval>
|
||||
<![CDATA[
|
||||
{
|
||||
self.counter = 0;
|
||||
}
|
||||
]]>
|
||||
</ev.Clicked-eval>
|
||||
</Button>
|
||||
</StackItem>
|
||||
</Stack>
|
||||
</GroupBox>
|
||||
</CustomControl>
|
||||
</Instance>
|
||||
</Instance>
|
||||
|
||||
<Instance name="EnglishNumbersControllerTabPageResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::EnglishNumbersControllerTabPage" xmlns:demo="demo::*">
|
||||
<ref.Members>
|
||||
<![CDATA[
|
||||
prop ItemsToBind : observe MyTextItem^[] = {} {const, not observe}
|
||||
prop ContentComposition: GuiGraphicsComposition* = null {const, not observe}
|
||||
]]>
|
||||
</ref.Members>
|
||||
<ref.Ctor>
|
||||
<![CDATA[
|
||||
{
|
||||
SetItemsToBind(controller.ItemsToBind);
|
||||
SetContentComposition(content);
|
||||
}
|
||||
]]>
|
||||
</ref.Ctor>
|
||||
<TabPage>
|
||||
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<att.Rows>
|
||||
<_>composeType:Percentage percentage:1.0</_>
|
||||
</att.Rows>
|
||||
<att.Columns>
|
||||
<_>composeType:Percentage percentage:1.0</_>
|
||||
<_>composeType:MinSize</_>
|
||||
</att.Columns>
|
||||
|
||||
<Cell ref.Name="content" Site="row:0 column:0">
|
||||
</Cell>
|
||||
<Cell Site="row:0 column:1">
|
||||
<demo:EnglishNumbersController ref.Name="controller" Text="Operations">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
</demo:EnglishNumbersController>
|
||||
</Cell>
|
||||
</Table>
|
||||
</TabPage>
|
||||
</Instance>
|
||||
</Instance>
|
||||
</Folder>
|
||||
@@ -0,0 +1,72 @@
|
||||
<Resource>
|
||||
<Folder name="GacGenConfig">
|
||||
<Folder name="Cpp">
|
||||
<Text name="SourceFolder">Source</Text>
|
||||
<Text name="Resource">..\..\UIRes\SharedSize.bin</Text>
|
||||
<Text name="NormalInclude">GacUI.h</Text>
|
||||
<Text name="Name">Demo</Text>
|
||||
</Folder>
|
||||
</Folder>
|
||||
|
||||
<Folder name="RepeatComponents" content="Link">RepeatComponents.xml</Folder>
|
||||
|
||||
<Script name="ViewModelResource">
|
||||
<Workflow>
|
||||
<![CDATA[
|
||||
module viewmodel;
|
||||
|
||||
using system::*;
|
||||
using presentation::*;
|
||||
|
||||
namespace demo
|
||||
{
|
||||
class MyTextItem
|
||||
{
|
||||
prop Name : string = "" {not observe}
|
||||
prop Checked : bool = false {not observe}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</Workflow>
|
||||
</Script>
|
||||
|
||||
<Instance name="MainWindowInstance">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::MainWindow" xmlns:demo="demo::*">
|
||||
<Window Text="SharedSize" ClientSize="x:640 y:480">
|
||||
<Tab>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<att.Pages>
|
||||
<demo:EnglishNumbersControllerTabPage ref.Name="sharedSizeListTabPage" Text="SharedSize (TextList)">
|
||||
<att.ContentComposition-set>
|
||||
<SharedSizeRoot AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<BindableTextList HorizontalAlwaysVisible="false" VerticalAlwaysVisible="false" env.ItemType="demo::MyTextItem^">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<att.ItemTemplate>demo::SharedSizeTextItemTemplate</att.ItemTemplate>
|
||||
<att.TextProperty>Name</att.TextProperty>
|
||||
<att.ItemSource-eval>sharedSizeListTabPage.ItemsToBind</att.ItemSource-eval>
|
||||
</BindableTextList>
|
||||
</SharedSizeRoot>
|
||||
</att.ContentComposition-set>
|
||||
</demo:EnglishNumbersControllerTabPage>
|
||||
<demo:EnglishNumbersControllerTabPage ref.Name="sharedSizeFlowTabPage" Text="SharedSize (RepeatFlow)">
|
||||
<att.ContentComposition-set>
|
||||
<ScrollContainer ExtendToFullWidth="true" HorizontalAlwaysVisible="false">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<SharedSizeRoot AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<RepeatFlow AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<att.RowPadding>5</att.RowPadding>
|
||||
<att.ColumnPadding>5</att.ColumnPadding>
|
||||
<att.ExtraMargin>left:5 top:5 right:5 bottom:5</att.ExtraMargin>
|
||||
<att.ItemTemplate>demo::SharedSizeItemTemplate</att.ItemTemplate>
|
||||
<att.ItemSource-eval>sharedSizeFlowTabPage.ItemsToBind</att.ItemSource-eval>
|
||||
</RepeatFlow>
|
||||
</SharedSizeRoot>
|
||||
</ScrollContainer>
|
||||
</att.ContentComposition-set>
|
||||
</demo:EnglishNumbersControllerTabPage>
|
||||
</att.Pages>
|
||||
</Tab>
|
||||
</Window>
|
||||
</Instance>
|
||||
</Instance>
|
||||
</Resource>
|
||||
@@ -0,0 +1,15 @@
|
||||
/***********************************************************************
|
||||
!!!!!! DO NOT MODIFY !!!!!!
|
||||
|
||||
GacGen.exe Resource.xml
|
||||
|
||||
This file is generated by Workflow compiler
|
||||
https://github.com/vczh-libraries
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMO
|
||||
#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMO
|
||||
|
||||
#include "DemoPartialClasses.h"
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,239 @@
|
||||
/***********************************************************************
|
||||
!!!!!! DO NOT MODIFY !!!!!!
|
||||
|
||||
GacGen.exe Resource.xml
|
||||
|
||||
This file is generated by Workflow compiler
|
||||
https://github.com/vczh-libraries
|
||||
***********************************************************************/
|
||||
|
||||
#include "DemoReflection.h"
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4250)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wparentheses-equality"
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wparentheses-equality"
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
Reflection
|
||||
***********************************************************************/
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace reflection
|
||||
{
|
||||
namespace description
|
||||
{
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
IMPL_CPP_TYPE_INFO(demo::EnglishNumbersController)
|
||||
IMPL_CPP_TYPE_INFO(demo::EnglishNumbersControllerConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::EnglishNumbersControllerTabPage)
|
||||
IMPL_CPP_TYPE_INFO(demo::EnglishNumbersControllerTabPageConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::MainWindow)
|
||||
IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::MyTextItem)
|
||||
IMPL_CPP_TYPE_INFO(demo::SharedSizeItemTemplate)
|
||||
IMPL_CPP_TYPE_INFO(demo::SharedSizeItemTemplateConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::SharedSizeTextItemTemplate)
|
||||
IMPL_CPP_TYPE_INFO(demo::SharedSizeTextItemTemplateConstructor)
|
||||
|
||||
#define _ ,
|
||||
BEGIN_CLASS_MEMBER(::demo::EnglishNumbersController)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiCustomControl)
|
||||
CLASS_MEMBER_BASE(::demo::EnglishNumbersControllerConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::demo::EnglishNumbersController*(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetItemsToBind, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(NumberToText, { L"i" })
|
||||
CLASS_MEMBER_METHOD(NumberToText_0to999, { L"i" })
|
||||
CLASS_MEMBER_METHOD(NumberToText_1To99, { L"i" })
|
||||
CLASS_MEMBER_METHOD(SetItemsToBind, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(ToText_11to19, { L"i" })
|
||||
CLASS_MEMBER_METHOD(ToText_1to9, { L"i" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_ItemsToBind)
|
||||
CLASS_MEMBER_PROPERTY_READONLY(ItemsToBind, GetItemsToBind)
|
||||
CLASS_MEMBER_FIELD(counter)
|
||||
END_CLASS_MEMBER(::demo::EnglishNumbersController)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::EnglishNumbersControllerConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::EnglishNumbersControllerConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_demo_EnglishNumbersController_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_10)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_11)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_12)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_13)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_14)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_15)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_16)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_17)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_18)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
|
||||
CLASS_MEMBER_FIELD(self)
|
||||
END_CLASS_MEMBER(::demo::EnglishNumbersControllerConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::EnglishNumbersControllerTabPage)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiTabPage)
|
||||
CLASS_MEMBER_BASE(::demo::EnglishNumbersControllerTabPageConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::demo::EnglishNumbersControllerTabPage*(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_instance_ctor_, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetContentComposition, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetItemsToBind, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(SetContentComposition, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(SetItemsToBind, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_ContentComposition)
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_ItemsToBind)
|
||||
CLASS_MEMBER_PROPERTY_READONLY(ContentComposition, GetContentComposition)
|
||||
CLASS_MEMBER_PROPERTY_READONLY(ItemsToBind, GetItemsToBind)
|
||||
END_CLASS_MEMBER(::demo::EnglishNumbersControllerTabPage)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::EnglishNumbersControllerTabPageConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::EnglishNumbersControllerTabPageConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_demo_EnglishNumbersControllerTabPage_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(content)
|
||||
CLASS_MEMBER_FIELD(controller)
|
||||
END_CLASS_MEMBER(::demo::EnglishNumbersControllerTabPageConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::MainWindow)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
||||
CLASS_MEMBER_BASE(::demo::MainWindowConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER)
|
||||
END_CLASS_MEMBER(::demo::MainWindow)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_demo_MainWindow_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_10)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_11)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
|
||||
CLASS_MEMBER_FIELD(sharedSizeFlowTabPage)
|
||||
CLASS_MEMBER_FIELD(sharedSizeListTabPage)
|
||||
END_CLASS_MEMBER(::demo::MainWindowConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::MyTextItem)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MyTextItem>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetChecked, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetName, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(SetChecked, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(SetName, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Checked)
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Name)
|
||||
CLASS_MEMBER_PROPERTY(Checked, GetChecked, SetChecked)
|
||||
CLASS_MEMBER_PROPERTY(Name, GetName, SetName)
|
||||
END_CLASS_MEMBER(::demo::MyTextItem)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::SharedSizeItemTemplate)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiControlTemplate)
|
||||
CLASS_MEMBER_BASE(::demo::SharedSizeItemTemplateConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::demo::SharedSizeItemTemplate*(::vl::Ptr<::demo::MyTextItem>), { L"__vwsn_ctor_parameter_ViewModel" })
|
||||
CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER)
|
||||
CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel)
|
||||
CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel)
|
||||
END_CLASS_MEMBER(::demo::SharedSizeItemTemplate)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::SharedSizeItemTemplateConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::SharedSizeItemTemplateConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_demo_SharedSizeItemTemplate_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(ViewModel)
|
||||
END_CLASS_MEMBER(::demo::SharedSizeItemTemplateConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::SharedSizeTextItemTemplate)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiTextListItemTemplate)
|
||||
CLASS_MEMBER_BASE(::demo::SharedSizeTextItemTemplateConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::demo::SharedSizeTextItemTemplate*(::vl::Ptr<::demo::MyTextItem>), { L"__vwsn_ctor_parameter_ViewModel" })
|
||||
CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER)
|
||||
CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel)
|
||||
CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel)
|
||||
END_CLASS_MEMBER(::demo::SharedSizeTextItemTemplate)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::SharedSizeTextItemTemplateConstructor)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::SharedSizeTextItemTemplateConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_demo_SharedSizeTextItemTemplate_Initialize, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(ViewModel)
|
||||
CLASS_MEMBER_FIELD(self)
|
||||
END_CLASS_MEMBER(::demo::SharedSizeTextItemTemplateConstructor)
|
||||
|
||||
#undef _
|
||||
class DemoTypeLoader : public Object, public ITypeLoader
|
||||
{
|
||||
public:
|
||||
void Load(ITypeManager* manager)
|
||||
{
|
||||
ADD_TYPE_INFO(::demo::EnglishNumbersController)
|
||||
ADD_TYPE_INFO(::demo::EnglishNumbersControllerConstructor)
|
||||
ADD_TYPE_INFO(::demo::EnglishNumbersControllerTabPage)
|
||||
ADD_TYPE_INFO(::demo::EnglishNumbersControllerTabPageConstructor)
|
||||
ADD_TYPE_INFO(::demo::MainWindow)
|
||||
ADD_TYPE_INFO(::demo::MainWindowConstructor)
|
||||
ADD_TYPE_INFO(::demo::MyTextItem)
|
||||
ADD_TYPE_INFO(::demo::SharedSizeItemTemplate)
|
||||
ADD_TYPE_INFO(::demo::SharedSizeItemTemplateConstructor)
|
||||
ADD_TYPE_INFO(::demo::SharedSizeTextItemTemplate)
|
||||
ADD_TYPE_INFO(::demo::SharedSizeTextItemTemplateConstructor)
|
||||
}
|
||||
|
||||
void Unload(ITypeManager* manager)
|
||||
{
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
bool LoadDemoTypes()
|
||||
{
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
if (auto manager = GetGlobalTypeManager())
|
||||
{
|
||||
return manager->AddTypeLoader(MakePtr<DemoTypeLoader>());
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
@@ -0,0 +1,63 @@
|
||||
/***********************************************************************
|
||||
!!!!!! DO NOT MODIFY !!!!!!
|
||||
|
||||
GacGen.exe Resource.xml
|
||||
|
||||
This file is generated by Workflow compiler
|
||||
https://github.com/vczh-libraries
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION
|
||||
#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION
|
||||
|
||||
#include "Demo.h"
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4250)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wparentheses-equality"
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wparentheses-equality"
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
Reflection
|
||||
***********************************************************************/
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace reflection
|
||||
{
|
||||
namespace description
|
||||
{
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
DECL_TYPE_INFO(::demo::EnglishNumbersController)
|
||||
DECL_TYPE_INFO(::demo::EnglishNumbersControllerConstructor)
|
||||
DECL_TYPE_INFO(::demo::EnglishNumbersControllerTabPage)
|
||||
DECL_TYPE_INFO(::demo::EnglishNumbersControllerTabPageConstructor)
|
||||
DECL_TYPE_INFO(::demo::MainWindow)
|
||||
DECL_TYPE_INFO(::demo::MainWindowConstructor)
|
||||
DECL_TYPE_INFO(::demo::MyTextItem)
|
||||
DECL_TYPE_INFO(::demo::SharedSizeItemTemplate)
|
||||
DECL_TYPE_INFO(::demo::SharedSizeItemTemplateConstructor)
|
||||
DECL_TYPE_INFO(::demo::SharedSizeTextItemTemplate)
|
||||
DECL_TYPE_INFO(::demo::SharedSizeTextItemTemplateConstructor)
|
||||
#endif
|
||||
|
||||
extern bool LoadDemoTypes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Binary file not shown.
Reference in New Issue
Block a user