mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-03-23 15:52:56 +08:00
Xml/Binding_*
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"Binding_Eval", 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_0)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::controls::GuiControl*>(::vl::__vwsn::This(this)->__vwsn_precompile_1)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetText((::vl::WString(L"1+2+3+4+5+6+7+8+9+10 = ", false) + ::vl::__vwsn::ToString((((((((((1 + 2) + 3) + 4) + 5) + 6) + 7) + 8) + 9) + 10))));
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
@@ -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,354 @@
|
||||
/***********************************************************************
|
||||
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
|
||||
{
|
||||
/***********************************************************************
|
||||
Closure Definitions
|
||||
***********************************************************************/
|
||||
|
||||
struct __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__
|
||||
{
|
||||
::demo::MainWindowConstructor* __vwsnthis_0;
|
||||
|
||||
__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0);
|
||||
|
||||
void operator()(::vl::reflection::description::Value __vwsn_value_) const;
|
||||
};
|
||||
|
||||
class __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription : public ::vl::Object, public virtual ::vl::reflection::description::IValueSubscription
|
||||
{
|
||||
public:
|
||||
::demo::MainWindowConstructor* __vwsnthis_0;
|
||||
|
||||
__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0);
|
||||
|
||||
::vl::presentation::controls::GuiSinglelineTextBox* __vwsn_bind_cache_0 = nullptr;
|
||||
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0;
|
||||
bool __vwsn_bind_opened_ = false;
|
||||
bool __vwsn_bind_closed_ = false;
|
||||
::vl::Ptr<::vl::reflection::description::IValueDictionary> __vwsn_bind_listeners_;
|
||||
void __vwsn_bind_activator_();
|
||||
void __vwsn_bind_callback_0_0(::vl::presentation::compositions::GuiGraphicsComposition* __vwsn_bind_callback_argument_0, ::vl::presentation::compositions::GuiEventArgs* __vwsn_bind_callback_argument_1);
|
||||
void __vwsn_bind_initialize_();
|
||||
::vl::Ptr<::vl::reflection::description::IValueListener> Subscribe(const ::vl::Func<void(::vl::reflection::description::Value)>& __vwsn_bind_callback_) override;
|
||||
bool Update() override;
|
||||
bool Close() override;
|
||||
};
|
||||
|
||||
class __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener : public ::vl::Object, public virtual ::vl::reflection::description::IValueListener
|
||||
{
|
||||
public:
|
||||
::vl::Ptr<::vl::reflection::description::IValueDictionary> __vwsn_bind_listeners_;
|
||||
::vl::reflection::description::IValueSubscription* __vwsn_subscription_;
|
||||
::vl::reflection::description::IValueSubscription* __vwsnthis_0;
|
||||
::demo::MainWindowConstructor* __vwsnthis_1;
|
||||
|
||||
__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener(::vl::Ptr<::vl::reflection::description::IValueDictionary> __vwsnctor___vwsn_bind_listeners_, ::vl::reflection::description::IValueSubscription* __vwsnctor___vwsn_subscription_, ::vl::reflection::description::IValueSubscription* __vwsnctorthis_0, ::demo::MainWindowConstructor* __vwsnctorthis_1);
|
||||
|
||||
::vl::reflection::description::IValueSubscription* GetSubscription() override;
|
||||
bool GetStopped() override;
|
||||
bool StopListening() override;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0)
|
||||
:__vwsnthis_0(__vwsnctorthis_0)
|
||||
{
|
||||
}
|
||||
|
||||
void __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(::vl::reflection::description::Value __vwsn_value_) const
|
||||
{
|
||||
auto __vwsn_old_ = ::vl::__vwsn::This(::vl::__vwsn::This(__vwsnthis_0)->__vwsn_precompile_7)->GetText();
|
||||
auto __vwsn_new_ = ::vl::__vwsn::Unbox<::vl::WString>(__vwsn_value_);
|
||||
if ((__vwsn_old_ == __vwsn_new_))
|
||||
{
|
||||
return;
|
||||
}
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(__vwsnthis_0)->__vwsn_precompile_7)->SetText(__vwsn_new_);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0)
|
||||
:__vwsnthis_0(__vwsnctorthis_0)
|
||||
{
|
||||
this->__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiSinglelineTextBox*>(nullptr);
|
||||
this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
|
||||
this->__vwsn_bind_opened_ = false;
|
||||
this->__vwsn_bind_closed_ = false;
|
||||
this->__vwsn_bind_listeners_ = ::vl::reflection::description::IValueDictionary::Create();
|
||||
}
|
||||
|
||||
void __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_()
|
||||
{
|
||||
auto __vwsn_bind_activator_result_ = ((::vl::WString(L"Hi, ", false) + ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetText()) + ::vl::WString(L"! How are you?", false));
|
||||
using __vwsnt_0 = ::vl::reflection::description::Value;
|
||||
FOREACH(__vwsnt_0, __vwsn_bind_callback_, ::vl::reflection::description::GetLazyList<::vl::reflection::description::Value>(::vl::__vwsn::This(__vwsn_bind_listeners_.Obj())->GetValues()))
|
||||
{
|
||||
::vl::__vwsn::Unbox<::vl::Func<void(::vl::reflection::description::Value)>>(__vwsn_bind_callback_)(::vl::__vwsn::Box(__vwsn_bind_activator_result_));
|
||||
}
|
||||
}
|
||||
|
||||
void __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0(::vl::presentation::compositions::GuiGraphicsComposition* __vwsn_bind_callback_argument_0, ::vl::presentation::compositions::GuiEventArgs* __vwsn_bind_callback_argument_1)
|
||||
{
|
||||
::vl::__vwsn::This(this)->__vwsn_bind_activator_();
|
||||
}
|
||||
|
||||
void __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_initialize_()
|
||||
{
|
||||
(__vwsn_bind_cache_0 = ::vl::__vwsn::This(__vwsnthis_0)->textBoxName);
|
||||
(__vwsn_bind_handler_0_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->TextChanged, ::vl::Func<void(::vl::presentation::compositions::GuiGraphicsComposition*, ::vl::presentation::compositions::GuiEventArgs*)>(::vl::__vwsn::This(this), &__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)));
|
||||
}
|
||||
|
||||
::vl::Ptr<::vl::reflection::description::IValueListener> __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Subscribe(const ::vl::Func<void(::vl::reflection::description::Value)>& __vwsn_bind_callback_)
|
||||
{
|
||||
if ((! __vwsn_bind_opened_))
|
||||
{
|
||||
(__vwsn_bind_opened_ = true);
|
||||
::vl::__vwsn::This(this)->__vwsn_bind_initialize_();
|
||||
}
|
||||
auto __vwsn_subscription_ = this;
|
||||
auto __vwsn_listener_shared_ = ::vl::Ptr<::vl::reflection::description::IValueListener>(new ::vl_workflow_global::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener(__vwsn_bind_listeners_, __vwsn_subscription_, this, __vwsnthis_0));
|
||||
::vl::__vwsn::This(__vwsn_bind_listeners_.Obj())->Set(::vl::__vwsn::Box(__vwsn_listener_shared_), ::vl::__vwsn::Box(__vwsn_bind_callback_));
|
||||
return __vwsn_listener_shared_;
|
||||
}
|
||||
|
||||
bool __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Update()
|
||||
{
|
||||
if ((! __vwsn_bind_closed_))
|
||||
{
|
||||
::vl::__vwsn::This(this)->__vwsn_bind_activator_();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Close()
|
||||
{
|
||||
if ((! __vwsn_bind_closed_))
|
||||
{
|
||||
(__vwsn_bind_closed_ = true);
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->TextChanged, __vwsn_bind_handler_0_0);
|
||||
(__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiSinglelineTextBox*>(nullptr));
|
||||
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
::vl::__vwsn::This(__vwsn_bind_listeners_.Obj())->Clear();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener(::vl::Ptr<::vl::reflection::description::IValueDictionary> __vwsnctor___vwsn_bind_listeners_, ::vl::reflection::description::IValueSubscription* __vwsnctor___vwsn_subscription_, ::vl::reflection::description::IValueSubscription* __vwsnctorthis_0, ::demo::MainWindowConstructor* __vwsnctorthis_1)
|
||||
:__vwsn_bind_listeners_(__vwsnctor___vwsn_bind_listeners_)
|
||||
, __vwsn_subscription_(__vwsnctor___vwsn_subscription_)
|
||||
, __vwsnthis_0(__vwsnctorthis_0)
|
||||
, __vwsnthis_1(__vwsnctorthis_1)
|
||||
{
|
||||
}
|
||||
|
||||
::vl::reflection::description::IValueSubscription* __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener::GetSubscription()
|
||||
{
|
||||
return ::vl::__vwsn::This(this)->__vwsn_subscription_;
|
||||
}
|
||||
|
||||
bool __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener::GetStopped()
|
||||
{
|
||||
return (! ::vl::__vwsn::This(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_bind_listeners_.Obj())->GetKeys().Obj())->Contains(::vl::__vwsn::Box(this)));
|
||||
}
|
||||
|
||||
bool __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener::StopListening()
|
||||
{
|
||||
if (::vl::__vwsn::This(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_bind_listeners_.Obj())->GetKeys().Obj())->Contains(::vl::__vwsn::Box(this)))
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_bind_listeners_.Obj())->Remove(::vl::__vwsn::Box(this));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
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_8 = ::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->GetBoundsComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_8)->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"Binding_Format", false));
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_1 = new ::vl::presentation::compositions::GuiTableComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = 0; __vwsn_temp__.top = 0; __vwsn_temp__.right = 0; __vwsn_temp__.bottom = 0; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren);
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"5", false)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetRowsAndColumns(3, 3);
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetRowOption(0, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetRowOption(1, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetRowOption(2, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = 1.0; return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetColumnOption(0, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetColumnOption(1, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = 100; return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetColumnOption(2, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = 1.0; return __vwsn_temp__; }());
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_2 = new ::vl::presentation::compositions::GuiCellComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = 0; __vwsn_temp__.top = 5; __vwsn_temp__.right = 0; __vwsn_temp__.bottom = 5; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_2)->SetSite(0, 0, 1, 1);
|
||||
}
|
||||
{
|
||||
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle();
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_3 = new ::vl::presentation::controls::GuiLabel(__vwsn_controlStyle_));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_3)->SetText(::vl::WString(L"Type your name : ", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_2)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_3)->GetBoundsComposition())));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this)->__vwsn_precompile_2)));
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_4 = new ::vl::presentation::compositions::GuiCellComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_4)->SetSite(0, 1, 1, 1);
|
||||
}
|
||||
{
|
||||
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle();
|
||||
(::vl::__vwsn::This(this)->textBoxName = new ::vl::presentation::controls::GuiSinglelineTextBox(__vwsn_controlStyle_));
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_5 = ::vl::__vwsn::This(::vl::__vwsn::This(this)->textBoxName)->GetBoundsComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = 0; __vwsn_temp__.top = 0; __vwsn_temp__.right = 0; __vwsn_temp__.bottom = 0; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->textBoxName)->SetText(::vl::WString(L"Jack", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_4)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(::vl::__vwsn::This(this)->textBoxName)->GetBoundsComposition())));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this)->__vwsn_precompile_4)));
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_6 = new ::vl::presentation::compositions::GuiCellComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = 0; __vwsn_temp__.top = 5; __vwsn_temp__.right = 0; __vwsn_temp__.bottom = 5; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_6)->SetSite(1, 0, 1, 2);
|
||||
}
|
||||
{
|
||||
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle();
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_7 = new ::vl::presentation::controls::GuiLabel(__vwsn_controlStyle_));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_6)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_7)->GetBoundsComposition())));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this)->__vwsn_precompile_6)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->GetContainerComposition())->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this)->__vwsn_precompile_1)));
|
||||
}
|
||||
{
|
||||
auto __vwsn_created_subscription_ = ::vl::__vwsn::This(__vwsn_this_)->AddSubscription(::vl::Ptr<::vl::reflection::description::IValueSubscription>(new ::vl_workflow_global::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(this)));
|
||||
::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->Subscribe(LAMBDA(::vl_workflow_global::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(this)));
|
||||
::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->Update();
|
||||
}
|
||||
}
|
||||
|
||||
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 +356,62 @@ 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)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
|
||||
CLASS_MEMBER_FIELD(textBoxName)
|
||||
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,79 +1,99 @@
|
||||
/***********************************************************************
|
||||
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 vl_workflow_global
|
||||
{
|
||||
class __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
class __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
struct __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
}
|
||||
|
||||
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:
|
||||
friend class ::vl_workflow_global::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend struct ::vl_workflow_global::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindowConstructor>;
|
||||
#endif
|
||||
protected:
|
||||
::vl::presentation::controls::GuiSinglelineTextBox* textBoxName;
|
||||
|
||||
void InitializeComponents()
|
||||
{
|
||||
if (InitializeFromResource())
|
||||
{
|
||||
GUI_INSTANCE_REFERENCE(textBoxName);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
::vl::presentation::controls::GuiSinglelineTextBox* textBoxName = static_cast<::vl::presentation::controls::GuiSinglelineTextBox*>(nullptr);
|
||||
::demo::MainWindow* __vwsn_precompile_0 = static_cast<::demo::MainWindow*>(nullptr);
|
||||
::vl::presentation::compositions::GuiTableComposition* __vwsn_precompile_1 = static_cast<::vl::presentation::compositions::GuiTableComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_2 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::presentation::controls::GuiLabel* __vwsn_precompile_3 = static_cast<::vl::presentation::controls::GuiLabel*>(nullptr);
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_4 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_5 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_6 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::presentation::controls::GuiLabel* __vwsn_precompile_7 = static_cast<::vl::presentation::controls::GuiLabel*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_8 = 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())
|
||||
,textBoxName(0)
|
||||
{
|
||||
}
|
||||
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;
|
||||
friend class ::vl_workflow_global::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend struct ::vl_workflow_global::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
#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
|
||||
|
||||
@@ -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,46 +1,227 @@
|
||||
/***********************************************************************
|
||||
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
|
||||
{
|
||||
/***********************************************************************
|
||||
Closure Definitions
|
||||
***********************************************************************/
|
||||
|
||||
struct __vwsno1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__
|
||||
{
|
||||
::demo::MainWindow* __vwsn_this_;
|
||||
::demo::MainWindowConstructor* __vwsnthis_0;
|
||||
|
||||
__vwsno1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindow* __vwsnctor___vwsn_this_, ::demo::MainWindowConstructor* __vwsnctorthis_0);
|
||||
|
||||
void operator()(::vl::presentation::compositions::GuiGraphicsComposition* __vwsno_1, ::vl::presentation::compositions::GuiEventArgs* __vwsno_2) const;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
__vwsno1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::__vwsno1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindow* __vwsnctor___vwsn_this_, ::demo::MainWindowConstructor* __vwsnctorthis_0)
|
||||
:__vwsn_this_(__vwsnctor___vwsn_this_)
|
||||
, __vwsnthis_0(__vwsnctorthis_0)
|
||||
{
|
||||
}
|
||||
|
||||
void __vwsno1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(::vl::presentation::compositions::GuiGraphicsComposition* __vwsno_1, ::vl::presentation::compositions::GuiEventArgs* __vwsno_2) const
|
||||
{
|
||||
return ::vl::__vwsn::This(__vwsn_this_)->documentLabel_ActiveHyperlinkExecuted(__vwsno_1, __vwsno_2);
|
||||
}
|
||||
/***********************************************************************
|
||||
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_8 = ::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->GetBoundsComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_8)->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__; }());
|
||||
}
|
||||
{
|
||||
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTabStyle();
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_1 = new ::vl::presentation::controls::GuiTab(__vwsn_controlStyle_));
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_7 = ::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->GetBoundsComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_7)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = 5; __vwsn_temp__.top = 5; __vwsn_temp__.right = 5; __vwsn_temp__.bottom = 5; return __vwsn_temp__; }());
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_2 = new ::vl::presentation::controls::GuiTabPage());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_2)->SetText(::vl::WString(L"Image", false));
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_3 = new ::vl::presentation::compositions::GuiBoundsComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_3)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElement);
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_4 = ::vl::Ptr<::vl::presentation::elements::GuiImageFrameElement>(::vl::reflection::description::Element_Constructor<::vl::presentation::elements::GuiImageFrameElement>()));
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_3)->SetOwnedElement(::vl::__vwsn::Ensure(::vl::Ptr<::vl::presentation::elements::IGuiGraphicsElement>(::vl::__vwsn::This(this)->__vwsn_precompile_4)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_2)->GetContainerComposition())->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this)->__vwsn_precompile_3)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->CreatePage(::vl::__vwsn::This(this)->__vwsn_precompile_2, -1);
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_5 = new ::vl::presentation::controls::GuiTabPage());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_5)->SetText(::vl::WString(L"Document", false));
|
||||
}
|
||||
{
|
||||
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateDocumentLabelStyle();
|
||||
(::vl::__vwsn::This(this)->documentLabel = new ::vl::presentation::controls::GuiDocumentLabel(__vwsn_controlStyle_));
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_6 = ::vl::__vwsn::This(::vl::__vwsn::This(this)->documentLabel)->GetBoundsComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_6)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = 0; __vwsn_temp__.top = 0; __vwsn_temp__.right = 0; __vwsn_temp__.bottom = 0; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_5)->GetContainerComposition())->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(::vl::__vwsn::This(this)->documentLabel)->GetBoundsComposition())));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->CreatePage(::vl::__vwsn::This(this)->__vwsn_precompile_5, -1);
|
||||
}
|
||||
{
|
||||
::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)));
|
||||
}
|
||||
{
|
||||
auto __vwsn_resource_item_ = ::vl::__vwsn::This(__vwsn_resolver_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Data/Logo", false));
|
||||
if ((! static_cast<bool>(__vwsn_resource_item_)))
|
||||
{
|
||||
throw ::vl::Exception(::vl::WString(L"Resource \"res://Data/Logo\" does not exist.", false));
|
||||
}
|
||||
auto __vwsn_resource_value_ = ::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(__vwsn_resource_item_.Obj());
|
||||
if ((! static_cast<bool>(__vwsn_resource_value_)))
|
||||
{
|
||||
throw ::vl::Exception(::vl::WString(L"Resource \"res://Data/Logo\" cannot be read as type \"presentation::GuiImageData\".", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_4.Obj())->SetImage(::vl::__vwsn::This(__vwsn_resource_value_.Obj())->GetImage());
|
||||
}
|
||||
}
|
||||
{
|
||||
auto __vwsn_resource_item_ = ::vl::__vwsn::This(__vwsn_resolver_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Data/Document", false));
|
||||
if ((! static_cast<bool>(__vwsn_resource_item_)))
|
||||
{
|
||||
throw ::vl::Exception(::vl::WString(L"Resource \"res://Data/Document\" does not exist.", false));
|
||||
}
|
||||
auto __vwsn_resource_value_ = ::vl::__vwsn::SharedPtrCast<::vl::presentation::DocumentModel>(__vwsn_resource_item_.Obj());
|
||||
if ((! static_cast<bool>(__vwsn_resource_value_)))
|
||||
{
|
||||
throw ::vl::Exception(::vl::WString(L"Resource \"res://Data/Document\" cannot be read as type \"presentation::DocumentModel\".", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->documentLabel)->SetDocument(__vwsn_resource_value_);
|
||||
}
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::EventAttach(::vl::__vwsn::This(::vl::__vwsn::This(this)->documentLabel)->ActiveHyperlinkExecuted, LAMBDA(::vl_workflow_global::__vwsno1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(__vwsn_this_, this)));
|
||||
}
|
||||
{
|
||||
auto __vwsn_resource_item_ = ::vl::__vwsn::This(__vwsn_resolver_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Data/Title", false));
|
||||
if ((! static_cast<bool>(__vwsn_resource_item_)))
|
||||
{
|
||||
throw ::vl::Exception(::vl::WString(L"Resource \"res://Data/Title\" does not exist.", false));
|
||||
}
|
||||
auto __vwsn_resource_value_ = ::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiTextData>(__vwsn_resource_item_.Obj());
|
||||
if ((! static_cast<bool>(__vwsn_resource_value_)))
|
||||
{
|
||||
throw ::vl::Exception(::vl::WString(L"Resource \"res://Data/Title\" cannot be read as type \"presentation::GuiTextData\".", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->SetText(::vl::__vwsn::This(__vwsn_resource_value_.Obj())->GetText());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::documentLabel_ActiveHyperlinkExecuted(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments)
|
||||
MainWindowConstructor::MainWindowConstructor()
|
||||
{
|
||||
}
|
||||
|
||||
void MainWindow::OnCreate()
|
||||
{
|
||||
}
|
||||
/***********************************************************************
|
||||
Class (::demo::MainWindow)
|
||||
***********************************************************************/
|
||||
|
||||
void MainWindow::OnDestroy()
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::documentLabel_ActiveHyperlinkExecuted(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
|
||||
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
|
||||
{
|
||||
@@ -48,49 +229,63 @@ 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)
|
||||
#define _ ,
|
||||
BEGIN_CLASS_MEMBER(::demo::MainWindow)
|
||||
CLASS_MEMBER_METHOD(documentLabel_ActiveHyperlinkExecuted, { L"sender" _ L"arguments" })
|
||||
END_CLASS_MEMBER(::demo::MainWindow)
|
||||
|
||||
CLASS_MEMBER_GUIEVENT_HANDLER(documentLabel_ActiveHyperlinkExecuted, ::vl::presentation::compositions::GuiEventArgs)
|
||||
END_CLASS_MEMBER(demo::MainWindow)
|
||||
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)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
|
||||
CLASS_MEMBER_FIELD(documentLabel)
|
||||
END_CLASS_MEMBER(::demo::MainWindowConstructor)
|
||||
|
||||
#undef _
|
||||
|
||||
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,80 +1,95 @@
|
||||
/***********************************************************************
|
||||
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 vl_workflow_global
|
||||
{
|
||||
struct __vwsno1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
}
|
||||
|
||||
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:
|
||||
friend struct ::vl_workflow_global::__vwsno1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindowConstructor>;
|
||||
#endif
|
||||
protected:
|
||||
::vl::presentation::controls::GuiDocumentLabel* documentLabel;
|
||||
|
||||
void InitializeComponents()
|
||||
{
|
||||
if (InitializeFromResource())
|
||||
{
|
||||
GUI_INSTANCE_REFERENCE(documentLabel);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
::vl::presentation::controls::GuiDocumentLabel* documentLabel = static_cast<::vl::presentation::controls::GuiDocumentLabel*>(nullptr);
|
||||
::demo::MainWindow* __vwsn_precompile_0 = static_cast<::demo::MainWindow*>(nullptr);
|
||||
::vl::presentation::controls::GuiTab* __vwsn_precompile_1 = static_cast<::vl::presentation::controls::GuiTab*>(nullptr);
|
||||
::vl::presentation::controls::GuiTabPage* __vwsn_precompile_2 = static_cast<::vl::presentation::controls::GuiTabPage*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_3 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
::vl::Ptr<::vl::presentation::elements::GuiImageFrameElement> __vwsn_precompile_4 = ::vl::Ptr<::vl::presentation::elements::GuiImageFrameElement>();
|
||||
::vl::presentation::controls::GuiTabPage* __vwsn_precompile_5 = static_cast<::vl::presentation::controls::GuiTabPage*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_6 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_7 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_8 = 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())
|
||||
,documentLabel(0)
|
||||
{
|
||||
}
|
||||
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>;
|
||||
friend class ::demo::MainWindowConstructor;
|
||||
friend struct ::vl_workflow_global::__vwsno1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindow>;
|
||||
#endif
|
||||
protected:
|
||||
|
||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||
void documentLabel_ActiveHyperlinkExecuted(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs& arguments);
|
||||
void OnCreate();
|
||||
void OnDestroy();
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
void documentLabel_ActiveHyperlinkExecuted(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments);
|
||||
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
|
||||
|
||||
@@ -13,7 +13,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
||||
class ViewModelImpl : public Object, public virtual demo::IViewModel
|
||||
{
|
||||
public:
|
||||
WString GetMessageFromName(WString name)override
|
||||
WString GetMessageFromName(const WString& name)override
|
||||
{
|
||||
return L"Hi, " + name + L"! How are you?";
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</Folder>
|
||||
<Folder name="MainWindow">
|
||||
<Script name="ViewModelResource">
|
||||
<Workflow-ViewModel>
|
||||
<Workflow>
|
||||
<![CDATA[
|
||||
module script;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</Workflow-ViewModel>
|
||||
</Workflow>
|
||||
</Script>
|
||||
<Instance name="MainWindowResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::MainWindow">
|
||||
|
||||
@@ -1,16 +1,43 @@
|
||||
/***********************************************************************
|
||||
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::IViewModel)
|
||||
DECL_TYPE_INFO(::demo::MainWindow)
|
||||
DECL_TYPE_INFO(::demo::MainWindowConstructor)
|
||||
|
||||
BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(::demo::IViewModel)
|
||||
::vl::WString GetMessageFromName(const ::vl::WString& name) override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(GetMessageFromName, name);
|
||||
}
|
||||
END_INTERFACE_PROXY(::demo::IViewModel)
|
||||
#endif
|
||||
|
||||
extern bool LoadDemoTypes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,42 +1,365 @@
|
||||
/***********************************************************************
|
||||
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
|
||||
{
|
||||
/***********************************************************************
|
||||
Closure Definitions
|
||||
***********************************************************************/
|
||||
|
||||
struct __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__
|
||||
{
|
||||
::demo::MainWindowConstructor* __vwsnthis_0;
|
||||
|
||||
__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0);
|
||||
|
||||
void operator()(::vl::reflection::description::Value __vwsn_value_) const;
|
||||
};
|
||||
|
||||
class __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription : public ::vl::Object, public virtual ::vl::reflection::description::IValueSubscription
|
||||
{
|
||||
public:
|
||||
::demo::MainWindowConstructor* __vwsnthis_0;
|
||||
|
||||
__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0);
|
||||
|
||||
::vl::presentation::controls::GuiSinglelineTextBox* __vwsn_bind_cache_0 = nullptr;
|
||||
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0;
|
||||
bool __vwsn_bind_opened_ = false;
|
||||
bool __vwsn_bind_closed_ = false;
|
||||
::vl::Ptr<::vl::reflection::description::IValueDictionary> __vwsn_bind_listeners_;
|
||||
void __vwsn_bind_activator_();
|
||||
void __vwsn_bind_callback_0_0(::vl::presentation::compositions::GuiGraphicsComposition* __vwsn_bind_callback_argument_0, ::vl::presentation::compositions::GuiEventArgs* __vwsn_bind_callback_argument_1);
|
||||
void __vwsn_bind_initialize_();
|
||||
::vl::Ptr<::vl::reflection::description::IValueListener> Subscribe(const ::vl::Func<void(::vl::reflection::description::Value)>& __vwsn_bind_callback_) override;
|
||||
bool Update() override;
|
||||
bool Close() override;
|
||||
};
|
||||
|
||||
class __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener : public ::vl::Object, public virtual ::vl::reflection::description::IValueListener
|
||||
{
|
||||
public:
|
||||
::vl::Ptr<::vl::reflection::description::IValueDictionary> __vwsn_bind_listeners_;
|
||||
::vl::reflection::description::IValueSubscription* __vwsn_subscription_;
|
||||
::vl::reflection::description::IValueSubscription* __vwsnthis_0;
|
||||
::demo::MainWindowConstructor* __vwsnthis_1;
|
||||
|
||||
__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener(::vl::Ptr<::vl::reflection::description::IValueDictionary> __vwsnctor___vwsn_bind_listeners_, ::vl::reflection::description::IValueSubscription* __vwsnctor___vwsn_subscription_, ::vl::reflection::description::IValueSubscription* __vwsnctorthis_0, ::demo::MainWindowConstructor* __vwsnctorthis_1);
|
||||
|
||||
::vl::reflection::description::IValueSubscription* GetSubscription() override;
|
||||
bool GetStopped() override;
|
||||
bool StopListening() override;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(::demo::MainWindowConstructor* __vwsnctorthis_0)
|
||||
:__vwsnthis_0(__vwsnctorthis_0)
|
||||
{
|
||||
}
|
||||
|
||||
void __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__::operator()(::vl::reflection::description::Value __vwsn_value_) const
|
||||
{
|
||||
auto __vwsn_old_ = ::vl::__vwsn::This(::vl::__vwsn::This(__vwsnthis_0)->__vwsn_precompile_7)->GetText();
|
||||
auto __vwsn_new_ = ::vl::__vwsn::Unbox<::vl::WString>(__vwsn_value_);
|
||||
if ((__vwsn_old_ == __vwsn_new_))
|
||||
{
|
||||
return;
|
||||
}
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(__vwsnthis_0)->__vwsn_precompile_7)->SetText(__vwsn_new_);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::MainWindowConstructor* __vwsnctorthis_0)
|
||||
:__vwsnthis_0(__vwsnctorthis_0)
|
||||
{
|
||||
this->__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiSinglelineTextBox*>(nullptr);
|
||||
this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
|
||||
this->__vwsn_bind_opened_ = false;
|
||||
this->__vwsn_bind_closed_ = false;
|
||||
this->__vwsn_bind_listeners_ = ::vl::reflection::description::IValueDictionary::Create();
|
||||
}
|
||||
|
||||
void __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_()
|
||||
{
|
||||
auto __vwsn_bind_activator_result_ = ::vl::__vwsn::This(::vl::__vwsn::This(__vwsnthis_0)->ViewModel.Obj())->GetMessageFromName(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetText());
|
||||
using __vwsnt_0 = ::vl::reflection::description::Value;
|
||||
FOREACH(__vwsnt_0, __vwsn_bind_callback_, ::vl::reflection::description::GetLazyList<::vl::reflection::description::Value>(::vl::__vwsn::This(__vwsn_bind_listeners_.Obj())->GetValues()))
|
||||
{
|
||||
::vl::__vwsn::Unbox<::vl::Func<void(::vl::reflection::description::Value)>>(__vwsn_bind_callback_)(::vl::__vwsn::Box(__vwsn_bind_activator_result_));
|
||||
}
|
||||
}
|
||||
|
||||
void __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0(::vl::presentation::compositions::GuiGraphicsComposition* __vwsn_bind_callback_argument_0, ::vl::presentation::compositions::GuiEventArgs* __vwsn_bind_callback_argument_1)
|
||||
{
|
||||
::vl::__vwsn::This(this)->__vwsn_bind_activator_();
|
||||
}
|
||||
|
||||
void __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_initialize_()
|
||||
{
|
||||
(__vwsn_bind_cache_0 = ::vl::__vwsn::This(__vwsnthis_0)->textBoxName);
|
||||
(__vwsn_bind_handler_0_0 = ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->TextChanged, ::vl::Func<void(::vl::presentation::compositions::GuiGraphicsComposition*, ::vl::presentation::compositions::GuiEventArgs*)>(::vl::__vwsn::This(this), &__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)));
|
||||
}
|
||||
|
||||
::vl::Ptr<::vl::reflection::description::IValueListener> __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Subscribe(const ::vl::Func<void(::vl::reflection::description::Value)>& __vwsn_bind_callback_)
|
||||
{
|
||||
if ((! __vwsn_bind_opened_))
|
||||
{
|
||||
(__vwsn_bind_opened_ = true);
|
||||
::vl::__vwsn::This(this)->__vwsn_bind_initialize_();
|
||||
}
|
||||
auto __vwsn_subscription_ = this;
|
||||
auto __vwsn_listener_shared_ = ::vl::Ptr<::vl::reflection::description::IValueListener>(new ::vl_workflow_global::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener(__vwsn_bind_listeners_, __vwsn_subscription_, this, __vwsnthis_0));
|
||||
::vl::__vwsn::This(__vwsn_bind_listeners_.Obj())->Set(::vl::__vwsn::Box(__vwsn_listener_shared_), ::vl::__vwsn::Box(__vwsn_bind_callback_));
|
||||
return __vwsn_listener_shared_;
|
||||
}
|
||||
|
||||
bool __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Update()
|
||||
{
|
||||
if ((! __vwsn_bind_closed_))
|
||||
{
|
||||
::vl::__vwsn::This(this)->__vwsn_bind_activator_();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Close()
|
||||
{
|
||||
if ((! __vwsn_bind_closed_))
|
||||
{
|
||||
(__vwsn_bind_closed_ = true);
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->TextChanged, __vwsn_bind_handler_0_0);
|
||||
(__vwsn_bind_cache_0 = static_cast<::vl::presentation::controls::GuiSinglelineTextBox*>(nullptr));
|
||||
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
::vl::__vwsn::This(__vwsn_bind_listeners_.Obj())->Clear();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener(::vl::Ptr<::vl::reflection::description::IValueDictionary> __vwsnctor___vwsn_bind_listeners_, ::vl::reflection::description::IValueSubscription* __vwsnctor___vwsn_subscription_, ::vl::reflection::description::IValueSubscription* __vwsnctorthis_0, ::demo::MainWindowConstructor* __vwsnctorthis_1)
|
||||
:__vwsn_bind_listeners_(__vwsnctor___vwsn_bind_listeners_)
|
||||
, __vwsn_subscription_(__vwsnctor___vwsn_subscription_)
|
||||
, __vwsnthis_0(__vwsnctorthis_0)
|
||||
, __vwsnthis_1(__vwsnctorthis_1)
|
||||
{
|
||||
}
|
||||
|
||||
::vl::reflection::description::IValueSubscription* __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener::GetSubscription()
|
||||
{
|
||||
return ::vl::__vwsn::This(this)->__vwsn_subscription_;
|
||||
}
|
||||
|
||||
bool __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener::GetStopped()
|
||||
{
|
||||
return (! ::vl::__vwsn::This(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_bind_listeners_.Obj())->GetKeys().Obj())->Contains(::vl::__vwsn::Box(this)));
|
||||
}
|
||||
|
||||
bool __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener::StopListening()
|
||||
{
|
||||
if (::vl::__vwsn::This(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_bind_listeners_.Obj())->GetKeys().Obj())->Contains(::vl::__vwsn::Box(this)))
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_bind_listeners_.Obj())->Remove(::vl::__vwsn::Box(this));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
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)->ViewModel = ::vl::__vwsn::This(__vwsn_this_)->GetViewModel());
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_8 = ::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->GetBoundsComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_8)->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"Binding_ViewModel", false));
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_1 = new ::vl::presentation::compositions::GuiTableComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = 0; __vwsn_temp__.top = 0; __vwsn_temp__.right = 0; __vwsn_temp__.bottom = 0; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren);
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetCellPadding(::vl::__vwsn::Parse<::vl::vint32_t>(::vl::WString(L"5", false)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetRowsAndColumns(3, 3);
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetRowOption(0, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetRowOption(1, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetRowOption(2, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = 1.0; return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetColumnOption(0, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::MinSize; return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetColumnOption(1, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Absolute; __vwsn_temp__.absolute = 100; return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->SetColumnOption(2, [&](){ ::vl::presentation::compositions::GuiCellOption __vwsn_temp__; __vwsn_temp__.composeType = ::vl::presentation::compositions::GuiCellOption::ComposeType::Percentage; __vwsn_temp__.percentage = 1.0; return __vwsn_temp__; }());
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_2 = new ::vl::presentation::compositions::GuiCellComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_2)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = 0; __vwsn_temp__.top = 5; __vwsn_temp__.right = 0; __vwsn_temp__.bottom = 5; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_2)->SetSite(0, 0, 1, 1);
|
||||
}
|
||||
{
|
||||
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle();
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_3 = new ::vl::presentation::controls::GuiLabel(__vwsn_controlStyle_));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_3)->SetText(::vl::WString(L"Type your name : ", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_2)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_3)->GetBoundsComposition())));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this)->__vwsn_precompile_2)));
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_4 = new ::vl::presentation::compositions::GuiCellComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_4)->SetSite(0, 1, 1, 1);
|
||||
}
|
||||
{
|
||||
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateTextBoxStyle();
|
||||
(::vl::__vwsn::This(this)->textBoxName = new ::vl::presentation::controls::GuiSinglelineTextBox(__vwsn_controlStyle_));
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_5 = ::vl::__vwsn::This(::vl::__vwsn::This(this)->textBoxName)->GetBoundsComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_5)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = 0; __vwsn_temp__.top = 0; __vwsn_temp__.right = 0; __vwsn_temp__.bottom = 0; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->textBoxName)->SetText(::vl::WString(L"Jack", false));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_4)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(::vl::__vwsn::This(this)->textBoxName)->GetBoundsComposition())));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this)->__vwsn_precompile_4)));
|
||||
}
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_6 = new ::vl::presentation::compositions::GuiCellComposition());
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = 0; __vwsn_temp__.top = 5; __vwsn_temp__.right = 0; __vwsn_temp__.bottom = 5; return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_6)->SetSite(1, 0, 1, 2);
|
||||
}
|
||||
{
|
||||
auto __vwsn_controlStyle_ = ::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateLabelStyle();
|
||||
(::vl::__vwsn::This(this)->__vwsn_precompile_7 = new ::vl::presentation::controls::GuiLabel(__vwsn_controlStyle_));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_6)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_7)->GetBoundsComposition())));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_1)->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this)->__vwsn_precompile_6)));
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(::vl::__vwsn::This(::vl::__vwsn::This(this)->__vwsn_precompile_0)->GetContainerComposition())->AddChild(::vl::__vwsn::Ensure(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(::vl::__vwsn::This(this)->__vwsn_precompile_1)));
|
||||
}
|
||||
{
|
||||
auto __vwsn_created_subscription_ = ::vl::__vwsn::This(__vwsn_this_)->AddSubscription(::vl::Ptr<::vl::reflection::description::IValueSubscription>(new ::vl_workflow_global::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(this)));
|
||||
::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->Subscribe(LAMBDA(::vl_workflow_global::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__(this)));
|
||||
::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->Update();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::OnCreate()
|
||||
MainWindowConstructor::MainWindowConstructor()
|
||||
{
|
||||
}
|
||||
|
||||
void MainWindow::OnDestroy()
|
||||
/***********************************************************************
|
||||
Class (::demo::MainWindow)
|
||||
***********************************************************************/
|
||||
|
||||
::vl::Ptr<::demo::IViewModel> MainWindow::GetViewModel()
|
||||
{
|
||||
return ::vl::__vwsn::This(this)->__vwsn_parameter_ViewModel;
|
||||
}
|
||||
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
|
||||
MainWindow::MainWindow(vl::Ptr<demo::IViewModel> ViewModel)
|
||||
MainWindow::MainWindow(::vl::Ptr<::demo::IViewModel> __vwsn_ctor_parameter_ViewModel)
|
||||
: ::vl::presentation::controls::GuiWindow(::vl::__vwsn::This(::vl::presentation::theme::GetCurrentTheme())->CreateWindowStyle())
|
||||
{
|
||||
InitializeComponents(ViewModel);
|
||||
OnCreate();
|
||||
(::vl::__vwsn::This(this)->__vwsn_parameter_ViewModel = __vwsn_ctor_parameter_ViewModel);
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
Class (::demo::IViewModel)
|
||||
***********************************************************************/
|
||||
|
||||
}
|
||||
#undef GLOBAL_SYMBOL
|
||||
#undef GLOBAL_NAME
|
||||
#undef GLOBAL_OBJ
|
||||
#undef USERIMPL
|
||||
|
||||
/***********************************************************************
|
||||
Reflection
|
||||
***********************************************************************/
|
||||
|
||||
namespace vl
|
||||
{
|
||||
@@ -44,56 +367,72 @@ namespace vl
|
||||
{
|
||||
namespace description
|
||||
{
|
||||
#define _ ,
|
||||
IMPL_CPP_TYPE_INFO(demo::IViewModel)
|
||||
IMPL_CPP_TYPE_INFO(demo::MainWindow)
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
IMPL_CPP_TYPE_INFO(::demo::IViewModel)
|
||||
IMPL_CPP_TYPE_INFO(::demo::MainWindow)
|
||||
IMPL_CPP_TYPE_INFO(::demo::MainWindowConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(demo::IViewModel)
|
||||
CLASS_MEMBER_BASE(::vl::reflection::IDescriptable)
|
||||
CLASS_MEMBER_METHOD(GetMessageFromName, { L"name" });
|
||||
END_CLASS_MEMBER(demo::IViewModel)
|
||||
#define _ ,
|
||||
BEGIN_INTERFACE_MEMBER(::demo::IViewModel)
|
||||
CLASS_MEMBER_METHOD(GetMessageFromName, { L"name" })
|
||||
END_INTERFACE_MEMBER(::demo::IViewModel)
|
||||
|
||||
BEGIN_CLASS_MEMBER(demo::MainWindow)
|
||||
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
|
||||
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(vl::Ptr<demo::IViewModel>), { L"ViewModel" })
|
||||
BEGIN_CLASS_MEMBER(::demo::MainWindow)
|
||||
CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER)
|
||||
CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel)
|
||||
CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel)
|
||||
END_CLASS_MEMBER(::demo::MainWindow)
|
||||
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewModel)
|
||||
END_CLASS_MEMBER(demo::MainWindow)
|
||||
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)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
|
||||
CLASS_MEMBER_FIELD(ViewModel)
|
||||
CLASS_MEMBER_FIELD(textBoxName)
|
||||
END_CLASS_MEMBER(::demo::MainWindowConstructor)
|
||||
|
||||
#undef _
|
||||
|
||||
class DemoResourceLoader : public Object, public ITypeLoader
|
||||
#undef _
|
||||
class DemoTypeLoader : public Object, public ITypeLoader
|
||||
{
|
||||
public:
|
||||
void Load(ITypeManager* manager)
|
||||
{
|
||||
ADD_TYPE_INFO(demo::IViewModel)
|
||||
ADD_TYPE_INFO(demo::MainWindow)
|
||||
ADD_TYPE_INFO(::demo::IViewModel)
|
||||
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,95 +1,112 @@
|
||||
/***********************************************************************
|
||||
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 vl_workflow_global
|
||||
{
|
||||
class __vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
class __vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
struct __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
}
|
||||
|
||||
namespace demo
|
||||
{
|
||||
class IViewModel;
|
||||
class MainWindowConstructor;
|
||||
class MainWindow;
|
||||
class IViewModel;
|
||||
|
||||
class IViewModel : public virtual ::vl::reflection::IDescriptable, public vl::reflection::Description<IViewModel>
|
||||
class MainWindowConstructor : public ::vl::Object, public ::vl::reflection::Description<MainWindowConstructor>
|
||||
{
|
||||
friend class ::vl_workflow_global::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend struct ::vl_workflow_global::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindowConstructor>;
|
||||
#endif
|
||||
protected:
|
||||
::vl::Ptr<::demo::IViewModel> ViewModel = ::vl::Ptr<::demo::IViewModel>();
|
||||
::vl::presentation::controls::GuiSinglelineTextBox* textBoxName = static_cast<::vl::presentation::controls::GuiSinglelineTextBox*>(nullptr);
|
||||
::demo::MainWindow* __vwsn_precompile_0 = static_cast<::demo::MainWindow*>(nullptr);
|
||||
::vl::presentation::compositions::GuiTableComposition* __vwsn_precompile_1 = static_cast<::vl::presentation::compositions::GuiTableComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_2 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::presentation::controls::GuiLabel* __vwsn_precompile_3 = static_cast<::vl::presentation::controls::GuiLabel*>(nullptr);
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_4 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_5 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_6 = static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr);
|
||||
::vl::presentation::controls::GuiLabel* __vwsn_precompile_7 = static_cast<::vl::presentation::controls::GuiLabel*>(nullptr);
|
||||
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_8 = static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr);
|
||||
void __vwsn_initialize_instance_(::demo::MainWindow* __vwsn_this_, ::vl::presentation::GuiResourcePathResolver* __vwsn_resolver_);
|
||||
public:
|
||||
virtual ::vl::WString GetMessageFromName(::vl::WString name) = 0;
|
||||
MainWindowConstructor();
|
||||
};
|
||||
|
||||
template<typename TImpl>
|
||||
class MainWindow_ : public ::vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>, public vl::reflection::Description<TImpl>
|
||||
class MainWindow : public ::vl::presentation::controls::GuiWindow, public ::demo::MainWindowConstructor, public ::vl::reflection::Description<MainWindow>
|
||||
{
|
||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||
private:
|
||||
vl::Ptr<demo::IViewModel> ViewModel_;
|
||||
protected:
|
||||
::vl::presentation::controls::GuiSinglelineTextBox* textBoxName;
|
||||
|
||||
void InitializeComponents(vl::Ptr<demo::IViewModel> ViewModel)
|
||||
{
|
||||
ViewModel_ = ViewModel;
|
||||
if (InitializeFromResource())
|
||||
{
|
||||
GUI_INSTANCE_REFERENCE(textBoxName);
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewModel_ = 0;
|
||||
}
|
||||
}
|
||||
friend class ::demo::MainWindowConstructor;
|
||||
friend class ::vl_workflow_global::__vwsnc1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription;
|
||||
friend class ::vl_workflow_global::__vwsnc2_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__Subscribe__vl_reflection_description_IValueListener;
|
||||
friend struct ::vl_workflow_global::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_initialize_instance__;
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindow>;
|
||||
#endif
|
||||
public:
|
||||
MainWindow_()
|
||||
:vl::presentation::GuiInstancePartialClass<::vl::presentation::controls::GuiWindow>(L"demo::MainWindow")
|
||||
,::vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
|
||||
,textBoxName(0)
|
||||
{
|
||||
}
|
||||
|
||||
vl::Ptr<demo::IViewModel> GetViewModel()
|
||||
{
|
||||
return ViewModel_;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
namespace vl
|
||||
{
|
||||
namespace reflection
|
||||
{
|
||||
namespace description
|
||||
{
|
||||
DECL_TYPE_INFO(demo::IViewModel)
|
||||
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
|
||||
public:
|
||||
MainWindow(vl::Ptr<demo::IViewModel> ViewModel);
|
||||
::vl::Ptr<::demo::IViewModel> __vwsn_parameter_ViewModel = ::vl::Ptr<::demo::IViewModel>();
|
||||
::vl::Ptr<::demo::IViewModel> GetViewModel();
|
||||
MainWindow(::vl::Ptr<::demo::IViewModel> __vwsn_ctor_parameter_ViewModel);
|
||||
~MainWindow();
|
||||
};
|
||||
|
||||
class IViewModel : public virtual ::vl::reflection::IDescriptable, public ::vl::reflection::Description<IViewModel>
|
||||
{
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<IViewModel>;
|
||||
#endif
|
||||
public:
|
||||
virtual ::vl::WString GetMessageFromName(const ::vl::WString& name) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
/***********************************************************************
|
||||
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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user