#include "GuiBindableListControls.h"
namespace
{
namespace
{
namespace
{
using
namespace
collections
;
using
namespace
list
;
using
namespace
tree
;
using
namespace
reflection
::
description
;
using
namespace
templates
;
::
::
()
{
}
::
::
()
{
(
nullptr
);
}
<
description
::
>
::
::
()
{
return
;
}
void
::
::
(
<
description
::
>
)
{
=
0
;
if
(
)
{
oldCount
=
();
}
if
(
)
{
auto
=
.
<
>();
ol
.
(
);
}
nullptr
;
nullptr
;
if
(
)
{
if
(
auto
=
.
<
>())
{
ol
;
ol
.
([
this
](
,
,
)
{
(
start
,
oldCount
,
newCount
);
});
}
else
if
(
auto
=
.
<
>())
{
rl
;
}
else
{
::
(
<
>(
));
}
}
(
0
,
oldCount
,
?
() :
0
);
}
description
::
::
::
(
)
{
if
(!
)
return
();
return
(
);
}
void
::
::
()
{
(
0
,
(),
());
}
::
::
()
{
if
(!
)
return
0
;
return
();
}
::
::
(
)
{
if
(
)
{
if
(
0
<=
&&
<
())
{
return
(
(
),
);
}
}
return
L""
;
}
*
::
::
(
const
&
)
{
if
(
==
::
)
{
return
(
*)
this
;
}
else
{
return
0
;
}
}
description
::
::
::
(
)
{
if
(
)
{
if
(
0
<=
&&
<
())
{
return
(
);
}
}
return
();
}
bool
::
::
(
)
{
if
(
)
{
if
(
0
<=
&&
<
())
{
return
(
(
),
);
}
}
return
false
;
}
void
::
::
(
,
bool
)
{
if
(
)
{
if
(
0
<=
&&
<
())
{
auto
=
(
);
(
thisValue
,
,
);
(
,
1
,
1
);
}
}
}
::
(
theme
::
)
:
(
,
new
)
{
=
dynamic_cast
<
*>(
());
.
(
);
.
(
);
}
::
()
{
}
<
description
::
>
::
()
{
return
->
();
}
void
::
(
<
description
::
>
)
{
->
(
);
}
<
>
::
()
{
return
->
;
}
void
::
(
const
<
>&
)
{
if
(
->
)
{
->
;
->
();
.
(
());
}
}
<
bool
>
::
()
{
return
->
;
}
void
::
(
const
<
bool
>&
)
{
if
(
->
)
{
->
;
->
();
.
(
());
}
}
description
::
::
()
{
=
();
if
(
index
== -
1
)
return
();
return
->
(
index
);
}
::
::
()
:columns(
this
)
, dataColumns(
this
)
{
}
::
::
()
{
(
nullptr
);
}
<
description
::
>
::
::
()
{
return
;
}
void
::
::
(
<
description
::
>
)
{
=
0
;
if
(
)
{
oldCount
=
();
}
if
(
)
{
auto
=
.
<
>();
ol
.
(
);
}
nullptr
;
nullptr
;
if
(
)
{
if
(
auto
=
.
<
>())
{
ol
;
ol
.
([
this
](
,
,
)
{
(
start
,
oldCount
,
newCount
);
});
}
else
if
(
auto
=
.
<
>())
{
rl
;
}
else
{
::
(
<
>(
));
}
}
(
0
,
oldCount
,
?
() :
0
);
}
description
::
::
::
(
)
{
if
(!
)
return
();
return
(
);
}
void
::
::
()
{
(
0
,
(),
());
}
bool
::
::
(
,
)
{
if
(!
)
return
false
;
if
(
<
0
||
>=
() ||
<=
0
||
+
>
())
{
return
false
;
}
else
{
(
,
,
);
return
true
;
}
}
list
::
&
::
::
()
{
return
;
}
list
::
&
::
::
()
{
return
;
}
void
::
::
()
{
(
0
,
());
}
void
::
::
()
{
for
(
=
0
;
i
<
.
();
i
++)
{
i
]->
();
}
}
::
::
()
{
if
(!
)
return
0
;
return
();
}
::
::
(
)
{
return
(
);
}
description
::
::
::
(
)
{
if
(
)
{
if
(
0
<=
&&
<
())
{
return
(
);
}
}
return
();
}
*
::
::
(
const
&
)
{
if
(
==
::
)
{
return
(
*)
this
;
}
else
if
(
==
ListViewColumnItemArranger
::
::
)
{
return
(
ListViewColumnItemArranger
::
*)
this
;
}
else
{
return
0
;
}
}
<
>
::
::
(
)
{
if
(
)
{
if
(
0
<=
&&
<
())
{
return
(
(
),
);
}
}
return
nullptr
;
}
<
>
::
::
(
)
{
if
(
)
{
if
(
0
<=
&&
<
())
{
return
(
(
),
);
}
}
return
nullptr
;
}
::
::
(
)
{
if
(
)
{
if
(
0
<=
&&
<
() &&
.
()>
0
)
{
return
(
(
),
0
]
());
}
}
return
L""
;
}
::
::
(
,
)
{
if
(
)
{
if
(
0
<=
&&
<
() &&
0
<=
&&
<
.
() -
1
)
{
return
(
(
),
+
1
]
());
}
}
return
L""
;
}
::
::
()
{
return
.
();
}
::
::
(
)
{
return
];
}
::
::
()
{
return
.
();
}
::
::
(
)
{
if
(
<
0
||
>=
.
())
{
return
L""
;
}
else
{
return
]
();
}
}
bool
::
::
(
ListViewColumnItemArranger
::
*
)
{
if
(
.
(
))
{
return
false
;
}
else
{
.
(
);
return
true
;
}
}
bool
::
::
(
ListViewColumnItemArranger
::
*
)
{
=
.
(
);
if
(
index
== -
1
)
{
return
false
;
}
else
{
.
(
);
return
true
;
}
}
::
::
(
)
{
if
(
<
0
||
>=
.
())
{
return
0
;
}
else
{
return
]
();
}
}
void
::
::
(
,
)
{
if
(
>=
0
&&
<
.
())
{
]
(
);
}
}
*
::
::(
)
{
if
(
<
0
||
>=
.
())
{
return
0
;
}
else
{
return
]
();
}
}
::
::
(
)
{
if
(
<
0
||
>=
.
())
{
return
::
;
}
else
{
return
]
();
}
}
::
(
theme
::
)
:
(
,
new
)
{
=
dynamic_cast
<
*>(
());
LargeImagePropertyChanged
.
(
);
SmallImagePropertyChanged
.
(
);
}
::
()
{
}
list
::
&
::
()
{
return
->
();
}
list
::
&
::
()
{
return
->
();
}
<
description
::
>
::
()
{
return
->
();
}
void
::
(
<
description
::
>
)
{
->
(
);
}
<
<
>>
::
()
{
return
->
;
}
void
::
(
const
<
<
>>&
)
{
if
(
->
)
{
->
;
->
();
LargeImagePropertyChanged
.
(
());
}
}
<
<
>>
::
()
{
return
->
;
}
void
::
(
const
<
<
>>&
)
{
if
(
->
)
{
->
;
->
();
SmallImagePropertyChanged
.
(
());
}
}
description
::
::
()
{
=
();
if
(
index
== -
1
)
return
();
return
->
(
index
);
}
<
description
::
>
::
::
(
const
description
::
&
)
{
if
(
auto
=
(
,
->
))
{
if
(
auto
=
value
.Cast<
>())
{
return
ol
;
}
else
if
(
auto
=
value
.Cast<
>())
{
return
rl
;
}
else
{
return
::
(
<
>(
value
));
}
}
else
{
return
::
();
}
}
void
::
::
(
<
description
::
>
)
{
if
(!
)
{
;
if
(
auto
=
.
<
>())
{
ol
.
([
this
](
,
,
)
{
->
(
this
,
start
,
oldCount
,
newCount
);
.
(
start
,
oldCount
);
for
(
=
0
;
i
<
newCount
;
i
++)
{
=
(
start
+
i
);
auto
=
new
(
value
,
this
);
.
(
start
+
i
,
node
);
}
->
(
this
,
start
,
oldCount
,
newCount
);
});
}
=
();
for
(
=
0
;
i
<
count
;
i
++)
{
=
(
i
);
auto
=
new
(
value
,
this
);
.
(
node
);
}
}
}
void
::
::
()
{
if
(
)
{
auto
=
.
<
>();
ol
.
(
);
nullptr
;
}
nullptr
;
FOREACH(Ptr<ItemSourceNode>, node, children)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
node
);)
{
node
();
}
.
();
}
::
::
(
const
description
::
&
,
*
)
:itemSource(
)
, rootProvider(
->
)
, parent(
)
, callback(
->
)
{
}
::
::
(
*
)
:rootProvider(
)
, parent(
nullptr
)
, callback(
)
{
}
::
::
()
{
}
description
::
::
::
()
{
return
;
}
void
::
::
(
const
description
::
&
)
{
auto
=
(
);
=
?
() :
0
;
=
newVirtualList
();
->
(
this
,
0
,
oldCount
,
newCount
);
();
;
(
newVirtualList
);
->
(
this
,
0
,
oldCount
,
newCount
);
}
bool
::
::
()
{
return
this
==
->
.
() ?
true
:
;
}
void
::
::
(
bool
)
{
if
(
this
!=
->
.
() &&
!=
)
{
=
;
if
(
)
{
->
(
this
);
}
else
{
->
(
this
);
}
}
}
::
::
CalculateTotalVisibleNodes
()
{
if
(!
())
{
return
1
;
}
if
(!
)
{
(
(
));
}
=
1
;
FOREACH(Ptr<ItemSourceNode>, child, children)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
child
);)
{
count
+=
child
CalculateTotalVisibleNodes
();
}
return
count
;
}
::
::
()
{
if
(!
)
{
(
(
));
}
return
.
();
}
<
tree
::
>
::
::
()
{
return
;
}
<
tree
::
>
::
::
(
)
{
if
(!
)
{
(
(
));
}
if
(
0
<=
&&
<
.
())
{
return
];
}
return
nullptr
;
}
::
::
()
{
new
(
this
);
}
::
::
()
{
}
description
::
::
::
()
{
return
();
}
void
::
::
(
const
description
::
&
)
{
(
);
}
void
::
::
(
bool
)
{
=
();
if
(
)
{
();
}
=
();
(
.
(),
0
,
oldCount
,
newCount
);
(
.
(),
0
,
oldCount
,
newCount
);
}
<
tree
::
>
::
::
()
{
return
;
}
::
::
(
tree
::
*
)
{
return
(
(
),
);
}
description
::
::
::
(
tree
::
*
)
{
if
(
auto
=
dynamic_cast
<
*>(
))
{
return
itemSourceNode
->
();
}
return
();
}
*
::
::
(
const
&
)
{
if
(
==
::
)
{
return
(
*)
this
;
}
else
{
return
0
;
}
}
<
>
::
::
(
tree
::
*
)
{
if
(
auto
=
dynamic_cast
<
*>(
))
{
return
(
itemSourceNode
->
(),
);
}
return
nullptr
;
}
::
(
theme
::
)
:
(
,
new
)
{
=
dynamic_cast
<
*>(
());
.
(
);
.
(
);
.
(
);
}
::
()
{
}
description
::
::
()
{
return
->
();
}
void
::
(
description
::
)
{
->
(
);
}
<
>
::
()
{
return
->
;
}
void
::
(
const
<
>&
)
{
if
(
->
)
{
->
;
->
(
false
);
.
(
());
}
}
<
<
>>
::
()
{
return
->
;
}
void
::
(
const
<
<
>>&
)
{
if
(
->
)
{
->
;
->
(
false
);
.
(
());
}
}
<
<
>>
::
()
{
return
->
;
}
void
::
(
const
<
<
>>&
)
{
if
(
->
)
{
->
;
->
(
true
);
.
(
());
}
}
description
::
::
()
{
=
();
if
(
index
== -
1
)
return
();
;
if
(
auto
=
->
(
index
))
{
if
(
auto
=
node
.
<
>())
{
result
itemSourceNode
();
}
}
return
result
;
}
}
}
}