#include "GuiGraphicsFlowComposition.h"
namespace
{
namespace
{
namespace
{
using
namespace
collections
;
void
::
(
bool
)
{
if
(
||
)
{
=
false
;
InvokeOnCompositionStateChanged
();
auto
=
RealMarginToVirtualMargin
(
);
if
(
clientMargin
.
<
0
)
clientMargin
.
=
0
;
if
(
clientMargin
.
<
0
)
clientMargin
.
=
0
;
if
(
clientMargin
.
<
0
)
clientMargin
.
=
0
;
if
(
clientMargin
.
<
0
)
clientMargin
.
=
0
;
auto
=
.
();
auto
=
(
realFullSize
);
clientSize
.
-= (
clientMargin
.
+
clientMargin
.
);
clientSize
.
-= (
clientMargin
.
+
clientMargin
.
);
.
(
.
());
for
(
=
0
;
i
<
.
();
i
++)
{
i
]
(
(
0
,
0
),
i
]->
());
}
=
0
;
=
0
;
while
(
currentIndex
<
.
())
{
auto
=
(
currentIndex
].
());
=
itemSize
.
;
=
itemSize
.
;
=
1
;
for
(
=
currentIndex
+
1
;
i
<
.
();
i
++)
{
itemSize
(
i
].
());
=
itemSize
.
+
;
if
(
rowWidth
+
itemWidth
>
clientSize
.
)
{
break
;
}
rowWidth
+=
itemWidth
;
if
(
rowHeight
<
itemSize
.
)
{
rowHeight
=
itemSize
.
;
}
rowItemCount
++;
}
=
0
;
<
>
(
rowItemCount
);
for
(
=
0
;
i
<
rowItemCount
;
i
++)
{
=
currentIndex
+
i
;
=
0
;
itemSize
(
index
].
());
auto
=
index
]->
();
switch
(
option
.
)
{
case
::
:
itemBaseLine
=
option
.
;
break
;
case
::
:
itemBaseLine
=
itemSize
.
-
option
.
;
break
;
case
::
:
itemBaseLine
= (
)(
itemSize
.
*
option
.
);
break
;
}
itemBaseLines
i
] =
itemBaseLine
;
if
(
baseLine
<
itemBaseLine
)
{
baseLine
=
itemBaseLine
;
}
}
=
0
;
for
(
=
0
;
i
<
rowItemCount
;
i
++)
{
=
currentIndex
+
i
;
itemSize
(
index
].
());
=
0
;
=
rowTop
+
baseLine
-
itemBaseLines
i
];
switch
(
)
{
case
::
:
itemLeft
=
rowUsedWidth
+
i
*
;
break
;
case
::
:
itemLeft
=
rowUsedWidth
+
i
*
+ (
clientSize
.
-
rowWidth
) /
2
;
break
;
case
::
:
if
(
i
==
0
)
{
itemLeft
=
rowUsedWidth
;
}
else
{
itemLeft
=
rowUsedWidth
+ (
)((
double
)(
clientSize
.
-
rowWidth
) *
i
/ (
rowItemCount
-
1
)) +
i
*
;
}
break
;
}
index
]
(
realFullSize
,
(
(
itemLeft
+
clientMargin
.
,
itemTop
+
clientMargin
.
),
itemSize
)
);
rowUsedWidth
+=
itemSize
.
;
}
rowTop
+=
rowHeight
+
;
currentIndex
+=
rowItemCount
;
}
=
rowTop
==
0
?
0
:
rowTop
-
;
}
}
void
::
(
*
,
&
)
{
(
true
);
}
void
::
(
*
)
{
::
(
);
auto
=
dynamic_cast
<
*>(
);
if
(
item
&& !
.
(
item
))
{
.
(
item
);
=
true
;
}
}
void
::
(
*
)
{
::
(
);
auto
=
dynamic_cast
<
*>(
);
if
(
item
)
{
.
(
item
);
=
true
;
}
}
::
()
:axis(
new
)
{
.
(
this
, &
::
);
}
::
()
{
}
const
::
&
::
()
{
return
;
}
bool
::
(
,
*
)
{
=
.
(
,
);
if
(!
(
))
{
.
(
);
return
false
;
}
else
{
=
true
;
return
true
;
}
}
::()
{
return
;
}
void
::(
)
{
;
=
true
;
InvokeOnCompositionStateChanged
();
}
::
()
{
return
;
}
void
::
(
)
{
=
;
=
true
;
InvokeOnCompositionStateChanged
();
}
::
()
{
return
;
}
void
::
(
)
{
=
;
=
true
;
InvokeOnCompositionStateChanged
();
}
<
>
::
()
{
return
;
}
void
::
(
<
>
)
{
if
(
)
{
;
=
true
;
InvokeOnCompositionStateChanged
();
}
}
::
()
{
return
;
}
void
::
(
)
{
=
;
=
true
;
InvokeOnCompositionStateChanged
();
}
void
::
()
{
::
ForceCalculateSizeImmediately
();
(
true
);
}
::
GetMinPreferredClientSize
()
{
=
::
GetMinPreferredClientSize
();
if
(
() ==
::
LimitToElementAndChildren
)
{
auto
=
(
(
0
,
));
FOREACH(GuiFlowItemComposition*, item, flowItems)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
*>&
= ::
vl
::
collections
::
(
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
*
;
__foreach_iterator__
.
(
item
);)
{
auto
=
item
->
().
();
if
(
clientSize
.
<
itemSize
.
)
clientSize
.
=
itemSize
.
;
if
(
clientSize
.
<
itemSize
.
)
clientSize
.
=
itemSize
.
;
}
if
(
minSize
.
<
clientSize
.
)
minSize
.
=
clientSize
.
;
if
(
minSize
.
<
clientSize
.
)
minSize
.
=
clientSize
.
;
}
=
0
;
=
0
;
if
(
.
>
0
)
x
+=
.
;
if
(
.
>
0
)
x
+=
.
;
if
(
.
>
0
)
y
+=
.
;
if
(
.
>
0
)
y
+=
.
;
return
minSize
(
x
,
y
);
}
::
()
{
if
(!
)
{
for
(
=
0
;
i
<
.
();
i
++)
{
if
(
i
].
()
i
]->
())
{
=
true
;
break
;
}
}
}
if
(
)
{
(
true
);
}
::
();
return
;
}
void
::
(
*
,
*
)
{
::
(
,
);
=
==
0
?
0
:
dynamic_cast
<
*>(
);
}
::
()
{
return
(
).
();
}
::
()
{
(
::
LimitToElementAndChildren
);
}
::
()
{
}
bool
::
()
{
return
false
;
}
::
()
{
=
;
if
(
)
{
->
(
false
);
=
->
.
(
this
);
if
(
index
!= -
1
)
{
result
->
index
];
}
result
(
result
.
() -
.
,
result
.
() -
.
,
result
.
() +
.
,
result
.
() +
.
);
}
(
result
);
return
result
;
}
void
::
(
)
{
;
InvokeOnCompositionStateChanged
();
}
::()
{
return
;
}
void
::(
)
{
;
InvokeOnCompositionStateChanged
();
}
::
()
{
return
;
}
void
::
(
)
{
;
if
(
)
{
->
=
true
;
InvokeOnCompositionStateChanged
();
}
}
}
}
}