#ifndef VCZH_PRESENTATION_CONTROLS_GUIAPPLICATION
#define VCZH_PRESENTATION_CONTROLS_GUIAPPLICATION
#include "GuiWindowControls.h"
namespace
{
namespace
{
namespace
{
class
:
public
,
private
INativeControllerListener
,
public
<
>
{
friend
void
();
friend
class
;
friend
class
;
friend
class
<
>;
private
:
void
(
compositions
::
*
,
compositions
::
&
);
void
()
override
;
protected
:
;
*
=
nullptr
;
*
=
nullptr
;
*
=
nullptr
;
*
=
nullptr
;
bool
=
false
;
bool
=
false
;
collections
::
<
*>
;
collections
::
<
*> ;
();
();
*
GetThreadContextNativeWindow
(
*
);
void
(
*
);
void
(
*
);
void
(
* );
void
(
* );
void
(
compositions
::
*
,
compositions
::
&
);
void
(
compositions
::
*
,
compositions
::
&
);
public
:
<
void
()>
;
();
void
(
);
void
(
*
);
*
();
const
collections
::
<
*>&
();
*
(
);
void
(
*
,
*
,
,
);
void
();
*
();
();
();
bool
(
*
);
void
(
const
<
void
()>&
);
void
(
*
,
const
<
void
()>&
);
bool
InvokeInMainThreadAndWait
(
*
,
const
<
void
()>&
,
=-
1
);
<
>
(
const
<
void
()>&
,
);
<
>
(
const
<
void
()>&
,
);
void
(
*
,
const
<
void
()>&
);
template
<
typename
>
(
*
,
const
<
()>&
)
{
;
(
, [&result, &proc]()
{
result
=
);
});
return
result
;
}
template
<
typename
>
void
(
*
,
const
&
)
{
(
,
<
void
()>(
));
}
template
<
typename
>
bool
InvokeLambdaInMainThreadAndWait
(
*
,
const
&
,
=-
1
)
{
return
InvokeInMainThreadAndWait
(
,
<
void
()>(
),
);
}
};
class
:
public
,
public
<
>
{
public
:
virtual
() =
0
;
virtual
void
(
collections
::
<
>&
) =
0
;
virtual
void
()=
0
;
virtual
void
()=
0
;
};
class
:
public
,
public
<
>
{
public
:
virtual
void
(
<
>
)=
0
;
virtual
void
()=
0
;
virtual
void
()=
0
;
virtual
bool
()=
0
;
};
extern
*
();
extern
*
();
extern
void
();
}
}
}
extern
void
();
#define GUI_VALUE(x) vl::presentation::controls::GetApplication()->RunGuiValue(LAMBDA([&](){return (x);}))
#define GUI_RUN(x) vl::presentation::controls::GetApplication()->RunGuiTask([=](){x})
#define GUI_REGISTER_PLUGIN(TYPE)\
class GuiRegisterPluginClass_##TYPE\
{\
public:\
GuiRegisterPluginClass_##TYPE()\
{\
vl::presentation::controls::GetPluginManager()->AddPlugin(new TYPE);\
}\
} instance_GuiRegisterPluginClass_##TYPE;\
#define GUI_PLUGIN_NAME(NAME)\
vl::WString GetName()override { return L ## #NAME; }\
void GetDependencies(vl::collections::List<WString>& dependencies)override\
#define GUI_PLUGIN_DEPEND(NAME) dependencies.Add(L ## #NAME)
#endif