#include "GuiInstanceLoader_TemplateControl.h"
#ifndef VCZH_DEBUG_NO_REFLECTION
namespace
{
namespace
{
namespace
{
template
<
typename
>
<
>
CreateSetControlTemplateStyle
(
types
::
&
,
,
<
>
,
const
&
)
{
auto
=
<
>();
createStyle
(
<
<
>>::
().
());
createStyle
.
(
);
auto
=
<
>();
refControl
.
.
();
auto
=
<
>();
refStyleProvider
refControl
;
refStyleProvider
.
;
auto
=
<
>();
assign
=
::
;
assign
refStyleProvider
;
assign
createStyle
;
auto
=
<
>();
stat
assign
;
return
stat
;
}
#define BASE_TYPE GuiTemplateControlInstanceLoader<GuiComboBoxListControl>
class GuiComboBoxInstanceLoader : public BASE_TYPE
class
GuiComboBoxInstanceLoader
:
public
GuiTemplateControlInstanceLoader
<
>
{
protected
:
;
void
(
types
::
&
,
const
&
,
,
&
,
::
&
,
<
>
)
override
{
=
.
().
(
);
if
(
indexListControl
!= -
1
)
{
.
(
.
(
indexListControl
)
0
].
);
}
}
public
:
GuiComboBoxInstanceLoader
()
:BASE_TYPE(L"presentation::controls::GuiComboBox", theme::ThemeName::ComboBox)
:
GuiTemplateControlInstanceLoader
<
>(
L"presentation::controls::GuiComboBox"
,
theme
::
::
)
{
=
::
(
L"ListControl"
);
}
void
(
const
&
,
collections
::
<
>&
)
override
{
if
(
(
))
{
.
(
);
}
BASE_TYPE::GetRequiredPropertyNames(typeInfo, propertyNames);
GuiTemplateControlInstanceLoader
<
>::
(
,
);
}
void
(
const
&
,
collections
::
<
>&
)
override
{
(
,
);
BASE_TYPE::GetPropertyNames(typeInfo, propertyNames);
GuiTemplateControlInstanceLoader
<
>::
(
,
);
}
<
>
(
const
&
)
override
{
if
(
.
)
{
auto
=
::
(
<
*>::
());
info
=
::
;
return
info
;
}
return BASE_TYPE::GetPropertyType(propertyInfo);
return
GuiTemplateControlInstanceLoader
<
>::
(
);
}
};
#undef BASE_TYPE
#define BASE_TYPE GuiTemplateControlInstanceLoader<TControl>
template
<
typename
>
class GuiTreeViewInstanceLoaderBase : public BASE_TYPE
class
GuiTreeViewInstanceLoaderBase
:
public
GuiTemplateControlInstanceLoader
<
>
{
protected
:
bool
;
;
public
:
GuiTreeViewInstanceLoaderBase
(
bool
)
:BASE_TYPE(description::TypeInfo<TControl>::content.typeName, theme::ThemeName::TreeView)
:
GuiTemplateControlInstanceLoader
<
>(
description
::
<
>::
.typeName,
theme
::
::
)
, bindable(
)
{
=
::
(
L"Nodes"
);
}
void GetPropertyNames(const typename BASE_TYPE::TypeInfo& typeInfo, collections::List<GlobalStringKey>& propertyNames)override
void
(
const
typename
GuiTemplateControlInstanceLoader
<
>::
&
,
collections
::
<
>&
)
override
{
if
(!
)
{
.
(
);
}
BASE_TYPE::GetPropertyNames(typeInfo, propertyNames);
GuiTemplateControlInstanceLoader
<
>::
(
,
);
}
Ptr<GuiInstancePropertyInfo> GetPropertyType(const typename BASE_TYPE::PropertyInfo& propertyInfo)override
<
>
(
const
typename
GuiTemplateControlInstanceLoader
<
>::
&
)
override
{
if
(
.
)
{
if
(!
)
{
return
::
(
<
<
tree
::
>>::
());
}
}
return BASE_TYPE::GetPropertyType(propertyInfo);
return
GuiTemplateControlInstanceLoader
<
>::
(
);
}
Ptr<workflow::WfStatement> AssignParameters(GuiResourcePrecompileContext& precompileContext, types::ResolvingResult& resolvingResult, const typename BASE_TYPE::TypeInfo& typeInfo, GlobalStringKey variableName, typename BASE_TYPE::ArgumentMap& arguments, GuiResourceTextPos attPosition, GuiResourceError::List& errors)override
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
types
::
&
,
const
typename
GuiTemplateControlInstanceLoader
<
>::
&
,
,
typename
GuiTemplateControlInstanceLoader
<
>::
&
,
,
::
&
)
override
{
auto
=
<
>();
FOREACH_INDEXER(GlobalStringKey, prop, index, arguments.Keys())
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
.
());
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
if
(
bool
=
true
)
for
(
=
0
;
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
prop
);
index
++)
{
if
(
prop
)
{
auto
=
<
>();
refControl
.
.
();
auto
=
<
>();
refNodes
refControl
;
refNodes
.
=
L"Nodes"
;
auto
=
<
>();
refChildren
refNodes
;
refChildren
.
=
L"Children"
;
auto
=
<
>();
refAdd
refChildren
;
refAdd
.
=
L"Add"
;
auto
=
<
>();
call
refAdd
;
call
.
(
.
(
index
)
0
].
);
auto
=
<
>();
stat
call
;
block
.
(
stat
);
}
}
if
(
block
.
() >
0
)
{
return
block
;
}
return BASE_TYPE::AssignParameters(precompileContext, resolvingResult, typeInfo, variableName, arguments, attPosition, errors);
return
GuiTemplateControlInstanceLoader
<
>::
(
,
,
,
,
,
,
);
}
};
#undef BASE_TYPE
class
GuiTreeViewInstanceLoader
:
public
GuiTreeViewInstanceLoaderBase
<
>
{
public
:
GuiTreeViewInstanceLoader
()
:
GuiTreeViewInstanceLoaderBase
<
>(
false
)
{
}
};
class
GuiBindableTreeViewInstanceLoader
:
public
GuiTreeViewInstanceLoaderBase
<
>
{
public
:
GuiBindableTreeViewInstanceLoader
()
:
GuiTreeViewInstanceLoaderBase
<
>(
true
)
{
}
};
class
GuiTreeNodeInstanceLoader
:
public
,
public
{
protected
:
;
,
,
;
public
:
GuiTreeNodeInstanceLoader
()
:typeName(
::
(
L"presentation::controls::tree::TreeNode"
))
{
=
::
(
L"Text"
);
=
::
(
L"Image"
);
=
::
(
L"Tag"
);
}
()
override
{
return
;
}
void
(
const
&
,
collections
::
<
>&
)
override
{
.
(
);
.
(
);
.
(
);
.
(
::
);
}
<
>
(
const
&
)
override
{
if
(
.
)
{
auto
=
::
(
<
>::
());
info
=
::
;
info
=
::
;
return
info
;
}
else
if
(
.
)
{
auto
=
::
(
<
<
>>::
());
info
=
::
;
info
=
::
;
return
info
;
}
else
if
(
.
)
{
return
::
(
<
>::
());
}
else
if
(
.
==
::
)
{
return
::
(
<
<
tree
::
>>::
());
}
return
::
(
);
}
bool
(
const
&
)
override
{
return
.
();
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
types
::
&
,
const
&
,
,
&
,
,
::
&
)
override
{
if
(
(
))
{
auto
=
<
>();
createItem
(
<
<
tree
::
>>::
().
());
=
.
().
(
);
=
.
().
(
);
if
(
imageIndex
!= -
1
||
textIndex
!= -
1
)
{
if
(
imageIndex
== -
1
)
{
auto
=
<
>();
nullExpr
=
::
;
createItem
.
(
nullExpr
);
}
else
{
createItem
.
(
.
(
imageIndex
)
0
].
);
}
if
(
textIndex
== -
1
)
{
createItem
.
(
<
>());
}
else
{
createItem
.
(
.
(
textIndex
)
0
].
);
}
}
auto
=
<
>();
createNode
(
<
<
tree
::
>>::
().
());
createNode
.
(
createItem
);
auto
=
<
>();
refNode
.
.
();
auto
=
<
>();
assign
=
::
;
assign
refNode
;
assign
createNode
;
auto
=
<
>();
stat
assign
;
return
stat
;
}
return
nullptr
;
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
types
::
&
,
const
&
,
,
&
,
,
::
&
)
override
{
auto
=
<
>();
FOREACH_INDEXER(GlobalStringKey, prop, index, arguments.Keys())
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
>&
= ::
vl
::
collections
::
(
.
());
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
if
(
bool
=
true
)
for
(
=
0
;
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
;
__foreach_iterator__
.
(
prop
);
index
++)
{
if
(
prop
==
::
)
{
auto
=
<
>();
refNode
.
.
();
auto
=
<
>();
refChildren
refNode
;
refChildren
.
=
L"Children"
;
auto
=
<
>();
refAdd
refChildren
;
refAdd
.
=
L"Add"
;
auto
=
<
>();
call
refAdd
;
call
.
(
.
(
index
)
0
].
);
auto
=
<
>();
stat
call
;
block
.
(
stat
);
}
else
if
(
prop
)
{
{
auto
=
<
>();
refNode
.
.
();
auto
=
<
>();
refData
refNode
;
refData
.
=
L"Data"
;
auto
=
<
>();
castExpr
=
::
;
castExpr
(
<
<
tree
::
>>::
().
());
castExpr
refData
;
auto
=
<
>();
refProp
castExpr
;
refProp
.
=
L"tag"
;
auto
=
<
>();
assign
=
::
;
assign
refProp
;
assign
.
(
index
)
0
].
;
auto
=
<
>();
stat
assign
;
block
.
(
stat
);
}
if
(
prop
)
{
auto
=
<
>();
refNode
.
.
();
auto
=
<
>();
refNotifyDataModified
refNode
;
refNotifyDataModified
.
=
L"NotifyDataModified"
;
auto
=
<
>();
call
refNotifyDataModified
;
auto
=
<
>();
stat
call
;
block
.
(
stat
);
}
}
}
if
(
block
.
() >
0
)
{
return
block
;
}
return
nullptr
;
}
};
#define BASE_TYPE GuiTemplateControlInstanceLoader<GuiBindableDataGrid>
class GuiBindableDataGridInstanceLoader : public BASE_TYPE
class
GuiBindableDataGridInstanceLoader
:
public
GuiTemplateControlInstanceLoader
<
>
{
protected
:
;
public
:
GuiBindableDataGridInstanceLoader
()
:BASE_TYPE(description::TypeInfo<GuiBindableDataGrid>::content.typeName, theme::ThemeName::ListView)
:
GuiTemplateControlInstanceLoader
<
>(
description
::
<
>::
.typeName,
theme
::
::
)
{
=
::
(
description
::
<
>::
.typeName);
}
()
override
{
return
;
}
};
#undef BASE_TYPE
void
(
IGuiInstanceLoaderManager
*
)
{
->
(
::
(
description
::
<
>::
.typeName),
new
GuiComboBoxInstanceLoader
);
->
(
new
GuiTreeViewInstanceLoader
);
->
(
new
GuiBindableTreeViewInstanceLoader
);
->
(
new
GuiBindableDataGridInstanceLoader
);
->
(
::
(
description
::
<
tree
::
>::
.typeName),
new
GuiTreeNodeInstanceLoader
);
}
}
}
}
#endif