#include "GuiTextListControls.h"
#include "GuiListControlItemArrangers.h"
#include "../GuiButtonControls.h"
#include "../Templates/GuiThemeStyleFactory.h"
#include "../../GraphicsComposition/GuiGraphicsTableComposition.h"
namespace
{
namespace
{
namespace
{
using
namespace
collections
;
using
namespace
elements
;
using
namespace
compositions
;
using
namespace
reflection
::
description
;
namespace
{
const
wchar_t
*
const
::
=
L"vl::presentation::controls::list::ITextItemView"
;
<
DefaultTextListItemTemplate
::
>
DefaultTextListItemTemplate
::
()
{
return
{};
}
void
DefaultTextListItemTemplate
::
()
{
(
::
LimitToElementAndChildren
);
=
::
();
->
(
::
,
::
);
*
=
new
;
textComposition
->
(
);
textComposition
->
(
::
);
if
(
auto
=
())
{
=
new
(
theme
::
::
);
->
(
false
);
->
(
bulletStyleController
);
->
()->
(
(
0
,
0
,
0
,
0
));
->
.
(
this
, &
DefaultTextListItemTemplate
::
);
*
=
new
;
(
table
);
table
->
(
(
0
,
0
,
0
,
0
));
table
->
(
::
LimitToElementAndChildren
);
table
->
(
1
,
2
);
table
->
(
0
,
::
(
1.0
));
table
->
(
0
,
::
());
table
->
(
1
,
::
(
1.0
));
{
*
=
new
;
table
->
(
cell
);
cell
->
(
0
,
0
,
1
,
1
);
cell
->
(
->
());
}
{
*
=
new
;
table
->
(
cell
);
cell
->
(
0
,
1
,
1
,
1
);
cell
->
(
textComposition
);
textComposition
->
(
(
0
,
0
,
0
,
0
));
}
}
else
{
(
textComposition
);
textComposition
->
(
(
5
,
2
,
0
,
2
));
}
.
(
this
, &
DefaultTextListItemTemplate
::
);
.
(
this
, &
DefaultTextListItemTemplate
::
);
.
(
this
, &
DefaultTextListItemTemplate
::
);
.
(
this
, &
DefaultTextListItemTemplate
::
);
.
(
compositions
::
(
this
));
.
(
compositions
::
(
this
));
.
(
compositions
::
(
this
));
.
(
compositions
::
(
this
));
}
void
DefaultTextListItemTemplate
::
(
compositions
::
*
,
compositions
::
&
)
{
->
(
());
}
void
DefaultTextListItemTemplate
::
(
compositions
::
*
,
compositions
::
&
)
{
->
(
());
}
void
DefaultTextListItemTemplate
::
(
compositions
::
*
,
compositions
::
&
)
{
->
(
());
}
void
DefaultTextListItemTemplate
::
(
compositions
::
*
,
compositions
::
&
)
{
if
(
)
{
=
true
;
->
(
());
=
false
;
}
}
void
DefaultTextListItemTemplate
::
(
compositions
::
*
,
compositions
::
&
)
{
if
(!
)
{
if
(
auto
=
dynamic_cast
<
*>(
->
()->
(
::
)))
{
();
textItemView
->SetChecked(
(),
->
());
();
}
}
}
DefaultTextListItemTemplate
::
DefaultTextListItemTemplate
()
{
}
DefaultTextListItemTemplate
::
~
DefaultTextListItemTemplate
()
{
}
<
DefaultTextListItemTemplate
::
>
DefaultCheckTextListItemTemplate
::
()
{
if
(
auto
=
dynamic_cast
<
*>(
))
{
auto
=
textList
->
TypedControlTemplateObject
(
true
)->
();
if
(
style
)
return
style
;
}
return
theme
::
()->
(
theme
::
::
);
}
<
DefaultTextListItemTemplate
::
>
DefaultRadioTextListItemTemplate
::
()
{
if
(
auto
=
dynamic_cast
<
*>(
))
{
auto
=
textList
->
TypedControlTemplateObject
(
true
)->
();
if
(
style
)
return
style
;
}
return
theme
::
()->
(
theme
::
::
);
}
::
()
:owner(
0
)
, checked(
false
)
{
}
::
(
const
&
,
bool
)
:owner(
0
)
, text(
)
, checked(
)
{
}
::
()
{
}
bool
::
(
const
&
)
const
{
return
.
;
}
bool
::
(
const
&
)
const
{
return
.
;
}
const
&
::
()
{
return
;
}
void
::
(
const
&
)
{
if
(
!=
)
{
;
if
(
)
{
=
->
(
this
);
->
(
index
,
1
,
1
);
}
}
}
bool
::
()
{
return
;
}
void
::
(
bool
)
{
if
(
!=
)
{
=
;
if
(
)
{
=
->
(
this
);
->
(
index
,
1
,
1
);
;
arguments
.
=
index
;
->
->
.
(
arguments
);
}
}
}
void
::
(
,
const
<
>&
)
{
<
<
>>::
(
,
);
=
this
;
}
void
::
(
,
const
<
>&
)
{
=
0
;
<
<
>>::
(
,
);
}
::
(
)
{
return
(
)
();
}
description
::
::
(
)
{
return
::
(
(
));
}
bool
::
(
)
{
return
(
)
();
}
void
::
(
,
bool
)
{
return
(
)
(
);
}
::
()
:listControl(
0
)
{
}
::
()
{
}
*
::
(
const
&
)
{
if
(
==
::
)
{
return
(
*)
this
;
}
else
{
return
nullptr
;
}
}
}
void
::
BeforeControlTemplateUninstalled_
()
{
}
void
::
AfterControlTemplateInstalled_
(
bool
)
{
}
void
::
(
,
*
)
{
::
(
,
);
if
(
auto
=
dynamic_cast
<
templates
::
*>(
))
{
textItemStyle
->
(
TypedControlTemplateObject
(
true
)->
());
if
(
auto
=
dynamic_cast
<
list
::
*>(
(
list
::
::
)))
{
textItemStyle
->
(
textItemView
->GetChecked(
));
}
}
}
void
::
(
compositions
::
*
,
compositions
::
&
)
{
=
::
;
}
::
(
theme
::
,
::
*
)
:
(
,
)
{
.
(
this
, &
::
);
.
(
);
(
::
);
}
::
()
{
}
::
()
{
return
;
}
void
::
(
)
{
switch
(
)
{
case
::
:
(
[](
const
&) {
return
new
list
::
DefaultTextListItemTemplate
; },
new
list
::
);
break
;
case
::
:
(
[](
const
&) {
return
new
list
::
DefaultCheckTextListItemTemplate
; },
new
list
::
);
break
;
case
::
:
(
[](
const
&) {
return
new
list
::
DefaultRadioTextListItemTemplate
; },
new
list
::
);
break
;
default
:;
}
=
;
}
::
(
theme
::
)
:
(
,
new
list
::
)
{
=
dynamic_cast
<
list
::
*>(
.
());
->
=
this
;
}
::
()
{
}
list
::
&
::
()
{
return
*
;
}
<
list
::
>
::
()
{
=
();
if
(
index
== -
1
)
return
0
;
return
->
(
index
);
}
}
}
}