Demo: GacUI_Layout\Responsive2

This commit is contained in:
Zihan Chen
2018-04-02 03:16:59 -07:00
parent 1edb89999c
commit 6809a9221e
20 changed files with 3752 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

@@ -0,0 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<Resource>
<Folder name="GacGenConfig">
<Folder name="Cpp">
<Text name="SourceFolder">Source</Text>
<Text name="Resource">..\..\UIRes\Responsive2.bin</Text>
<Text name="NormalInclude">GacUI.h</Text>
<Text name="Name">Demo</Text>
</Folder>
</Folder>
<Folder name="Images">
<Image name="_1" content="File">Images/1.png</Image>
<Image name="_2" content="File">Images/2.png</Image>
<Image name="_3" content="File">Images/3.png</Image>
<Image name="_4" content="File">Images/4.png</Image>
<Image name="_5" content="File">Images/5.png</Image>
<Image name="_6" content="File">Images/6.png</Image>
<Image name="_7" content="File">Images/7.png</Image>
<Image name="_8" content="File">Images/8.png</Image>
<Image name="Video" content="File">Images/Video.png</Image>
</Folder>
<Script name="ViewModelScript">
<Workflow>
<![CDATA[
module viewmodel;
using presentation::*;
using presentation::controls::*;
namespace demo
{
class AccountButtonViewModel
{
prop Controller: GuiSelectableButton::GroupController* = null {not observe}
prop Name: string = "" {not observe}
prop Image: INativeImage^ = null {not observe}
}
class VideoViewModel
{
prop Author: string = "" {}
prop Title: string = "" {}
prop Font: FontProperties = {} {}
}
}
]]>
</Workflow>
</Script>
<Instance name="AccountButtonTemplateResource">
<Instance ref.CodeBehind="false" ref.Class="demo::AccountButtonTemplate">
<ref.Members>
<![CDATA[
prop ViewModel: AccountButtonViewModel^ = null {}
]]>
</ref.Members>
<SelectableButtonTemplate ref.Name="self" MinSizeLimitation="LimitToElementAndChildren">
<att.ViewModel-bind>cast (AccountButtonViewModel^) self.Context</att.ViewModel-bind>
<SolidBackground Color-bind="cast Color (self.Selected ? '#FFFFFF' : self.State != ButtonState::Normal ? '#0000FF' : '#00000000')"/>
<ResponsiveView Direction="Horizontal" AlignmentToParent="left:0 top:0 right:0 bottom:0">
<att.Views>
<ResponsiveFixed>
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" CellPadding="5">
<att.Rows>
<CellOption>composeType:MinSize</CellOption>
</att.Rows>
<att.Columns>
<CellOption>composeType:MinSize</CellOption>
<CellOption>composeType:Percentage percentage:1.0</CellOption>
</att.Columns>
<Cell Site="row:0 column:0">
<ImageFrame FrameIndex="0" Image-bind="self.ViewModel.Image ?? null"/>
</Cell>
<Cell Site="row:0 column:1">
<SolidLabel Font-bind="self.Font" Text-bind="self.ViewModel.Name ?? ''" Color-bind="cast Color (self.Selected ? '#000000' : '#FFFFFF')">
<att.VerticalAlignment>Center</att.VerticalAlignment>
</SolidLabel>
</Cell>
</Table>
</ResponsiveFixed>
<ResponsiveFixed>
<Bounds AlignmentToParent="left:5 top:5 right:5 bottom:5" MinSizeLimitation="LimitToElementAndChildren">
<ImageFrame FrameIndex="0" Image-bind="self.ViewModel.Image ?? null"/>
</Bounds>
</ResponsiveFixed>
</att.Views>
</ResponsiveView>
</SelectableButtonTemplate>
</Instance>
</Instance>
<Instance name="AccountItemTemplateResource">
<Instance ref.CodeBehind="false" ref.Class="demo::AccountItemTemplate">
<ref.Parameter Name="ViewModel" Class="demo::AccountButtonViewModel"/>
<ControlTemplate MinSizeLimitation="LimitToElementAndChildren" AssociatedCursor-eval="INativeController::GetCurrentController().ResourceService().GetSystemCursor(Hand)">
<CheckBox ControlTemplate="demo::AccountButtonTemplate" Context-eval="ViewModel" GroupController-eval="ViewModel.Controller">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
</CheckBox>
</ControlTemplate>
</Instance>
</Instance>
<Instance name="AccountMenuItemTemplateResource">
<Instance ref.CodeBehind="false" ref.Class="demo::AccountMenuItemTemplate">
<ref.Parameter Name="ViewModel" Class="demo::AccountButtonViewModel"/>
<ControlTemplate MinSizeLimitation="LimitToElementAndChildren" AssociatedCursor-eval="INativeController::GetCurrentController().ResourceService().GetSystemCursor(Hand)">
<MenuItemButton Text-bind="ViewModel.Name">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
</MenuItemButton>
</ControlTemplate>
</Instance>
</Instance>
<Instance name="VideoItemTemplateResource">
<Instance ref.CodeBehind="false" ref.Class="demo::VideoItemTemplate">
<ref.Parameter Name="ViewModel" Class="demo::VideoViewModel"/>
<ControlTemplate ref.Name="self" MinSizeLimitation="LimitToElementAndChildren">
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" CellPadding="5">
<att.Rows>
<CellOption>composeType:MinSize</CellOption>
<CellOption>composeType:MinSize</CellOption>
<CellOption>composeType:MinSize</CellOption>
</att.Rows>
<att.Columns>
<CellOption>composeType:Percentage percentage:1.0</CellOption>
<CellOption>composeType:MinSize</CellOption>
<CellOption>composeType:MinSize</CellOption>
</att.Columns>
<Cell Site="row:0 column:0 columnSpan:3" PreferredMinSize="x:192 y:192">
<ImageFrame Stretch="true" FrameIndex="0" Image-uri="res://Images/Video"/>
</Cell>
<Cell Site="row:1 column:0 columnSpan:3">
<SolidLabel Font-bind="ViewModel.Font" Text-bind="ViewModel.Title" WrapLine="true" WrapLineHeightCalculation="true" Color="#FFFFFF"/>
</Cell>
<Cell Site="row:2 column:1">
<SolidLabel Font-bind="ViewModel.Font" Text="by:" Color="#808080"/>
</Cell>
<Cell Site="row:2 column:2">
<SolidLabel Font-bind="ViewModel.Font" Text-bind="ViewModel.Author" Color="#FFFFFF"/>
</Cell>
</Table>
</ControlTemplate>
</Instance>
</Instance>
<Instance name="MainWindowResource">
<Instance ref.CodeBehind="false" ref.Class="demo::MainWindow" xmlns:x="presentation::controls::GuiSelectableButton::*">
<ref.Members>
<![CDATA[
var accounts: observe AccountButtonViewModel^[] = {};
var videos: observe VideoViewModel^[] = {};
]]>
</ref.Members>
<ref.Ctor>
<![CDATA[
{
for (i in range [1, 8])
{
var item = new AccountButtonViewModel^();
item.Controller = self.accountController;
item.Name = Sys::LoremIpsumTitle(20);
item.Image = (cast (GuiImageData^) self.ResolveResource("res", $"Images/_$(i)", true)).Image;
self.accounts.Add(item);
}
for (i in range (0, 20))
{
var item = new VideoViewModel^();
item.Author = Sys::LoremIpsumTitle(16);
item.Title = Sys::LoremIpsumTitle(80);
item.Font = self.Font;
self.videos.Add(item);
}
}
]]>
</ref.Ctor>
<Window ref.Name="self" Text-format="Welcome to GacUI Video, $(Sys::LoremIpsumTitle(16))" ClientSize="x:800 y:600">
<x:MutexGroupController ref.Name="accountController"/>
<ResponsiveContainer AlignmentToParent="left:0 top:0 right:0 bottom:0">
<att.ResponsiveTarget>
<ResponsiveView Direction="Horizontal">
<att.SharedControls>
<ScrollContainer ref.Name="videoContainer" ExtendToFullWidth="true" HorizontalAlwaysVisible="false">
<RepeatFlow RowPadding="5" ColumnPadding="5">
<att.MinSizeLimitation>LimitToElementAndChildren</att.MinSizeLimitation>
<att.AlignmentToParent>left:0 top:0 right:0 bottom:0</att.AlignmentToParent>
<att.ItemSource-eval>self.videos</att.ItemSource-eval>
<att.ItemTemplate>demo::VideoItemTemplate</att.ItemTemplate>
</RepeatFlow>
</ScrollContainer>
</att.SharedControls>
<att.Views>
<ResponsiveGroup Direction="Horizontal">
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" CellPadding="5" MinSizeLimitation="LimitToElementAndChildren">
<att.Rows>
<CellOption>composeType:Percentage percentage:1.0</CellOption>
</att.Rows>
<att.Columns>
<CellOption>composeType:MinSize</CellOption>
<CellOption>composeType:Percentage percentage:1.0</CellOption>
</att.Columns>
<Cell Site="row:0 column:0">
<RepeatStack Direction="Vertical" Padding="5">
<att.MinSizeLimitation>LimitToElementAndChildren</att.MinSizeLimitation>
<att.AlignmentToParent>left:0 top:0 right:0 bottom:0</att.AlignmentToParent>
<att.ItemSource-eval>self.accounts</att.ItemSource-eval>
<att.ItemTemplate>demo::AccountItemTemplate</att.ItemTemplate>
</RepeatStack>
</Cell>
<Cell Site="row:0 column:1" PreferredMinSize="x:420">
<ResponsiveShared Shared-ref="videoContainer" AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
</Cell>
</Table>
</ResponsiveGroup>
<ResponsiveFixed>
<Table CellPadding="5" BorderVisible="false" AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
<att.Rows>
<CellOption>composeType:MinSize</CellOption>
<CellOption>composeType:Percentage percentage:1.0</CellOption>
</att.Rows>
<att.Columns>
<CellOption>composeType:Percentage percentage:1.0</CellOption>
</att.Columns>
<Cell Site="row:0 column:0">
<ToolstripMenuBar>
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
<MenuBarButton Text="Subscribed Accounts">
<att.SubMenu-set>
<RepeatStack Direction="Vertical">
<att.MinSizeLimitation>LimitToElementAndChildren</att.MinSizeLimitation>
<att.AlignmentToParent>left:0 top:0 right:0 bottom:0</att.AlignmentToParent>
<att.ItemSource-eval>self.accounts</att.ItemSource-eval>
<att.ItemTemplate>demo::AccountMenuItemTemplate</att.ItemTemplate>
</RepeatStack>
</att.SubMenu-set>
</MenuBarButton>
</ToolstripMenuBar>
</Cell>
<Cell Site="row:1 column:0">
<ResponsiveShared Shared-ref="videoContainer" AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
</Cell>
</Table>
</ResponsiveFixed>
</att.Views>
</ResponsiveView>
</att.ResponsiveTarget>
</ResponsiveContainer>
</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,244 @@
/***********************************************************************
!!!!!! 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::AccountButtonTemplate)
IMPL_CPP_TYPE_INFO(demo::AccountButtonTemplateConstructor)
IMPL_CPP_TYPE_INFO(demo::AccountButtonViewModel)
IMPL_CPP_TYPE_INFO(demo::AccountItemTemplate)
IMPL_CPP_TYPE_INFO(demo::AccountItemTemplateConstructor)
IMPL_CPP_TYPE_INFO(demo::AccountMenuItemTemplate)
IMPL_CPP_TYPE_INFO(demo::AccountMenuItemTemplateConstructor)
IMPL_CPP_TYPE_INFO(demo::MainWindow)
IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor)
IMPL_CPP_TYPE_INFO(demo::VideoItemTemplate)
IMPL_CPP_TYPE_INFO(demo::VideoItemTemplateConstructor)
IMPL_CPP_TYPE_INFO(demo::VideoViewModel)
#define _ ,
BEGIN_CLASS_MEMBER(::demo::AccountButtonTemplate)
CLASS_MEMBER_CONSTRUCTOR(::demo::AccountButtonTemplate*(), NO_PARAMETER)
CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER)
CLASS_MEMBER_METHOD(SetViewModel, { L"__vwsn_value_" })
CLASS_MEMBER_EVENT(ViewModelChanged)
CLASS_MEMBER_FIELD(__vwsn_prop_ViewModel)
CLASS_MEMBER_PROPERTY_EVENT(ViewModel, GetViewModel, SetViewModel, ViewModelChanged)
END_CLASS_MEMBER(::demo::AccountButtonTemplate)
BEGIN_CLASS_MEMBER(::demo::AccountButtonTemplateConstructor)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::AccountButtonTemplateConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { 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_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::AccountButtonTemplateConstructor)
BEGIN_CLASS_MEMBER(::demo::AccountButtonViewModel)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::AccountButtonViewModel>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(GetController, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetImage, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetName, NO_PARAMETER)
CLASS_MEMBER_METHOD(SetController, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetImage, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetName, { L"__vwsn_value_" })
CLASS_MEMBER_FIELD(__vwsn_prop_Controller)
CLASS_MEMBER_FIELD(__vwsn_prop_Image)
CLASS_MEMBER_FIELD(__vwsn_prop_Name)
CLASS_MEMBER_PROPERTY(Controller, GetController, SetController)
CLASS_MEMBER_PROPERTY(Image, GetImage, SetImage)
CLASS_MEMBER_PROPERTY(Name, GetName, SetName)
END_CLASS_MEMBER(::demo::AccountButtonViewModel)
BEGIN_CLASS_MEMBER(::demo::AccountItemTemplate)
CLASS_MEMBER_CONSTRUCTOR(::demo::AccountItemTemplate*(::vl::Ptr<::demo::AccountButtonViewModel>), { 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::AccountItemTemplate)
BEGIN_CLASS_MEMBER(::demo::AccountItemTemplateConstructor)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::AccountItemTemplateConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" })
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
CLASS_MEMBER_FIELD(ViewModel)
END_CLASS_MEMBER(::demo::AccountItemTemplateConstructor)
BEGIN_CLASS_MEMBER(::demo::AccountMenuItemTemplate)
CLASS_MEMBER_CONSTRUCTOR(::demo::AccountMenuItemTemplate*(::vl::Ptr<::demo::AccountButtonViewModel>), { 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::AccountMenuItemTemplate)
BEGIN_CLASS_MEMBER(::demo::AccountMenuItemTemplateConstructor)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::AccountMenuItemTemplateConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" })
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
CLASS_MEMBER_FIELD(ViewModel)
END_CLASS_MEMBER(::demo::AccountMenuItemTemplateConstructor)
BEGIN_CLASS_MEMBER(::demo::MainWindow)
CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_instance_ctor_, NO_PARAMETER)
CLASS_MEMBER_FIELD(accounts)
CLASS_MEMBER_FIELD(videos)
END_CLASS_MEMBER(::demo::MainWindow)
BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { 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(accountController)
CLASS_MEMBER_FIELD(self)
CLASS_MEMBER_FIELD(videoContainer)
END_CLASS_MEMBER(::demo::MainWindowConstructor)
BEGIN_CLASS_MEMBER(::demo::VideoItemTemplate)
CLASS_MEMBER_CONSTRUCTOR(::demo::VideoItemTemplate*(::vl::Ptr<::demo::VideoViewModel>), { 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::VideoItemTemplate)
BEGIN_CLASS_MEMBER(::demo::VideoItemTemplateConstructor)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::VideoItemTemplateConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { 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(__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(ViewModel)
CLASS_MEMBER_FIELD(self)
END_CLASS_MEMBER(::demo::VideoItemTemplateConstructor)
BEGIN_CLASS_MEMBER(::demo::VideoViewModel)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::VideoViewModel>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(GetAuthor, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetFont, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetTitle, NO_PARAMETER)
CLASS_MEMBER_METHOD(SetAuthor, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetFont, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetTitle, { L"__vwsn_value_" })
CLASS_MEMBER_EVENT(AuthorChanged)
CLASS_MEMBER_EVENT(FontChanged)
CLASS_MEMBER_EVENT(TitleChanged)
CLASS_MEMBER_FIELD(__vwsn_prop_Author)
CLASS_MEMBER_FIELD(__vwsn_prop_Font)
CLASS_MEMBER_FIELD(__vwsn_prop_Title)
CLASS_MEMBER_PROPERTY_EVENT(Author, GetAuthor, SetAuthor, AuthorChanged)
CLASS_MEMBER_PROPERTY_EVENT(Font, GetFont, SetFont, FontChanged)
CLASS_MEMBER_PROPERTY_EVENT(Title, GetTitle, SetTitle, TitleChanged)
END_CLASS_MEMBER(::demo::VideoViewModel)
#undef _
class DemoTypeLoader : public Object, public ITypeLoader
{
public:
void Load(ITypeManager* manager)
{
ADD_TYPE_INFO(::demo::AccountButtonTemplate)
ADD_TYPE_INFO(::demo::AccountButtonTemplateConstructor)
ADD_TYPE_INFO(::demo::AccountButtonViewModel)
ADD_TYPE_INFO(::demo::AccountItemTemplate)
ADD_TYPE_INFO(::demo::AccountItemTemplateConstructor)
ADD_TYPE_INFO(::demo::AccountMenuItemTemplate)
ADD_TYPE_INFO(::demo::AccountMenuItemTemplateConstructor)
ADD_TYPE_INFO(::demo::MainWindow)
ADD_TYPE_INFO(::demo::MainWindowConstructor)
ADD_TYPE_INFO(::demo::VideoItemTemplate)
ADD_TYPE_INFO(::demo::VideoItemTemplateConstructor)
ADD_TYPE_INFO(::demo::VideoViewModel)
}
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,64 @@
/***********************************************************************
!!!!!! 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::AccountButtonTemplate)
DECL_TYPE_INFO(::demo::AccountButtonTemplateConstructor)
DECL_TYPE_INFO(::demo::AccountButtonViewModel)
DECL_TYPE_INFO(::demo::AccountItemTemplate)
DECL_TYPE_INFO(::demo::AccountItemTemplateConstructor)
DECL_TYPE_INFO(::demo::AccountMenuItemTemplate)
DECL_TYPE_INFO(::demo::AccountMenuItemTemplateConstructor)
DECL_TYPE_INFO(::demo::MainWindow)
DECL_TYPE_INFO(::demo::MainWindowConstructor)
DECL_TYPE_INFO(::demo::VideoItemTemplate)
DECL_TYPE_INFO(::demo::VideoItemTemplateConstructor)
DECL_TYPE_INFO(::demo::VideoViewModel)
#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