Enable resource dependency

This commit is contained in:
Zihan Chen
2018-07-01 17:27:02 -07:00
parent 8267e4e213
commit 018fd6b10a
24 changed files with 5880 additions and 12 deletions
@@ -153,10 +153,19 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="Main.cpp" />
<ClCompile Include="UI\Source\DocumentEditorRibbon.cpp" />
<ClCompile Include="UI\Source\EditorRibbonPartialClasses.cpp" />
<ClCompile Include="UI\Source\EditorRibbonReflection.cpp" />
</ItemGroup>
<ItemGroup>
<Xml Include="UI\ResourceRibbon.xml" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="UI\Source\DocumentEditorRibbon.h" />
<ClInclude Include="UI\Source\EditorRibbon.h" />
<ClInclude Include="UI\Source\EditorRibbonPartialClasses.h" />
<ClInclude Include="UI\Source\EditorRibbonReflection.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
@@ -13,15 +13,41 @@
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="UI">
<UniqueIdentifier>{886fe45e-c41a-4cab-a5fe-fae54d9d2bff}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="UI\Source\DocumentEditorRibbon.cpp">
<Filter>UI</Filter>
</ClCompile>
<ClCompile Include="UI\Source\EditorRibbonPartialClasses.cpp">
<Filter>UI</Filter>
</ClCompile>
<ClCompile Include="UI\Source\EditorRibbonReflection.cpp">
<Filter>UI</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Xml Include="UI\ResourceRibbon.xml">
<Filter>Resource Files</Filter>
</Xml>
</ItemGroup>
<ItemGroup>
<ClInclude Include="UI\Source\DocumentEditorRibbon.h">
<Filter>UI</Filter>
</ClInclude>
<ClInclude Include="UI\Source\EditorRibbon.h">
<Filter>UI</Filter>
</ClInclude>
<ClInclude Include="UI\Source\EditorRibbonPartialClasses.h">
<Filter>UI</Filter>
</ClInclude>
<ClInclude Include="UI\Source\EditorRibbonReflection.h">
<Filter>UI</Filter>
</ClInclude>
</ItemGroup>
</Project>
@@ -1,5 +1,5 @@
#define GAC_HEADER_USE_NAMESPACE
#include "Demo.h"
#include "UI/Source/EditorRibbon.h"
using namespace vl::collections;
using namespace vl::stream;
@@ -10,11 +10,13 @@ void GuiMain()
{
{
FileStream fileStream(L"../UIRes/DocumentEditor.bin", FileStream::ReadOnly);
FileStream fileStream(L"../UIRes/DocumentEditorRibbon.bin", FileStream::ReadOnly);
auto resource = GuiResource::LoadPrecompiledBinary(fileStream);
GetResourceManager()->SetResource(resource);
GetResourceManager()->LoadResourceOrPending(fileStream);
}
demo::DocumentEditorRibbonWindow window;
{
FileStream fileStream(L"../UIRes/DocumentEditorRibbon.bin", FileStream::ReadOnly);
GetResourceManager()->LoadResourceOrPending(fileStream);
}
demo::MainWindow window;
window.MoveToScreenCenter();
GetApplication()->Run(&window);
}
@@ -10,7 +10,7 @@
<Folder name="Cpp">
<Text name="SourceFolder">Source</Text>
<Text name="Resource">..\..\UIRes\DocumentEditorRibbon.bin</Text>
<Text name="NormalInclude">GacUI.h</Text>
<Text name="NormalInclude">EditorBase.h</Text>
<Text name="ReflectionInclude">GacUIReflection.h</Text>
<Text name="Name">EditorRibbon</Text>
</Folder>
@@ -0,0 +1,204 @@
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe ResourceRibbon.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#include "EditorRibbon.h"
/* CodePack:BeginIgnore() */
#ifndef VCZH_DEBUG_NO_REFLECTION
/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, EditorRibbonReflection.h) */
#include "EditorRibbonReflection.h"
#endif
/* CodePack:EndIgnore() */
#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::EditorRibbon::
#define GLOBAL_NAME ::vl_workflow_global::EditorRibbon::Instance().
#define GLOBAL_OBJ &::vl_workflow_global::EditorRibbon::Instance()
#define USERIMPL(...)
/***********************************************************************
Class (::demo::DocumentEditorRibbon)
***********************************************************************/
namespace demo
{
bool DocumentEditorRibbon::GetAlignLeftSelected()
{
return this->__vwsn_prop_AlignLeftSelected;
}
void DocumentEditorRibbon::SetAlignLeftSelected(bool __vwsn_value_)
{
if ((this->__vwsn_prop_AlignLeftSelected != __vwsn_value_))
{
(this->__vwsn_prop_AlignLeftSelected = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->AlignLeftSelectedChanged)();
}
}
bool DocumentEditorRibbon::GetAlignCenterSelected()
{
return this->__vwsn_prop_AlignCenterSelected;
}
void DocumentEditorRibbon::SetAlignCenterSelected(bool __vwsn_value_)
{
if ((this->__vwsn_prop_AlignCenterSelected != __vwsn_value_))
{
(this->__vwsn_prop_AlignCenterSelected = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->AlignCenterSelectedChanged)();
}
}
bool DocumentEditorRibbon::GetAlignRightSelected()
{
return this->__vwsn_prop_AlignRightSelected;
}
void DocumentEditorRibbon::SetAlignRightSelected(bool __vwsn_value_)
{
if ((this->__vwsn_prop_AlignRightSelected != __vwsn_value_))
{
(this->__vwsn_prop_AlignRightSelected = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->AlignRightSelectedChanged)();
}
}
::vl::Ptr<::vl::reflection::description::IValueList> DocumentEditorRibbon::GetStyleGroups()
{
return this->__vwsn_prop_StyleGroups;
}
void DocumentEditorRibbon::SetStyleGroups(::vl::Ptr<::vl::reflection::description::IValueList> __vwsn_value_)
{
if ((this->__vwsn_prop_StyleGroups.Obj() != __vwsn_value_.Obj()))
{
(this->__vwsn_prop_StyleGroups = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->StyleGroupsChanged)();
}
}
::vl::Ptr<::vl::reflection::description::IValueList> DocumentEditorRibbon::GenerateStyleGroups()
{
auto group1 = ::vl::Ptr<::demo::StyleGroup>(new ::demo::StyleGroup());
(::vl::__vwsn::This(group1.Obj())->Name = ::vl::WString(L"Headers", false));
::vl::__vwsn::This(::vl::__vwsn::This(group1.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Header 1", false), [&](){ ::vl::presentation::DocumentFontSize __vwsn_temp__; __vwsn_temp__.size = static_cast<double>(2); __vwsn_temp__.relative = true; return __vwsn_temp__; }(), ::vl::Nullable<::vl::presentation::Color>(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#FF8000", false))), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group1.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Header 2", false), [&](){ ::vl::presentation::DocumentFontSize __vwsn_temp__; __vwsn_temp__.size = static_cast<double>(1.6); __vwsn_temp__.relative = true; return __vwsn_temp__; }(), ::vl::Nullable<::vl::presentation::Color>(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#FF8000", false))), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group1.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Header 3", false), [&](){ ::vl::presentation::DocumentFontSize __vwsn_temp__; __vwsn_temp__.size = static_cast<double>(1.3); __vwsn_temp__.relative = true; return __vwsn_temp__; }(), ::vl::Nullable<::vl::presentation::Color>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>()))));
auto group2 = ::vl::Ptr<::demo::StyleGroup>(new ::demo::StyleGroup());
(::vl::__vwsn::This(group2.Obj())->Name = ::vl::WString(L"Content", false));
::vl::__vwsn::This(::vl::__vwsn::This(group2.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Strong", false), ::vl::Nullable<::vl::presentation::DocumentFontSize>(), ::vl::Nullable<::vl::presentation::Color>(), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group2.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Quote", false), ::vl::Nullable<::vl::presentation::DocumentFontSize>(), ::vl::Nullable<::vl::presentation::Color>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>(), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group2.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Emphasis", false), ::vl::Nullable<::vl::presentation::DocumentFontSize>(), ::vl::Nullable<::vl::presentation::Color>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group2.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Intense Emphasis", false), ::vl::Nullable<::vl::presentation::DocumentFontSize>(), ::vl::Nullable<::vl::presentation::Color>(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#8080FF", false))), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group2.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Deleted", false), ::vl::Nullable<::vl::presentation::DocumentFontSize>(), ::vl::Nullable<::vl::presentation::Color>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(true)))));
auto styles = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueDictionary>(::vl::__vwsn::This(::vl::__vwsn::This(this->document)->GetDocument().Obj())->styles);
{
auto __vwsn_for_enumerable_styleItem = ::vl::Ptr<::vl::reflection::description::IValueEnumerable>(::vl::__vwsn::This(group1.Obj())->Items);
auto __vwsn_for_enumerator_styleItem = ::vl::__vwsn::This(__vwsn_for_enumerable_styleItem.Obj())->CreateEnumerator();
while (::vl::__vwsn::This(__vwsn_for_enumerator_styleItem.Obj())->Next())
{
auto styleItem = ::vl::__vwsn::Unbox<::vl::Ptr<::demo::StyleItem>>(::vl::__vwsn::This(__vwsn_for_enumerator_styleItem.Obj())->GetCurrent());
{
::vl::__vwsn::This(styles.Obj())->Set(::vl::__vwsn::Box(::vl::__vwsn::This(styleItem.Obj())->Name), ::vl::__vwsn::Box(::vl::__vwsn::This(styleItem.Obj())->Style));
}
}
}
{
auto __vwsn_for_enumerable_styleItem = ::vl::Ptr<::vl::reflection::description::IValueEnumerable>(::vl::__vwsn::This(group2.Obj())->Items);
auto __vwsn_for_enumerator_styleItem = ::vl::__vwsn::This(__vwsn_for_enumerable_styleItem.Obj())->CreateEnumerator();
while (::vl::__vwsn::This(__vwsn_for_enumerator_styleItem.Obj())->Next())
{
auto styleItem = ::vl::__vwsn::Unbox<::vl::Ptr<::demo::StyleItem>>(::vl::__vwsn::This(__vwsn_for_enumerator_styleItem.Obj())->GetCurrent());
{
::vl::__vwsn::This(styles.Obj())->Set(::vl::__vwsn::Box(::vl::__vwsn::This(styleItem.Obj())->Name), ::vl::__vwsn::Box(::vl::__vwsn::This(styleItem.Obj())->Style));
}
}
}
return (::vl::__vwsn::CreateList().Add(group1).Add(group2)).list;
}
void DocumentEditorRibbon::SelectStyleName(const ::vl::Nullable<::vl::WString>& styleName)
{
if (static_cast<bool>(styleName))
{
{
auto __vwsn_for_begin_groupIndex = static_cast<::vl::vint>(0);
auto __vwsn_for_end_groupIndex = (::vl::__vwsn::This(this->GetStyleGroups().Obj())->GetCount() - static_cast<::vl::vint>(1));
auto groupIndex = __vwsn_for_begin_groupIndex;
while ((groupIndex <= __vwsn_for_end_groupIndex))
{
{
auto group = ::vl::__vwsn::Unbox<::vl::Ptr<::demo::StyleGroup>>(::vl::__vwsn::This(this->GetStyleGroups().Obj())->Get(groupIndex));
{
auto __vwsn_for_begin_itemIndex = static_cast<::vl::vint>(0);
auto __vwsn_for_end_itemIndex = (::vl::__vwsn::This(::vl::__vwsn::This(group.Obj())->Items.Obj())->GetCount() - static_cast<::vl::vint>(1));
auto itemIndex = __vwsn_for_begin_itemIndex;
while ((itemIndex <= __vwsn_for_end_itemIndex))
{
{
if ((::vl::__vwsn::This(::vl::__vwsn::Unbox<::vl::Ptr<::demo::StyleItem>>(::vl::__vwsn::This(::vl::__vwsn::This(group.Obj())->Items.Obj())->Get(itemIndex)).Obj())->Name == styleName.Value()))
{
::vl::__vwsn::This(this->styleGallery)->SelectItem(::vl::__vwsn::This(this->styleGallery)->GalleryPosToIndex([&](){ ::vl::presentation::controls::GalleryPos __vwsn_temp__; __vwsn_temp__.group = groupIndex; __vwsn_temp__.item = itemIndex; return __vwsn_temp__; }()));
return;
}
}
(itemIndex = (itemIndex + static_cast<::vl::vint>(1)));
}
}
}
(groupIndex = (groupIndex + static_cast<::vl::vint>(1)));
}
}
}
::vl::__vwsn::This(this->styleGallery)->SelectItem((- static_cast<::vl::vint>(1)));
}
DocumentEditorRibbon::DocumentEditorRibbon()
: __vwsn_prop_AlignLeftSelected(true)
, __vwsn_prop_AlignCenterSelected(true)
, __vwsn_prop_AlignRightSelected(true)
, __vwsn_prop_StyleGroups(::vl::Ptr<::vl::reflection::description::IValueList>())
{
auto __vwsn_resource_ = ::vl::__vwsn::This(::vl::presentation::GetResourceManager())->GetResourceFromClassName(::vl::WString(L"demo::DocumentEditorRibbon", 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)->SetResourceResolver(__vwsn_resolver_);
::vl::__vwsn::This(this)->__vwsn_demo_DocumentEditorRibbon_Initialize(this);
this->__vwsn_instance_ctor_();
}
void DocumentEditorRibbon::__vwsn_instance_ctor_()
{
this->SetStyleGroups(this->GenerateStyleGroups());
::vl::__vwsn::EventAttach(::vl::__vwsn::This(this->document)->SelectionChanged, LAMBDA(::vl_workflow_global::__vwsnf17_EditorRibbon_demo_DocumentEditorRibbon___vwsn_instance_ctor__(this)));
}
DocumentEditorRibbon::~DocumentEditorRibbon()
{
this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiCustomControl*>(this));
}
}
#undef GLOBAL_SYMBOL
#undef GLOBAL_NAME
#undef GLOBAL_OBJ
#undef USERIMPL
#if defined( _MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__)
#pragma clang diagnostic pop
#endif
@@ -0,0 +1,93 @@
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe ResourceRibbon.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DOCUMENTEDITORRIBBON
#define VCZH_WORKFLOW_COMPILER_GENERATED_DOCUMENTEDITORRIBBON
#include "EditorRibbonPartialClasses.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 DocumentEditorRibbon : public ::demo::DocumentEditorBase, public ::demo::DocumentEditorRibbonConstructor, public ::vl::reflection::Description<DocumentEditorRibbon>
{
friend struct ::vl_workflow_global::__vwsnf17_EditorRibbon_demo_DocumentEditorRibbon___vwsn_instance_ctor__;
friend class ::demo::DocumentEditorRibbonConstructor;
friend class ::vl_workflow_global::__vwsnc10_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc2_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc3_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc4_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc5_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc6_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc7_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc8_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc9_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend struct ::vl_workflow_global::__vwsnf10_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf11_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf12_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf13_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf14_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf15_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf16_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf2_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf3_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf4_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf5_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf6_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf7_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf8_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf9_EditorRibbon_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
#ifndef VCZH_DEBUG_NO_REFLECTION
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<DocumentEditorRibbon>;
#endif
private:
bool __vwsn_prop_AlignLeftSelected;
bool GetAlignLeftSelected();
void SetAlignLeftSelected(bool __vwsn_value_);
::vl::Event<void()> AlignLeftSelectedChanged;
bool __vwsn_prop_AlignCenterSelected;
bool GetAlignCenterSelected();
void SetAlignCenterSelected(bool __vwsn_value_);
::vl::Event<void()> AlignCenterSelectedChanged;
bool __vwsn_prop_AlignRightSelected;
bool GetAlignRightSelected();
void SetAlignRightSelected(bool __vwsn_value_);
::vl::Event<void()> AlignRightSelectedChanged;
::vl::Ptr<::vl::reflection::description::IValueList> __vwsn_prop_StyleGroups;
::vl::Ptr<::vl::reflection::description::IValueList> GetStyleGroups();
void SetStyleGroups(::vl::Ptr<::vl::reflection::description::IValueList> __vwsn_value_);
::vl::Event<void()> StyleGroupsChanged;
::vl::Ptr<::vl::reflection::description::IValueList> GenerateStyleGroups();
void SelectStyleName(const ::vl::Nullable<::vl::WString>& styleName);
public:
DocumentEditorRibbon();
void __vwsn_instance_ctor_();
~DocumentEditorRibbon();
};
}
#if defined( _MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__)
#pragma clang diagnostic pop
#endif
#endif
@@ -0,0 +1,16 @@
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe ResourceRibbon.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_EDITORRIBBON
#define VCZH_WORKFLOW_COMPILER_GENERATED_EDITORRIBBON
#include "EditorRibbonPartialClasses.h"
#include "DocumentEditorRibbon.h"
#endif
@@ -0,0 +1,279 @@
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe ResourceRibbon.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#include "EditorRibbonReflection.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
/***********************************************************************
Reflection
***********************************************************************/
namespace vl
{
namespace reflection
{
namespace description
{
#ifndef VCZH_DEBUG_NO_REFLECTION
IMPL_CPP_TYPE_INFO(demo::DocumentEditorRibbon)
IMPL_CPP_TYPE_INFO(demo::DocumentEditorRibbonConstructor)
IMPL_CPP_TYPE_INFO(demo::MainWindow)
IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor)
IMPL_CPP_TYPE_INFO(demo::StyleGroup)
IMPL_CPP_TYPE_INFO(demo::StyleItem)
IMPL_CPP_TYPE_INFO(demo::StyleItemTemplate)
IMPL_CPP_TYPE_INFO(demo::StyleItemTemplateConstructor)
#define _ ,
BEGIN_CLASS_MEMBER(::demo::DocumentEditorRibbon)
CLASS_MEMBER_BASE(::demo::DocumentEditorBase)
CLASS_MEMBER_BASE(::demo::DocumentEditorRibbonConstructor)
CLASS_MEMBER_CONSTRUCTOR(::demo::DocumentEditorRibbon*(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_instance_ctor_, NO_PARAMETER)
CLASS_MEMBER_METHOD(GenerateStyleGroups, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetAlignCenterSelected, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetAlignLeftSelected, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetAlignRightSelected, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetStyleGroups, NO_PARAMETER)
CLASS_MEMBER_METHOD(SelectStyleName, { L"styleName" })
CLASS_MEMBER_METHOD(SetAlignCenterSelected, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetAlignLeftSelected, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetAlignRightSelected, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetStyleGroups, { L"__vwsn_value_" })
CLASS_MEMBER_EVENT(AlignCenterSelectedChanged)
CLASS_MEMBER_EVENT(AlignLeftSelectedChanged)
CLASS_MEMBER_EVENT(AlignRightSelectedChanged)
CLASS_MEMBER_EVENT(StyleGroupsChanged)
CLASS_MEMBER_FIELD(__vwsn_prop_AlignCenterSelected)
CLASS_MEMBER_FIELD(__vwsn_prop_AlignLeftSelected)
CLASS_MEMBER_FIELD(__vwsn_prop_AlignRightSelected)
CLASS_MEMBER_FIELD(__vwsn_prop_StyleGroups)
CLASS_MEMBER_PROPERTY_EVENT(AlignCenterSelected, GetAlignCenterSelected, SetAlignCenterSelected, AlignCenterSelectedChanged)
CLASS_MEMBER_PROPERTY_EVENT(AlignLeftSelected, GetAlignLeftSelected, SetAlignLeftSelected, AlignLeftSelectedChanged)
CLASS_MEMBER_PROPERTY_EVENT(AlignRightSelected, GetAlignRightSelected, SetAlignRightSelected, AlignRightSelectedChanged)
CLASS_MEMBER_PROPERTY_EVENT(StyleGroups, GetStyleGroups, SetStyleGroups, StyleGroupsChanged)
END_CLASS_MEMBER(::demo::DocumentEditorRibbon)
BEGIN_CLASS_MEMBER(::demo::DocumentEditorRibbonConstructor)
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::DocumentEditorRibbonConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_demo_DocumentEditorRibbon_Initialize, { L"__vwsn_this_" })
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
CLASS_MEMBER_FIELD(__vwsn_precompile_10)
CLASS_MEMBER_FIELD(__vwsn_precompile_11)
CLASS_MEMBER_FIELD(__vwsn_precompile_12)
CLASS_MEMBER_FIELD(__vwsn_precompile_13)
CLASS_MEMBER_FIELD(__vwsn_precompile_14)
CLASS_MEMBER_FIELD(__vwsn_precompile_15)
CLASS_MEMBER_FIELD(__vwsn_precompile_16)
CLASS_MEMBER_FIELD(__vwsn_precompile_17)
CLASS_MEMBER_FIELD(__vwsn_precompile_18)
CLASS_MEMBER_FIELD(__vwsn_precompile_19)
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
CLASS_MEMBER_FIELD(__vwsn_precompile_20)
CLASS_MEMBER_FIELD(__vwsn_precompile_21)
CLASS_MEMBER_FIELD(__vwsn_precompile_22)
CLASS_MEMBER_FIELD(__vwsn_precompile_23)
CLASS_MEMBER_FIELD(__vwsn_precompile_24)
CLASS_MEMBER_FIELD(__vwsn_precompile_25)
CLASS_MEMBER_FIELD(__vwsn_precompile_26)
CLASS_MEMBER_FIELD(__vwsn_precompile_27)
CLASS_MEMBER_FIELD(__vwsn_precompile_28)
CLASS_MEMBER_FIELD(__vwsn_precompile_29)
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
CLASS_MEMBER_FIELD(__vwsn_precompile_30)
CLASS_MEMBER_FIELD(__vwsn_precompile_31)
CLASS_MEMBER_FIELD(__vwsn_precompile_32)
CLASS_MEMBER_FIELD(__vwsn_precompile_33)
CLASS_MEMBER_FIELD(__vwsn_precompile_34)
CLASS_MEMBER_FIELD(__vwsn_precompile_35)
CLASS_MEMBER_FIELD(__vwsn_precompile_36)
CLASS_MEMBER_FIELD(__vwsn_precompile_37)
CLASS_MEMBER_FIELD(__vwsn_precompile_38)
CLASS_MEMBER_FIELD(__vwsn_precompile_39)
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
CLASS_MEMBER_FIELD(__vwsn_precompile_40)
CLASS_MEMBER_FIELD(__vwsn_precompile_41)
CLASS_MEMBER_FIELD(__vwsn_precompile_42)
CLASS_MEMBER_FIELD(__vwsn_precompile_43)
CLASS_MEMBER_FIELD(__vwsn_precompile_44)
CLASS_MEMBER_FIELD(__vwsn_precompile_45)
CLASS_MEMBER_FIELD(__vwsn_precompile_46)
CLASS_MEMBER_FIELD(__vwsn_precompile_47)
CLASS_MEMBER_FIELD(__vwsn_precompile_48)
CLASS_MEMBER_FIELD(__vwsn_precompile_49)
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
CLASS_MEMBER_FIELD(__vwsn_precompile_50)
CLASS_MEMBER_FIELD(__vwsn_precompile_51)
CLASS_MEMBER_FIELD(__vwsn_precompile_52)
CLASS_MEMBER_FIELD(__vwsn_precompile_53)
CLASS_MEMBER_FIELD(__vwsn_precompile_54)
CLASS_MEMBER_FIELD(__vwsn_precompile_55)
CLASS_MEMBER_FIELD(__vwsn_precompile_56)
CLASS_MEMBER_FIELD(__vwsn_precompile_57)
CLASS_MEMBER_FIELD(__vwsn_precompile_58)
CLASS_MEMBER_FIELD(__vwsn_precompile_59)
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
CLASS_MEMBER_FIELD(__vwsn_precompile_60)
CLASS_MEMBER_FIELD(__vwsn_precompile_61)
CLASS_MEMBER_FIELD(__vwsn_precompile_62)
CLASS_MEMBER_FIELD(__vwsn_precompile_63)
CLASS_MEMBER_FIELD(__vwsn_precompile_64)
CLASS_MEMBER_FIELD(__vwsn_precompile_65)
CLASS_MEMBER_FIELD(__vwsn_precompile_66)
CLASS_MEMBER_FIELD(__vwsn_precompile_67)
CLASS_MEMBER_FIELD(__vwsn_precompile_68)
CLASS_MEMBER_FIELD(__vwsn_precompile_69)
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
CLASS_MEMBER_FIELD(__vwsn_precompile_70)
CLASS_MEMBER_FIELD(__vwsn_precompile_71)
CLASS_MEMBER_FIELD(__vwsn_precompile_72)
CLASS_MEMBER_FIELD(__vwsn_precompile_73)
CLASS_MEMBER_FIELD(__vwsn_precompile_74)
CLASS_MEMBER_FIELD(__vwsn_precompile_75)
CLASS_MEMBER_FIELD(__vwsn_precompile_76)
CLASS_MEMBER_FIELD(__vwsn_precompile_77)
CLASS_MEMBER_FIELD(__vwsn_precompile_78)
CLASS_MEMBER_FIELD(__vwsn_precompile_79)
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
CLASS_MEMBER_FIELD(__vwsn_precompile_80)
CLASS_MEMBER_FIELD(__vwsn_precompile_81)
CLASS_MEMBER_FIELD(__vwsn_precompile_82)
CLASS_MEMBER_FIELD(__vwsn_precompile_83)
CLASS_MEMBER_FIELD(__vwsn_precompile_84)
CLASS_MEMBER_FIELD(__vwsn_precompile_85)
CLASS_MEMBER_FIELD(__vwsn_precompile_86)
CLASS_MEMBER_FIELD(__vwsn_precompile_87)
CLASS_MEMBER_FIELD(__vwsn_precompile_88)
CLASS_MEMBER_FIELD(__vwsn_precompile_89)
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
CLASS_MEMBER_FIELD(__vwsn_precompile_90)
CLASS_MEMBER_FIELD(__vwsn_precompile_91)
CLASS_MEMBER_FIELD(__vwsn_precompile_92)
CLASS_MEMBER_FIELD(__vwsn_precompile_93)
CLASS_MEMBER_FIELD(__vwsn_precompile_94)
CLASS_MEMBER_FIELD(__vwsn_precompile_95)
CLASS_MEMBER_FIELD(buttonHome)
CLASS_MEMBER_FIELD(dialogMessage)
CLASS_MEMBER_FIELD(self)
CLASS_MEMBER_FIELD(styleGallery)
CLASS_MEMBER_FIELD(toolstripHome)
END_CLASS_MEMBER(::demo::DocumentEditorRibbonConstructor)
BEGIN_CLASS_MEMBER(::demo::MainWindow)
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
CLASS_MEMBER_BASE(::demo::MainWindowConstructor)
CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER)
END_CLASS_MEMBER(::demo::MainWindow)
BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor)
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_demo_MainWindow_Initialize, { L"__vwsn_this_" })
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
CLASS_MEMBER_FIELD(editor)
END_CLASS_MEMBER(::demo::MainWindowConstructor)
BEGIN_CLASS_MEMBER(::demo::StyleGroup)
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::StyleGroup>(), NO_PARAMETER)
CLASS_MEMBER_FIELD(Items)
CLASS_MEMBER_FIELD(Name)
END_CLASS_MEMBER(::demo::StyleGroup)
BEGIN_CLASS_MEMBER(::demo::StyleItem)
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::StyleItem>(const ::vl::WString&, ::vl::Nullable<::vl::presentation::DocumentFontSize>, ::vl::Nullable<::vl::presentation::Color>, ::vl::Nullable<bool>, ::vl::Nullable<bool>, ::vl::Nullable<bool>, ::vl::Nullable<bool>), { L"name" _ L"size" _ L"color" _ L"bold" _ L"italic" _ L"underline" _ L"strikeline" })
CLASS_MEMBER_FIELD(Name)
CLASS_MEMBER_FIELD(Style)
END_CLASS_MEMBER(::demo::StyleItem)
BEGIN_CLASS_MEMBER(::demo::StyleItemTemplate)
CLASS_MEMBER_BASE(::vl::presentation::templates::GuiTextListItemTemplate)
CLASS_MEMBER_BASE(::demo::StyleItemTemplateConstructor)
CLASS_MEMBER_CONSTRUCTOR(::demo::StyleItemTemplate*(::vl::Ptr<::demo::StyleItem>), { L"__vwsn_ctor_parameter_ViewModel" })
CLASS_MEMBER_METHOD(__vwsn_instance_ctor_, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER)
CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel)
CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel)
END_CLASS_MEMBER(::demo::StyleItemTemplate)
BEGIN_CLASS_MEMBER(::demo::StyleItemTemplateConstructor)
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::StyleItemTemplateConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_demo_StyleItemTemplate_Initialize, { L"__vwsn_this_" })
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(ViewModel)
CLASS_MEMBER_FIELD(containerControl)
CLASS_MEMBER_FIELD(self)
CLASS_MEMBER_FIELD(styleLabel)
END_CLASS_MEMBER(::demo::StyleItemTemplateConstructor)
#undef _
class EditorRibbonTypeLoader : public Object, public ITypeLoader
{
public:
void Load(ITypeManager* manager)
{
ADD_TYPE_INFO(::demo::DocumentEditorRibbon)
ADD_TYPE_INFO(::demo::DocumentEditorRibbonConstructor)
ADD_TYPE_INFO(::demo::MainWindow)
ADD_TYPE_INFO(::demo::MainWindowConstructor)
ADD_TYPE_INFO(::demo::StyleGroup)
ADD_TYPE_INFO(::demo::StyleItem)
ADD_TYPE_INFO(::demo::StyleItemTemplate)
ADD_TYPE_INFO(::demo::StyleItemTemplateConstructor)
}
void Unload(ITypeManager* manager)
{
}
};
#endif
bool LoadEditorRibbonTypes()
{
#ifndef VCZH_DEBUG_NO_REFLECTION
if (auto manager = GetGlobalTypeManager())
{
return manager->AddTypeLoader(MakePtr<EditorRibbonTypeLoader>());
}
#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
@@ -0,0 +1,63 @@
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe ResourceRibbon.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_EDITORRIBBONREFLECTION
#define VCZH_WORKFLOW_COMPILER_GENERATED_EDITORRIBBONREFLECTION
#include "EditorRibbon.h"
#ifndef VCZH_DEBUG_NO_REFLECTION
#include "GacUIReflection.h"
#endif
#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
/***********************************************************************
Reflection
***********************************************************************/
namespace vl
{
namespace reflection
{
namespace description
{
#ifndef VCZH_DEBUG_NO_REFLECTION
DECL_TYPE_INFO(::demo::DocumentEditorRibbon)
DECL_TYPE_INFO(::demo::DocumentEditorRibbonConstructor)
DECL_TYPE_INFO(::demo::MainWindow)
DECL_TYPE_INFO(::demo::MainWindowConstructor)
DECL_TYPE_INFO(::demo::StyleGroup)
DECL_TYPE_INFO(::demo::StyleItem)
DECL_TYPE_INFO(::demo::StyleItemTemplate)
DECL_TYPE_INFO(::demo::StyleItemTemplateConstructor)
#endif
extern bool LoadEditorRibbonTypes();
}
}
}
#if defined( _MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__)
#pragma clang diagnostic pop
#endif
#endif