#include "GuiContainerControls.h"
#ifndef VCZH_DEBUG_NO_REFLECTION
#include "../Reflection/TypeDescriptors/GuiReflectionPlugin.h"
#endif
namespace
{
namespace
{
using
namespace
compositions
;
namespace
{
bool
::
()
{
return
false
;
}
::
(
theme
::
)
:
(
)
{
}
::
()
{
();
}
*
::
()
{
return
;
}
bool
::
(
,
*
const
&
)
{
return
!
.
(
) &&
->
==
nullptr
;
}
void
::
(
,
*
const
&
)
{
->
=
;
->
(
false
);
->
->
(
(
0
,
0
,
0
,
0
));
->
->
(
->
);
if
(!
->
)
{
->
(
);
}
}
void
::
(
,
*
const
&
)
{
->
->
(
->
);
->
=
nullptr
;
if
(
.
() <=
1
)
{
->
(
nullptr
);
}
else
if
(
.
() >
+
1
)
{
->
(
+
1
]);
}
else
if
(
.
() ==
+
1
)
{
->
(
-
1
]);
}
}
::
(
*
)
:tab(
)
{
}
::
()
{
}
::
::
(
*
)
:tab(
)
{
}
::
::
()
{
}
void
::
::
(
,
bool
)
{
->
(
->
().
(
));
if
(
)
{
->
();
}
}
void
::
BeforeControlTemplateUninstalled_
()
{
auto
=
TypedControlTemplateObject
(
false
);
if
(!
ct
)
return
;
ct
->
(
nullptr
);
ct
->
(
nullptr
);
ct
->
(
nullptr
);
}
void
::
AfterControlTemplateInstalled_
(
bool
)
{
auto
=
TypedControlTemplateObject
(
true
);
ct
->
(
.
());
ct
->
(
.
());
ct
->
(
);
}
void
::
(
compositions
::
*
,
compositions
::
&
)
{
if
(
.
==
)
{
if
(
auto
=
TypedControlTemplateObject
(
false
))
{
=
.
(
);
if
(
index
!= -
1
)
{
auto
=
ct
->
();
=
0
;
switch
(
hint
)
{
case
::
:
if
(
.
::
)
tabOffset
= -
1
;
else
if
(
.
::
)
tabOffset
=
1
;
break
;
case
::
:
if
(
.
::
)
tabOffset
=
1
;
else
if
(
.
::
)
tabOffset
= -
1
;
break
;
case
::
:
if
(
.
::
)
tabOffset
= -
1
;
else
if
(
.
::
)
tabOffset
=
1
;
break
;
case
::
:
if
(
.
::
)
tabOffset
=
1
;
else
if
(
.
::
)
tabOffset
= -
1
;
break
;
default
:;
}
if
(
tabOffset
!=
0
)
{
.
=
true
;
index
+=
tabOffset
;
if
(
index
<
0
)
index
=
0
;
else
if
(
index
>=
.
())
index
=
.
() -
1
;
(
index
]);
}
}
}
}
}
::
(
theme
::
)
:
(
)
, tabPages(
this
)
{
new
(
this
);
(
);
->
()->
.
(
this
, &
::
);
}
::
()
{
}
collections
::
<
*>&
::
()
{
return
;
}
*
::
()
{
return
;
}
bool
::
(
*
)
{
if
(!
)
{
if
(
.
() ==
0
)
{
=
nullptr
;
}
}
else
if
(
->
() ==
this
)
{
if
(
==
)
{
return
true
;
}
=
;
FOREACH(GuiTabPage*, tabPage, tabPages)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
tabPage
);)
{
tabPage
->
(
tabPage
==
);
}
}
if
(
auto
=
TypedControlTemplateObject
(
false
))
{
ct
->
(
);
}
.
(
());
return
==
;
}
void
::
()
{
auto
=
TypedControlTemplateObject
(
false
);
if
(!
ct
)
return
;
if
(
auto
=
ct
->
())
{
scroll
->
.
(
);
}
if
(
auto
=
ct
->
())
{
scroll
->
.
(
);
}
ct
->
()->
.
(
);
ct
->
()->
.
(
);
ct
->
.
(
containerBoundsChangedHandler
);
nullptr
;
nullptr
;
nullptr
;
nullptr
;
containerBoundsChangedHandler
nullptr
;
=
false
;
}
void
::
(
bool
)
{
auto
=
TypedControlTemplateObject
(
true
);
if
(
auto
=
ct
->
())
{
scroll
->
.
(
this
, &
::
);
}
if
(
auto
=
ct
->
())
{
scroll
->
.
(
this
, &
::
);
}
ct
->
()->
.
(
this
, &
::
);
ct
->
()->
.
(
this
, &
::
);
containerBoundsChangedHandler
ct
->
.
(
this
, &
::
);
();
}
void
::
()
{
::
();
();
}
void
::
(
compositions
::
*
,
compositions
::
&
)
{
([=]()
{
();
});
}
void
::
(
compositions
::
*
,
compositions
::
&
)
{
if
(!
)
{
();
}
}
void
::
(
compositions
::
*
,
compositions
::
&
)
{
if
(!
)
{
();
}
}
void
::
(
compositions
::
*
,
compositions
::
&
)
{
if
(!
)
{
if
(
auto
=
TypedControlTemplateObject
(
true
)->
())
{
if
(
scroll
->
())
{
=
scroll
->
();
=
scroll
->
();
position
-=
move
*
.
/
60
;
scroll
->
(
position
);
}
}
}
}
void
::
(
compositions
::
*
,
compositions
::
&
)
{
if
(!
&&
())
{
if
(
auto
=
TypedControlTemplateObject
(
true
)->
())
{
if
(
scroll
->
())
{
=
scroll
->
();
=
scroll
->
();
position
-=
move
*
.
/
60
;
scroll
->
(
position
);
}
}
}
}
void
::
()
{
=
();
(
viewBounds
);
}
bool
::
(
)
{
auto
=
TypedControlTemplateObject
(
true
);
auto
=
ct
->
();
auto
=
ct
->
();
=
ct
->
()->
().
();
auto
=
hScroll
?
hScroll
->
() :
false
;
auto
=
vScroll
?
vScroll
->
() :
false
;
if
(
hScroll
)
{
if
(
.
<=
viewSize
.
)
{
hScroll
->
(
);
hScroll
->
(
false
);
hScroll
->
(
0
);
}
else
{
hScroll
->
(
true
);
hScroll
->
(
true
);
hScroll
->
(
.
);
hScroll
->
(
viewSize
.
);
}
}
if
(
vScroll
)
{
if
(
.
<=
viewSize
.
)
{
vScroll
->
(
);
vScroll
->
(
false
);
vScroll
->
(
0
);
}
else
{
vScroll
->
(
true
);
vScroll
->
(
true
);
vScroll
->
(
.
);
vScroll
->
(
viewSize
.
);
}
}
auto
=
hScroll
?
hScroll
->
() :
false
;
auto
=
vScroll
?
vScroll
->
() :
false
;
return
hVisible
!=
hVisible2
||
vVisible
!=
vVisible2
;
}
::
(
theme
::
)
:
(
)
{
->
.
(
this
, &
::
);
}
::
()
{
return
().
*
2
;
}
::
()
{
return
();
}
::
()
{
}
void
::
()
{
auto
=
TypedControlTemplateObject
(
true
);
auto
=
ct
->
();
auto
=
ct
->
();
if
(!
)
{
=
();
while
(
true
)
{
bool
=
false
;
bool
=
false
;
flagA
=
(
fullSize
);
bool
= (
hScroll
? !
hScroll
->
() :
true
) && (
vScroll
? !
vScroll
->
() :
true
);
if
(!
bothInvisible
)
{
flagB
=
(
fullSize
);
bothInvisible
= (
hScroll
? !
hScroll
->
() :
true
) && (
vScroll
? !
vScroll
->
() :
true
);
}
=
true
;
();
=
false
;
=
();
if
(
fullSize
newSize
)
{
=
();
=
();
if
(
hScroll
)
{
hScroll
->
(
smallMove
);
hScroll
->
(
bigMove
.
);
}
if
(
vScroll
)
{
vScroll
->
(
smallMove
);
vScroll
->
(
bigMove
.
);
}
if
(
bothInvisible
|| !
flagA
&& !
flagB
)
{
break
;
}
}
else
{
fullSize
newSize
;
}
}
}
}
::
()
{
=
TypedControlTemplateObject
(
true
)->
()->
().
();
return
viewSize
;
}
::
()
{
return
(
(),
());
}
::
()
{
auto
=
TypedControlTemplateObject
(
true
);
auto
=
ct
->
();
auto
=
ct
->
();
return
(
hScroll
?
hScroll
->
() :
0
,
vScroll
?
vScroll
->
() :
0
);
}
void
::
(
)
{
auto
=
TypedControlTemplateObject
(
true
);
if
(
auto
=
ct
->
())
{
hScroll
->
(
.
);
}
if
(
auto
=
ct
->
())
{
vScroll
->
(
.
);
}
}
*
::
()
{
return
TypedControlTemplateObject
(
true
)->
();
}
*
::
()
{
return
TypedControlTemplateObject
(
true
)->
();
}
bool
::
()
{
return
;
}
void
::
(
bool
)
{
if
(
!=
)
{
=
;
();
}
}
bool
::
()
{
return
;
}
void
::
(
bool
)
{
if
(
!=
)
{
=
;
();
}
}
::
()
{
return
->
().
();
}
void
::
(
)
{
auto
=
(-
.
, -
.
);
->
(
(
leftTop
,
(
0
,
0
)));
}
::
(
theme
::
)
:
(
)
{
->
(
(-
1
, -
1
, -
1
, -
1
));
(
(
0
,
0
,
0
,
0
));
}
::
()
{
}
bool
::
()
{
return
;
}
void
::
(
bool
)
{
if
(
!=
)
{
=
;
auto
=
->
();
if
(
)
{
->
(
(
0
,
margin
.
,
0
,
margin
.
));
}
else
{
->
(
(-
1
,
margin
.
, -
1
,
margin
.
));
}
}
}
bool
::
()
{
return
;
}
void
::
(
bool
)
{
if
(
!=
)
{
=
;
auto
=
->
();
if
(
)
{
->
(
(
margin
.
,
0
,
margin
.
,
0
));
}
else
{
->
(
(
margin
.
, -
1
,
margin
.
, -
1
));
}
}
}
}
}
}