#include "../../Resources/GuiResource.h"
#include "../WorkflowCodegen/GuiInstanceLoader_WorkflowCodegen.h"
#ifndef VCZH_PRESENTATION_REFLECTION_INSTANCELOADERS_GUIINSTANCELOADER_TEMPLATECONTROL
#define VCZH_PRESENTATION_REFLECTION_INSTANCELOADERS_GUIINSTANCELOADER_TEMPLATECONTROL
namespace
{
namespace
{
namespace
{
using
namespace
collections
;
using
namespace
reflection
::
description
;
using
namespace
controls
;
using
namespace
compositions
;
using
namespace
theme
;
using
namespace
helper_types
;
using
namespace
elements
;
using
namespace
compositions
;
using
namespace
controls
;
using
namespace
templates
;
using
namespace
workflow
;
using
namespace
workflow
::
analyzer
;
#ifndef VCZH_DEBUG_NO_REFLECTION
/***********************************************************************
GuiVrtualTypeInstanceLoader
***********************************************************************/
template
<
typename
>
class
GuiTemplateControlInstanceLoader
:
public
,
public
{
typedef
<
>
(
&);
typedef
void
(
const
&,
<
>);
typedef
<
>
;
typedef
<
>
;
protected
:
;
theme
::
;
;
;
virtual
void
(
types
::
&
,
const
&
,
,
&
,
::
&
,
<
>
)
{
}
public
:
static
<
>
(
theme
::
)
{
auto
=
<
>();
refExpr
GetExpressionFromTypeDescriptor
(
description
::
<
>());
switch
(
)
{
#define THEME_NAME_CASE(TEMPLATE, CONTROL) case theme::ThemeName::CONTROL: refExpr->name.value = L ## #CONTROL; break;
GUI_CONTROL_TEMPLATE_TYPES(THEME_NAME_CASE)
case
theme
::
::
:
refExpr
.
=
L"Window"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"CustomControl"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"Tooltip"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"Label"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"ShortcutKey"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"ScrollView"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"GroupBox"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"Tab"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"ComboBox"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"MultilineTextBox"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"SinglelineTextBox"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"DocumentViewer"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"DocumentLabel"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"DocumentTextBox"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"ListView"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"TreeView"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"TextList"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"ListItemBackground"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"TreeItemExpander"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"CheckTextListItem"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RadioTextListItem"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"Menu"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"MenuBar"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"MenuSplitter"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"MenuBarButton"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"MenuItemButton"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"ToolstripToolBar"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"ToolstripButton"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"ToolstripDropdownButton"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"ToolstripSplitButton"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"ToolstripSplitter"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonTab"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonGroup"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonIconLabel"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonSmallIconLabel"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonButtons"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonToolstrips"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonGallery"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonToolstripMenu"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonGalleryList"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonGalleryItemList"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonSmallButton"
;
break
;
case
theme
::
::
RibbonSmallDropdownButton
:
refExpr
.
=
L"RibbonSmallDropdownButton"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonSmallSplitButton"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonLargeButton"
;
break
;
case
theme
::
::
RibbonLargeDropdownButton
:
refExpr
.
=
L"RibbonLargeDropdownButton"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonLargeSplitButton"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonSplitter"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RibbonToolstripHeader"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"Button"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"CheckBox"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"RadioButton"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"DatePicker"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"DateComboBox"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"HScroll"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"VScroll"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"HTracker"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"VTracker"
;
break
;
case
theme
::
::
:
refExpr
.
=
L"ProgressBar"
;
break
;
#undef THEME_NAME_CASE
default
:
CHECK_FAIL(L"GuiTemplateControlInstanceLoader::CreateThemeName()#Unknown theme name.");
do
{
throw
(
L"GuiTemplateControlInstanceLoader::CreateThemeName()#Unknown theme name."
);}
while
(
0
);
}
return
refExpr
;
}
public
:
GuiTemplateControlInstanceLoader
(
const
&
,
theme
::
,
*
=
nullptr
,
*
=
nullptr
)
:typeName(
::
(
))
, themeName(
)
{
if
(
)
;
if
(
)
;
}
()
override
{
return
;
}
bool
(
const
&
)
override
{
return
.
;
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
types
::
&
,
const
&
,
&
,
::
&
)
override
{
auto
=
<
>();
createControl
(
<
>::
().
());
createControl
.
(
(
));
return
createControl
;
}
<
workflow
::
>
(
GuiResourcePrecompileContext
&
,
types
::
&
,
const
&
,
,
&
,
,
::
&
)
override
{
CHECK_ERROR(CanCreate(typeInfo), L"GuiTemplateControlInstanceLoader::CreateInstance()#Wrong type info is provided.");
do
{
if
(!(
(
)))
throw
(
L"GuiTemplateControlInstanceLoader::CreateInstance()#Wrong type info is provided."
);}
while
(
0
);
auto
=
<
>();
{
auto
=
<
*>::
();
auto
=
<
>();
createControl
(
controlType
.
());
createControl
.
(
(
));
if
(
)
{
createControl
.
(
));
}
(
,
,
,
,
,
createControl
);
auto
=
<
>();
refVariable
.
.
();
auto
=
<
>();
assignExpr
=
::
;
assignExpr
refVariable
;
assignExpr
createControl
;
auto
=
<
>();
assignStat
assignExpr
;
block
.
(
assignStat
);
}
if
(
)
{
.
(),
block
);
}
return
block
;
}
};
#endif
}
}
}
#endif