#include "GuiGraphicsSharedSizeComposition.h"
namespace
{
namespace
{
namespace
{
using
namespace
reflection
::
description
;
using
namespace
collections
;
using
namespace
controls
;
using
namespace
elements
;
void
GuiSharedSizeItemComposition
::
()
{
if
(
)
{
->
ForceCalculateSizeImmediately
();
}
InvokeOnCompositionStateChanged
();
}
void
GuiSharedSizeItemComposition
::
()
{
::
();
if
(
)
{
->
.
(
this
);
=
nullptr
;
}
auto
=
();
while
(
current
)
{
if
(
auto
=
dynamic_cast
<
GuiSharedSizeItemComposition
*>(
current
))
{
break
;
}
else
if
(
auto
=
dynamic_cast
<
GuiSharedSizeRootComposition
*>(
current
))
{
=
root
;
break
;
}
current
=
current
->
();
}
if
(
)
{
->
.
(
this
);
;
if
(
)
{
=
->
.
().
(
);
if
(
index
!= -
1
)
{
minSize
.
=
->
.
()
index
];
}
}
if
(
)
{
=
->
.
().
(
);
if
(
index
!= -
1
)
{
minSize
.
=
->
.
()
index
];
}
}
(
minSize
);
}
}
GuiSharedSizeItemComposition
::
GuiSharedSizeItemComposition
()
{
(
::
LimitToElementAndChildren
);
}
GuiSharedSizeItemComposition
::
~
GuiSharedSizeItemComposition
()
{
}
const
&
GuiSharedSizeItemComposition
::
()
{
return
;
}
void
GuiSharedSizeItemComposition
::
(
const
&
)
{
if
(
!=
)
{
;
();
}
}
bool
GuiSharedSizeItemComposition
::
()
{
return
;
}
void
GuiSharedSizeItemComposition
::
(
bool
)
{
if
(
!=
)
{
=
;
();
}
}
bool
GuiSharedSizeItemComposition
::
()
{
return
;
}
void
GuiSharedSizeItemComposition
::
(
bool
)
{
if
(
!=
)
{
=
;
();
}
}
void
GuiSharedSizeRootComposition
::
(
collections
::
<
,
>&
,
const
&
,
)
{
=
.
().
(
);
if
(
index
== -
1
)
{
.
(
,
);
}
else
if
(
.
().
(
index
) <
)
{
.
(
,
);
}
}
void
GuiSharedSizeRootComposition
::
(
collections
::
<
,
>&
,
collections
::
<
,
>&
)
{
FOREACH(GuiSharedSizeItemComposition*, item, childItems)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
GuiSharedSizeItemComposition
*>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
GuiSharedSizeItemComposition
*
;
__foreach_iterator__
.
(
item
);)
{
auto
=
item
->
();
auto
=
item
->
();
item
->
(
(
0
,
0
));
auto
=
item
->
().
();
if
(
item
->
())
{
(
,
group
,
size
.
);
}
if
(
item
->
())
{
(
,
group
,
size
.
);
}
item
->
(
minSize
);
}
}
void
GuiSharedSizeRootComposition
::
(
collections
::
<
,
>&
,
collections
::
<
,
>&
)
{
FOREACH(GuiSharedSizeItemComposition*, item, childItems)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
GuiSharedSizeItemComposition
*>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
GuiSharedSizeItemComposition
*
;
__foreach_iterator__
.
(
item
);)
{
auto
=
item
->
();
auto
=
item
->
();
if
(
item
->
())
{
size
.
=
group
];
}
if
(
item
->
())
{
size
.
=
group
];
}
item
->
(
size
);
}
}
GuiSharedSizeRootComposition
::
GuiSharedSizeRootComposition
()
{
}
GuiSharedSizeRootComposition
::
~
GuiSharedSizeRootComposition
()
{
}
void
GuiSharedSizeRootComposition
::
()
{
.
();
.
();
(
,
);
(
,
);
::
ForceCalculateSizeImmediately
();
}
GuiSharedSizeRootComposition
::
()
{
<
,
>
,
;
(
widths
,
heights
);
bool
=
(
,
widths
) !=
0
||
(
,
heights
) !=
0
;
if
(
minSizeModified
)
{
(
,
widths
);
(
,
heights
);
(
,
);
::
ForceCalculateSizeImmediately
();
}
return
::
();
}
}
}
}