mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-03-24 00:13:48 +08:00
Xml/Instance_*
This commit is contained in:
@@ -1,16 +1,35 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::Demo
|
||||
/***********************************************************************
|
||||
!!!!!! DO NOT MODIFY !!!!!!
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
************************************************************************
|
||||
DO NOT MODIFY
|
||||
GacGen.exe Resource.xml
|
||||
|
||||
This file is generated by Workflow compiler
|
||||
https://github.com/vczh-libraries
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo
|
||||
#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo
|
||||
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMO
|
||||
#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMO
|
||||
|
||||
#include "DemoPartialClasses.h"
|
||||
|
||||
/***********************************************************************
|
||||
Reflection
|
||||
***********************************************************************/
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace reflection
|
||||
{
|
||||
namespace description
|
||||
{
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
DECL_TYPE_INFO(::demo::MainWindow)
|
||||
DECL_TYPE_INFO(::demo::MainWindowConstructor)
|
||||
#endif
|
||||
|
||||
extern bool LoadDemoTypes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,42 +1,116 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::Partial Classes
|
||||
/***********************************************************************
|
||||
!!!!!! DO NOT MODIFY !!!!!!
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
************************************************************************
|
||||
DO NOT MODIFY
|
||||
GacGen.exe Resource.xml
|
||||
|
||||
This file is generated by Workflow compiler
|
||||
https://github.com/vczh-libraries
|
||||
***********************************************************************/
|
||||
|
||||
#include "Demo.h"
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4250)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wparentheses-equality"
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wparentheses-equality"
|
||||
#endif
|
||||
|
||||
#define GLOBAL_SYMBOL ::vl_workflow_global::Demo::
|
||||
#define GLOBAL_NAME ::vl_workflow_global::Demo::Instance().
|
||||
#define GLOBAL_OBJ &::vl_workflow_global::Demo::Instance()
|
||||
#define USERIMPL(...)
|
||||
|
||||
/***********************************************************************
|
||||
Global Variables
|
||||
***********************************************************************/
|
||||
|
||||
BEGIN_GLOBAL_STORAGE_CLASS(vl_workflow_global_Demo)
|
||||
vl_workflow_global::Demo instance;
|
||||
INITIALIZE_GLOBAL_STORAGE_CLASS
|
||||
FINALIZE_GLOBAL_STORAGE_CLASS
|
||||
END_GLOBAL_STORAGE_CLASS(vl_workflow_global_Demo)
|
||||
|
||||
namespace vl_workflow_global
|
||||
{
|
||||
/***********************************************************************
|
||||
Global Functions
|
||||
***********************************************************************/
|
||||
|
||||
Demo& Demo::Instance()
|
||||
{
|
||||
return Getvl_workflow_global_Demo().instance;
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
Class (::demo::MainWindowConstructor)
|
||||
***********************************************************************/
|
||||
|
||||
namespace demo
|
||||
{
|
||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||
void MainWindowConstructor::__vwsn_initialize_instance_(::demo::MainWindow* __vwsn_this_, ::vl::presentation::GuiResourcePathResolver* __vwsn_resolver_)
|
||||
{
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_0 = __vwsn_this_);
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_2 = ::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->GetBoundsComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_2)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = 480; __vwsn_temp__.y = 320; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = 480; __vwsn_temp__.y = 320; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->SetText(::vl::WString(L"Instance_Window", false));
|
||||
}
|
||||
{
|
||||
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle();
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_1 = new ::vl::presentation::controls::GuiLabel(__vwsn_controlStyle_));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetFont([&](){ ::vl::presentation::FontProperties __vwsn_temp__; __vwsn_temp__.fontFamily = ::vl::WString(L"Segoe UI", false); __vwsn_temp__.size = 32; __vwsn_temp__.antialias = true; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetText(::vl::WString(L"This is a window!", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::controls::GuiControl*>(::vl::__vwsn::This(this)->__vwsn_precompile_1)));
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::OnCreate()
|
||||
MainWindowConstructor::MainWindowConstructor()
|
||||
{
|
||||
}
|
||||
|
||||
void MainWindow::OnDestroy()
|
||||
{
|
||||
}
|
||||
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
/***********************************************************************
|
||||
Class (::demo::MainWindow)
|
||||
***********************************************************************/
|
||||
|
||||
MainWindow::MainWindow()
|
||||
: ::vl::presentation::controls::GuiWindow(::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateWindowStyle())
|
||||
{
|
||||
InitializeComponents();
|
||||
OnCreate();
|
||||
auto __vwsn_resource_ = ::vl::__vwsn::This(::vl::presentation::GetResourceManager())->GetResourceFromClassName(::vl::WString(L"demo::MainWindow", false));
|
||||
auto __vwsn_resolver_ = ::vl::Ptr<::vl::presentation::GuiResourcePathResolver>(new ::vl::presentation::GuiResourcePathResolver(__vwsn_resource_, ::vl::__vwsn::This(__vwsn_resource_.Obj())->GetWorkingDirectory()));
|
||||
::vl::__vwsn::This(this)->__vwsn_initialize_instance_(this, ::vl::__vwsn::Ensure(static_cast<::vl::presentation::GuiResourcePathResolver*>(__vwsn_resolver_.Obj())));
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
OnDestroy();
|
||||
ClearSubscriptions();
|
||||
::vl::__vwsn::This(this)->ClearSubscriptions();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#undef GLOBAL_SYMBOL
|
||||
#undef GLOBAL_NAME
|
||||
#undef GLOBAL_OBJ
|
||||
#undef USERIMPL
|
||||
|
||||
/***********************************************************************
|
||||
Reflection
|
||||
***********************************************************************/
|
||||
|
||||
namespace vl
|
||||
{
|
||||
@@ -44,47 +118,55 @@ namespace vl
|
||||
{
|
||||
namespace description
|
||||
{
|
||||
#define _ ,
|
||||
IMPL_CPP_TYPE_INFO(demo::MainWindow)
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
IMPL_CPP_TYPE_INFO(::demo::MainWindow)
|
||||
IMPL_CPP_TYPE_INFO(::demo::MainWindowConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(demo::MainWindow)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
||||
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(), NO_PARAMETER)
|
||||
END_CLASS_MEMBER(demo::MainWindow)
|
||||
#define _ ,
|
||||
BEGIN_CLASS_MEMBER(::demo::MainWindow)
|
||||
END_CLASS_MEMBER(::demo::MainWindow)
|
||||
|
||||
#undef _
|
||||
BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor)
|
||||
CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" _ L"__vwsn_resolver_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
|
||||
END_CLASS_MEMBER(::demo::MainWindowConstructor)
|
||||
|
||||
class DemoResourceLoader : public Object, public ITypeLoader
|
||||
#undef _
|
||||
class DemoTypeLoader : public Object, public ITypeLoader
|
||||
{
|
||||
public:
|
||||
void Load(ITypeManager* manager)
|
||||
{
|
||||
ADD_TYPE_INFO(demo::MainWindow)
|
||||
ADD_TYPE_INFO(::demo::MainWindow)
|
||||
ADD_TYPE_INFO(::demo::MainWindowConstructor)
|
||||
}
|
||||
|
||||
void Unload(ITypeManager* manager)
|
||||
{
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
class DemoResourcePlugin : public Object, public vl::presentation::controls::IGuiPlugin
|
||||
bool LoadDemoTypes()
|
||||
{
|
||||
public:
|
||||
void Load()override
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
if (auto manager = GetGlobalTypeManager())
|
||||
{
|
||||
GetGlobalTypeManager()->AddTypeLoader(new DemoResourceLoader);
|
||||
return manager->AddTypeLoader(MakePtr<DemoTypeLoader>());
|
||||
}
|
||||
|
||||
void AfterLoad()override
|
||||
{
|
||||
}
|
||||
|
||||
void Unload()override
|
||||
{
|
||||
}
|
||||
};
|
||||
GUI_REGISTER_PLUGIN(DemoResourcePlugin)
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
@@ -1,76 +1,79 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::Partial Classes
|
||||
/***********************************************************************
|
||||
!!!!!! DO NOT MODIFY !!!!!!
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
************************************************************************
|
||||
DO NOT MODIFY
|
||||
GacGen.exe Resource.xml
|
||||
|
||||
This file is generated by Workflow compiler
|
||||
https://github.com/vczh-libraries
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES
|
||||
#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_PARTIAL_CLASSES
|
||||
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES
|
||||
#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES
|
||||
|
||||
#include "GacUIReflection.h"
|
||||
#include "GacUI.h"
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4250)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wparentheses-equality"
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wparentheses-equality"
|
||||
#endif
|
||||
|
||||
namespace demo
|
||||
{
|
||||
class MainWindowConstructor;
|
||||
class MainWindow;
|
||||
|
||||
template<typename TImpl>
|
||||
class MainWindow_ : public ::vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>, public vl::reflection::Description<TImpl>
|
||||
class MainWindowConstructor : public ::vl::Object, public ::vl::reflection::Description<MainWindowConstructor>
|
||||
{
|
||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||
private:
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindowConstructor>;
|
||||
#endif
|
||||
protected:
|
||||
|
||||
void InitializeComponents()
|
||||
{
|
||||
if (InitializeFromResource())
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
::demo::MainWindow* __vwsn_precompile_0 = static_cast<::demo::MainWindow*>(nullptr);
|
||||
::vl::presentation::controls::GuiLabel* __vwsn_precompile_1 = static_cast<::vl::presentation::controls::GuiLabel*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_2 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
void __vwsn_initialize_instance_(::demo::MainWindow* __vwsn_this_, ::vl::presentation::GuiResourcePathResolver* __vwsn_resolver_);
|
||||
public:
|
||||
MainWindow_()
|
||||
:vl::presentation::GuiInstancePartialClass<::vl::presentation::controls::GuiWindow>(L"demo::MainWindow")
|
||||
,::vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
|
||||
{
|
||||
}
|
||||
MainWindowConstructor();
|
||||
};
|
||||
|
||||
}
|
||||
namespace vl
|
||||
{
|
||||
namespace reflection
|
||||
class MainWindow : public ::vl::presentation::controls::GuiWindow, public ::demo::MainWindowConstructor, public ::vl::reflection::Description<MainWindow>
|
||||
{
|
||||
namespace description
|
||||
{
|
||||
DECL_TYPE_INFO(demo::MainWindow)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace demo
|
||||
{
|
||||
class MainWindow : public demo::MainWindow_<demo::MainWindow>
|
||||
{
|
||||
friend class demo::MainWindow_<demo::MainWindow>;
|
||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<demo::MainWindow>;
|
||||
protected:
|
||||
|
||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||
void OnCreate();
|
||||
void OnDestroy();
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
friend class ::demo::MainWindowConstructor;
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindow>;
|
||||
#endif
|
||||
public:
|
||||
MainWindow();
|
||||
~MainWindow();
|
||||
};
|
||||
|
||||
}
|
||||
/***********************************************************************
|
||||
Global Variables and Functions
|
||||
***********************************************************************/
|
||||
|
||||
namespace vl_workflow_global
|
||||
{
|
||||
class Demo
|
||||
{
|
||||
public:
|
||||
|
||||
static Demo& Instance();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#if defined( _MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user