#include "GuiGraphicsHost.h"
#include "../Controls/GuiWindowControls.h"
namespace
{
namespace
{
namespace
{
using
namespace
collections
;
using
namespace
controls
;
const
wchar_t
*
const
::
=
L"vl::presentation::compositions::IGuiTabAction"
;
namespace
{
void
(
*
,
bool
,
<
,
*>&
)
{
if
(
)
{
auto
=
->
<
>();
if
(
tabAction
&& (
tabAction
->
() ||
tabAction
->
() != -
1
))
{
=
tabAction
->
();
=
priority
<
0
? ~(
)
0
: (
)
priority
;
.
(
normalized
,
);
return
;
}
}
=
->
();
for
(
=
0
;
i
<
count
;
i
++)
{
(
->
(
i
),
true
,
);
}
}
void
(
<
*>&
,
,
<
,
*>&
)
{
=
.
();
for
(
=
0
;
i
<
count
;
i
++)
{
auto
&
=
.
(
i
);
for
(
=
0
;
j
<
values
.
();
j
++)
{
.
(
++,
values
j
]);
}
}
}
}
using
namespace
tab_focus
;
void
::
()
{
.
();
{
<
,
*>
;
(
,
false
,
prioritized
);
(
,
0
,
prioritized
);
}
for
(
=
0
;
i
<
.
();
i
++)
{
<
,
*>
;
(
i
],
false
,
prioritized
);
(
,
i
+
1
,
prioritized
);
}
}
controls
::
*
::
(
controls
::
*
,
)
{
if
(!
)
{
();
=
true
;
}
#define STEP_AND_NORMALIZE(INDEX) (((INDEX) + offset + controlsInOrder.Count()) % controlsInOrder.Count())
if
(
.
() ==
0
)
return
nullptr
;
=
.
(
);
startIndex
=
startIndex
== -
1
?
0
:
STEP_AND_NORMALIZE(startIndex);
(((
startIndex
) +
+
.
()) %
.
());
=
startIndex
;
do
{
auto
=
index
];
if
(
auto
=
control
->
<
>())
{
if
(
tabAction
->
() &&
tabAction
->
())
{
return
control
;
}
}
index = STEP_AND_NORMALIZE(index);
index
= (((
index
) +
+
.
()) %
.
());
}
while
(
index
!=
startIndex
);
#undef STEP_AND_NORMALIZE
return
nullptr
;
}
::
(
controls
::
*
)
:controlHost(
)
{
}
::
()
{
}
void
::
()
{
=
false
;
.
();
}
bool
::
(
const
&
,
*
)
{
if
(!
.
&& !
.
&&
.
==
::
)
{
*
=
nullptr
;
if
(
)
{
focusedControl
=
->
();
if
(
focusedControl
&&
focusedControl
->
())
{
return
false
;
}
}
if
(
auto
=
(
focusedControl
, (
.
? -
1
:
1
)))
{
next
->
();
=
true
;
return
true
;
}
}
return
false
;
}
bool
::
(
const
&
)
{
bool
=
;
=
false
;
return
supress
&&
.
==
L'\t'
;
}
}
}
}