diff --git a/Tutorial/GacUI_Controls/GacUI_Controls.sln b/Tutorial/GacUI_Controls/GacUI_Controls.sln index c95b8212..e0c785ae 100644 --- a/Tutorial/GacUI_Controls/GacUI_Controls.sln +++ b/Tutorial/GacUI_Controls/GacUI_Controls.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2027 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31515.178 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ContainersAndButtons", "ContainersAndButtons\ContainersAndButtons.vcxproj", "{0C211930-C5DA-4567-A752-1D847CADEC1C}" EndProject @@ -39,6 +39,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TriplePhaseImageButton", "T EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QueryService", "QueryService\QueryService.vcxproj", "{54A3E487-AF4A-4148-B28C-6190A52CC5D1}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Win11ToolstripMenu", "Win11ToolstripMenu\Win11ToolstripMenu.vcxproj", "{1955DEBE-9913-45D6-B819-9ADB52E5A447}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -173,6 +175,14 @@ Global {54A3E487-AF4A-4148-B28C-6190A52CC5D1}.Release|Win32.Build.0 = Release|Win32 {54A3E487-AF4A-4148-B28C-6190A52CC5D1}.Release|x64.ActiveCfg = Release|x64 {54A3E487-AF4A-4148-B28C-6190A52CC5D1}.Release|x64.Build.0 = Release|x64 + {1955DEBE-9913-45D6-B819-9ADB52E5A447}.Debug|Win32.ActiveCfg = Debug|Win32 + {1955DEBE-9913-45D6-B819-9ADB52E5A447}.Debug|Win32.Build.0 = Debug|Win32 + {1955DEBE-9913-45D6-B819-9ADB52E5A447}.Debug|x64.ActiveCfg = Debug|x64 + {1955DEBE-9913-45D6-B819-9ADB52E5A447}.Debug|x64.Build.0 = Debug|x64 + {1955DEBE-9913-45D6-B819-9ADB52E5A447}.Release|Win32.ActiveCfg = Release|Win32 + {1955DEBE-9913-45D6-B819-9ADB52E5A447}.Release|Win32.Build.0 = Release|Win32 + {1955DEBE-9913-45D6-B819-9ADB52E5A447}.Release|x64.ActiveCfg = Release|x64 + {1955DEBE-9913-45D6-B819-9ADB52E5A447}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Tutorial/GacUI_Controls/UIRes/Win11ToolstripMenu.bin b/Tutorial/GacUI_Controls/UIRes/Win11ToolstripMenu.bin new file mode 100644 index 00000000..6072a5b4 Binary files /dev/null and b/Tutorial/GacUI_Controls/UIRes/Win11ToolstripMenu.bin differ diff --git a/Tutorial/GacUI_Controls/Win11ToolstripMenu/Main.cpp b/Tutorial/GacUI_Controls/Win11ToolstripMenu/Main.cpp new file mode 100644 index 00000000..027c0767 --- /dev/null +++ b/Tutorial/GacUI_Controls/Win11ToolstripMenu/Main.cpp @@ -0,0 +1,17 @@ +#define GAC_HEADER_USE_NAMESPACE +#include "UI/Source/Demo.h" +#include + +using namespace vl::collections; +using namespace vl::stream; + +void GuiMain() +{ + { + FileStream fileStream(L"../UIRes/Win11ToolstripMenu.bin", FileStream::ReadOnly); + GetResourceManager()->LoadResourceOrPending(fileStream); + } + demo::MainWindow window; + window.MoveToScreenCenter(); + GetApplication()->Run(&window); +} \ No newline at end of file diff --git a/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Resource.xml b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Resource.xml new file mode 100644 index 00000000..9b3cbba5 --- /dev/null +++ b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Resource.xml @@ -0,0 +1,75 @@ + + + + Source + ..\..\UIRes\Win11ToolstripMenu.bin + GacUI.h + Demo + + + + ../../../GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/ToolbarImages/Images.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/Demo.h b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/Demo.h new file mode 100644 index 00000000..7566a5bb --- /dev/null +++ b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/Demo.h @@ -0,0 +1,15 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMO +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMO + +#include "DemoPartialClasses.h" + +#endif diff --git a/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoPartialClasses.cpp new file mode 100644 index 00000000..42afb1e8 --- /dev/null +++ b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoPartialClasses.cpp @@ -0,0 +1,450 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "Demo.h" +/* CodePack:BeginIgnore() */ +#ifndef VCZH_DEBUG_NO_REFLECTION +/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */ +#include "DemoReflection.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::Demo:: +#define GLOBAL_NAME ::vl_workflow_global::Demo::Instance(). +#define GLOBAL_OBJ &::vl_workflow_global::Demo::Instance() + +/*********************************************************************** +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; + } + +/*********************************************************************** +Closures +***********************************************************************/ + + //------------------------------------------------------------------- + + __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + } + + ::vl::presentation::templates::GuiControlTemplate* __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_::operator()(const ::vl::reflection::description::Value& __vwsn_viewModel_) const + { + { + return static_cast<::vl::presentation::templates::GuiControlTemplate*>(new ::demo::MenuToolBarControlTemplate()); + } + } + + //------------------------------------------------------------------- + + __vwsnf2_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_::__vwsnf2_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_(::demo::MainWindowConstructor* __vwsnctorthis_0) + :__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0)) + { + } + + void __vwsnf2_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiMouseEventArgs* arguments) const + { + auto b = ::vl::__vwsn::This(::vl::__vwsn::This(__vwsnthis_0->self)->GetContainerComposition())->GetGlobalBounds(); + auto p = [&](){ ::vl::presentation::Point __vwsn_temp__; __vwsn_temp__.x = (::vl::__vwsn::This(arguments)->x + b.x1); __vwsn_temp__.y = (::vl::__vwsn::This(arguments)->y + b.y1); return __vwsn_temp__; }(); + ::vl::__vwsn::This(__vwsnthis_0->menuEdit)->ShowPopup(static_cast<::vl::presentation::controls::GuiControl*>(__vwsnthis_0->self), p); + } +} + +/*********************************************************************** +Class (::demo::MainWindowConstructor) +***********************************************************************/ + +namespace demo +{ + void MainWindowConstructor::__vwsn_demo_MainWindow_Initialize(::demo::MainWindow* __vwsn_this_) + { + (this->self = __vwsn_this_); + (this->__vwsn_precompile_17 = ::vl::__vwsn::This(this->self)->GetContainerComposition()); + (this->__vwsn_precompile_16 = ::vl::__vwsn::This(this->self)->GetBoundsComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_16)->SetPreferredMinSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(320); __vwsn_temp__.y = static_cast<::vl::vint>(240); return __vwsn_temp__; }()); + } + { + ::vl::__vwsn::This(this->self)->SetClientSize([&](){ ::vl::presentation::Size __vwsn_temp__; __vwsn_temp__.x = static_cast<::vl::vint>(640); __vwsn_temp__.y = static_cast<::vl::vint>(480); return __vwsn_temp__; }()); + } + { + ::vl::__vwsn::This(this->self)->SetText(::vl::WString(L"Win11ToolstripMenu", false)); + } + (this->commandCut = new ::vl::presentation::controls::GuiToolstripCommand()); + { + ::vl::__vwsn::This(this->commandCut)->SetShortcutBuilder(::vl::WString(L"Ctrl+X", false)); + } + { + ::vl::__vwsn::This(this->commandCut)->SetText(::vl::WString(L"Cut", false)); + } + { + ::vl::__vwsn::This(this->self)->AddComponent(static_cast<::vl::presentation::controls::GuiComponent*>(this->commandCut)); + } + (this->commandCopy = new ::vl::presentation::controls::GuiToolstripCommand()); + { + ::vl::__vwsn::This(this->commandCopy)->SetShortcutBuilder(::vl::WString(L"Ctrl+C", false)); + } + { + ::vl::__vwsn::This(this->commandCopy)->SetText(::vl::WString(L"Copy", false)); + } + { + ::vl::__vwsn::This(this->self)->AddComponent(static_cast<::vl::presentation::controls::GuiComponent*>(this->commandCopy)); + } + (this->commandPaste = new ::vl::presentation::controls::GuiToolstripCommand()); + { + ::vl::__vwsn::This(this->commandPaste)->SetShortcutBuilder(::vl::WString(L"Ctrl+V", false)); + } + { + ::vl::__vwsn::This(this->commandPaste)->SetText(::vl::WString(L"Paste", false)); + } + { + ::vl::__vwsn::This(this->self)->AddComponent(static_cast<::vl::presentation::controls::GuiComponent*>(this->commandPaste)); + } + (this->commandDelete = new ::vl::presentation::controls::GuiToolstripCommand()); + { + ::vl::__vwsn::This(this->commandDelete)->SetText(::vl::WString(L"Delete", false)); + } + { + ::vl::__vwsn::This(this->self)->AddComponent(static_cast<::vl::presentation::controls::GuiComponent*>(this->commandDelete)); + } + (this->commandUndo = new ::vl::presentation::controls::GuiToolstripCommand()); + { + ::vl::__vwsn::This(this->commandUndo)->SetShortcutBuilder(::vl::WString(L"Ctrl+Z", false)); + } + { + ::vl::__vwsn::This(this->commandUndo)->SetText(::vl::WString(L"Undo", false)); + } + { + ::vl::__vwsn::This(this->self)->AddComponent(static_cast<::vl::presentation::controls::GuiComponent*>(this->commandUndo)); + } + (this->commandRedo = new ::vl::presentation::controls::GuiToolstripCommand()); + { + ::vl::__vwsn::This(this->commandRedo)->SetShortcutBuilder(::vl::WString(L"Ctrl+Y", false)); + } + { + ::vl::__vwsn::This(this->commandRedo)->SetText(::vl::WString(L"Redo", false)); + } + { + ::vl::__vwsn::This(this->self)->AddComponent(static_cast<::vl::presentation::controls::GuiComponent*>(this->commandRedo)); + } + (this->commandExportPrivate = new ::vl::presentation::controls::GuiToolstripCommand()); + { + ::vl::__vwsn::This(this->commandExportPrivate)->SetText(::vl::WString(L"Export as Private Format", false)); + } + { + ::vl::__vwsn::This(this->self)->AddComponent(static_cast<::vl::presentation::controls::GuiComponent*>(this->commandExportPrivate)); + } + (this->commandExportRtf = new ::vl::presentation::controls::GuiToolstripCommand()); + { + ::vl::__vwsn::This(this->commandExportRtf)->SetText(::vl::WString(L"Export as Rich Text Format", false)); + } + { + ::vl::__vwsn::This(this->self)->AddComponent(static_cast<::vl::presentation::controls::GuiComponent*>(this->commandExportRtf)); + } + (this->commandExportHtml = new ::vl::presentation::controls::GuiToolstripCommand()); + { + ::vl::__vwsn::This(this->commandExportHtml)->SetText(::vl::WString(L"Export as HTML", false)); + } + { + ::vl::__vwsn::This(this->self)->AddComponent(static_cast<::vl::presentation::controls::GuiComponent*>(this->commandExportHtml)); + } + { + (this->menuEdit = new ::vl::presentation::controls::GuiToolstripMenu(::vl::presentation::theme::ThemeName::Menu, static_cast<::vl::presentation::controls::GuiControl*>(nullptr))); + } + { + (this->__vwsn_precompile_0 = new ::vl::presentation::controls::GuiToolstripGroupContainer(::vl::presentation::theme::ThemeName::CustomControl)); + } + { + (this->__vwsn_precompile_1 = new ::vl::presentation::controls::GuiToolstripGroup(::vl::presentation::theme::ThemeName::CustomControl)); + } + { + (this->__vwsn_precompile_2 = new ::vl::presentation::controls::GuiToolstripToolBar(::vl::presentation::theme::ThemeName::ToolstripToolBar)); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetControlTemplate(LAMBDA(::vl_workflow_global::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_(this))); + } + { + (this->__vwsn_precompile_3 = new ::vl::presentation::controls::GuiToolstripButton(::vl::presentation::theme::ThemeName::ToolstripButton)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_2)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_3)); + } + { + (this->__vwsn_precompile_4 = new ::vl::presentation::controls::GuiToolstripButton(::vl::presentation::theme::ThemeName::ToolstripButton)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_2)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_4)); + } + { + (this->__vwsn_precompile_5 = new ::vl::presentation::controls::GuiToolstripButton(::vl::presentation::theme::ThemeName::ToolstripButton)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_2)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_5)); + } + { + (this->__vwsn_precompile_6 = new ::vl::presentation::controls::GuiToolstripButton(::vl::presentation::theme::ThemeName::ToolstripButton)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_2)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_6)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_1)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_2)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_0)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_1)); + } + { + (this->__vwsn_precompile_7 = new ::vl::presentation::controls::GuiToolstripGroup(::vl::presentation::theme::ThemeName::CustomControl)); + } + { + (this->__vwsn_precompile_8 = new ::vl::presentation::controls::GuiToolstripButton(::vl::presentation::theme::ThemeName::MenuItemButton)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_7)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_8)); + } + { + (this->__vwsn_precompile_9 = new ::vl::presentation::controls::GuiToolstripButton(::vl::presentation::theme::ThemeName::MenuItemButton)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_7)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_9)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_0)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_7)); + } + { + (this->__vwsn_precompile_10 = new ::vl::presentation::controls::GuiToolstripGroup(::vl::presentation::theme::ThemeName::CustomControl)); + } + { + (this->__vwsn_precompile_11 = new ::vl::presentation::controls::GuiToolstripButton(::vl::presentation::theme::ThemeName::MenuItemButton)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_10)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_11)); + } + { + (this->__vwsn_precompile_12 = new ::vl::presentation::controls::GuiToolstripButton(::vl::presentation::theme::ThemeName::MenuItemButton)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_10)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_12)); + } + { + (this->__vwsn_precompile_13 = new ::vl::presentation::controls::GuiToolstripButton(::vl::presentation::theme::ThemeName::MenuItemButton)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_10)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_13)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->__vwsn_precompile_0)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_10)); + } + { + ::vl::__vwsn::This(::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueList>(::vl::__vwsn::This(this->menuEdit)->GetToolstripItems()).Obj())->Add(::vl::__vwsn::Box(this->__vwsn_precompile_0)); + } + { + ::vl::__vwsn::This(this->self)->AddControlHostComponent(static_cast<::vl::presentation::controls::GuiControlHost*>(this->menuEdit)); + } + { + (this->__vwsn_precompile_14 = new ::vl::presentation::controls::GuiLabel(::vl::presentation::theme::ThemeName::Label)); + } + (this->__vwsn_precompile_15 = ::vl::__vwsn::This(this->__vwsn_precompile_14)->GetBoundsComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_15)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(5); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(5); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_14)->SetFont(::vl::Nullable<::vl::presentation::FontProperties>([&](){ ::vl::presentation::FontProperties __vwsn_temp__; __vwsn_temp__.fontFamily = ::vl::WString(L"Segoe UI", false); __vwsn_temp__.size = static_cast<::vl::vint>(24); return __vwsn_temp__; }())); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_14)->SetText(::vl::WString(L"Right click to show the menu", false)); + } + { + ::vl::__vwsn::This(this->self)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->__vwsn_precompile_14)); + } + { + ::vl::__vwsn::This(this->commandCut)->SetImage(::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(::vl::__vwsn::This(__vwsn_this_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Images/Cut", false), true).Obj()))); + } + { + ::vl::__vwsn::This(this->commandCopy)->SetImage(::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(::vl::__vwsn::This(__vwsn_this_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Images/Copy", false), true).Obj()))); + } + { + ::vl::__vwsn::This(this->commandPaste)->SetImage(::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(::vl::__vwsn::This(__vwsn_this_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Images/Paste", false), true).Obj()))); + } + { + ::vl::__vwsn::This(this->commandDelete)->SetImage(::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(::vl::__vwsn::This(__vwsn_this_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Images/Delete", false), true).Obj()))); + } + { + ::vl::__vwsn::This(this->commandUndo)->SetImage(::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(::vl::__vwsn::This(__vwsn_this_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Images/Undo", false), true).Obj()))); + } + { + ::vl::__vwsn::This(this->commandRedo)->SetImage(::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(::vl::__vwsn::This(__vwsn_this_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Images/Redo", false), true).Obj()))); + } + { + ::vl::__vwsn::This(this->commandExportPrivate)->SetImage(::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(::vl::__vwsn::This(__vwsn_this_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Images/FormatPrivate", false), true).Obj()))); + } + { + ::vl::__vwsn::This(this->commandExportRtf)->SetImage(::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(::vl::__vwsn::This(__vwsn_this_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Images/FormatRtf", false), true).Obj()))); + } + { + ::vl::__vwsn::This(this->commandExportHtml)->SetImage(::vl::__vwsn::Ensure(::vl::__vwsn::SharedPtrCast<::vl::presentation::GuiImageData>(::vl::__vwsn::This(__vwsn_this_)->ResolveResource(::vl::WString(L"res", false), ::vl::WString(L"Images/FormatHtml", false), true).Obj()))); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_3)->SetCommand(this->commandCut); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_4)->SetCommand(this->commandCopy); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_5)->SetCommand(this->commandPaste); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetCommand(this->commandDelete); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_8)->SetCommand(this->commandUndo); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_9)->SetCommand(this->commandRedo); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_11)->SetCommand(this->commandExportPrivate); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_12)->SetCommand(this->commandExportRtf); + } + { + ::vl::__vwsn::This(this->__vwsn_precompile_13)->SetCommand(this->commandExportHtml); + } + { + auto __vwsn_event_handler_ = LAMBDA(::vl_workflow_global::__vwsnf2_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_(this)); + ::vl::__vwsn::EventAttach(::vl::__vwsn::This(this->__vwsn_precompile_17)->GetEventReceiver()->rightButtonDown, __vwsn_event_handler_); + } + } + + MainWindowConstructor::MainWindowConstructor() + : self(static_cast<::demo::MainWindow*>(nullptr)) + , commandCut(static_cast<::vl::presentation::controls::GuiToolstripCommand*>(nullptr)) + , commandCopy(static_cast<::vl::presentation::controls::GuiToolstripCommand*>(nullptr)) + , commandPaste(static_cast<::vl::presentation::controls::GuiToolstripCommand*>(nullptr)) + , commandDelete(static_cast<::vl::presentation::controls::GuiToolstripCommand*>(nullptr)) + , commandUndo(static_cast<::vl::presentation::controls::GuiToolstripCommand*>(nullptr)) + , commandRedo(static_cast<::vl::presentation::controls::GuiToolstripCommand*>(nullptr)) + , commandExportPrivate(static_cast<::vl::presentation::controls::GuiToolstripCommand*>(nullptr)) + , commandExportRtf(static_cast<::vl::presentation::controls::GuiToolstripCommand*>(nullptr)) + , commandExportHtml(static_cast<::vl::presentation::controls::GuiToolstripCommand*>(nullptr)) + , menuEdit(static_cast<::vl::presentation::controls::GuiToolstripMenu*>(nullptr)) + , __vwsn_precompile_0(static_cast<::vl::presentation::controls::GuiToolstripGroupContainer*>(nullptr)) + , __vwsn_precompile_1(static_cast<::vl::presentation::controls::GuiToolstripGroup*>(nullptr)) + , __vwsn_precompile_2(static_cast<::vl::presentation::controls::GuiToolstripToolBar*>(nullptr)) + , __vwsn_precompile_3(static_cast<::vl::presentation::controls::GuiToolstripButton*>(nullptr)) + , __vwsn_precompile_4(static_cast<::vl::presentation::controls::GuiToolstripButton*>(nullptr)) + , __vwsn_precompile_5(static_cast<::vl::presentation::controls::GuiToolstripButton*>(nullptr)) + , __vwsn_precompile_6(static_cast<::vl::presentation::controls::GuiToolstripButton*>(nullptr)) + , __vwsn_precompile_7(static_cast<::vl::presentation::controls::GuiToolstripGroup*>(nullptr)) + , __vwsn_precompile_8(static_cast<::vl::presentation::controls::GuiToolstripButton*>(nullptr)) + , __vwsn_precompile_9(static_cast<::vl::presentation::controls::GuiToolstripButton*>(nullptr)) + , __vwsn_precompile_10(static_cast<::vl::presentation::controls::GuiToolstripGroup*>(nullptr)) + , __vwsn_precompile_11(static_cast<::vl::presentation::controls::GuiToolstripButton*>(nullptr)) + , __vwsn_precompile_12(static_cast<::vl::presentation::controls::GuiToolstripButton*>(nullptr)) + , __vwsn_precompile_13(static_cast<::vl::presentation::controls::GuiToolstripButton*>(nullptr)) + , __vwsn_precompile_14(static_cast<::vl::presentation::controls::GuiLabel*>(nullptr)) + , __vwsn_precompile_15(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) + , __vwsn_precompile_16(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr)) + , __vwsn_precompile_17(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(nullptr)) + { + } + +/*********************************************************************** +Class (::demo::MainWindow) +***********************************************************************/ + + MainWindow::MainWindow() + : ::vl::presentation::controls::GuiWindow(::vl::presentation::theme::ThemeName::Window) + { + 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)->SetResourceResolver(__vwsn_resolver_); + ::vl::__vwsn::This(this)->__vwsn_demo_MainWindow_Initialize(this); + } + + MainWindow::~MainWindow() + { + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiControlHost*>(this)); + } + +/*********************************************************************** +Class (::demo::MenuToolBarControlTemplateConstructor) +***********************************************************************/ + + void MenuToolBarControlTemplateConstructor::__vwsn_demo_MenuToolBarControlTemplate_Initialize(::demo::MenuToolBarControlTemplate* __vwsn_this_) + { + (this->__vwsn_precompile_0 = __vwsn_this_); + { + ::vl::__vwsn::This(this->__vwsn_precompile_0)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren); + } + } + + MenuToolBarControlTemplateConstructor::MenuToolBarControlTemplateConstructor() + : __vwsn_precompile_0(static_cast<::demo::MenuToolBarControlTemplate*>(nullptr)) + { + } + +/*********************************************************************** +Class (::demo::MenuToolBarControlTemplate) +***********************************************************************/ + + MenuToolBarControlTemplate::MenuToolBarControlTemplate() + { + auto __vwsn_resource_ = ::vl::__vwsn::This(::vl::presentation::GetResourceManager())->GetResourceFromClassName(::vl::WString(L"demo::MenuToolBarControlTemplate", 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_MenuToolBarControlTemplate_Initialize(this); + } + + MenuToolBarControlTemplate::~MenuToolBarControlTemplate() + { + this->FinalizeInstanceRecursively(static_cast<::vl::presentation::templates::GuiTemplate*>(this)); + } + +} +#undef GLOBAL_SYMBOL +#undef GLOBAL_NAME +#undef GLOBAL_OBJ + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif diff --git a/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoPartialClasses.h b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoPartialClasses.h new file mode 100644 index 00000000..2191ac5d --- /dev/null +++ b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoPartialClasses.h @@ -0,0 +1,162 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOPARTIALCLASSES + +#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 __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_; + struct __vwsnf2_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_; +} + +namespace demo +{ + class MainWindowConstructor; + class MainWindow; + class MenuToolBarControlTemplateConstructor; + class MenuToolBarControlTemplate; + + class MainWindowConstructor : public ::vl::Object, public ::vl::reflection::Description + { + friend struct ::vl_workflow_global::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_; + friend struct ::vl_workflow_global::__vwsnf2_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_; +#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA + friend struct ::vl::reflection::description::CustomTypeDescriptorSelector; +#endif + protected: + ::demo::MainWindow* self; + ::vl::presentation::controls::GuiToolstripCommand* commandCut; + ::vl::presentation::controls::GuiToolstripCommand* commandCopy; + ::vl::presentation::controls::GuiToolstripCommand* commandPaste; + ::vl::presentation::controls::GuiToolstripCommand* commandDelete; + ::vl::presentation::controls::GuiToolstripCommand* commandUndo; + ::vl::presentation::controls::GuiToolstripCommand* commandRedo; + ::vl::presentation::controls::GuiToolstripCommand* commandExportPrivate; + ::vl::presentation::controls::GuiToolstripCommand* commandExportRtf; + ::vl::presentation::controls::GuiToolstripCommand* commandExportHtml; + ::vl::presentation::controls::GuiToolstripMenu* menuEdit; + ::vl::presentation::controls::GuiToolstripGroupContainer* __vwsn_precompile_0; + ::vl::presentation::controls::GuiToolstripGroup* __vwsn_precompile_1; + ::vl::presentation::controls::GuiToolstripToolBar* __vwsn_precompile_2; + ::vl::presentation::controls::GuiToolstripButton* __vwsn_precompile_3; + ::vl::presentation::controls::GuiToolstripButton* __vwsn_precompile_4; + ::vl::presentation::controls::GuiToolstripButton* __vwsn_precompile_5; + ::vl::presentation::controls::GuiToolstripButton* __vwsn_precompile_6; + ::vl::presentation::controls::GuiToolstripGroup* __vwsn_precompile_7; + ::vl::presentation::controls::GuiToolstripButton* __vwsn_precompile_8; + ::vl::presentation::controls::GuiToolstripButton* __vwsn_precompile_9; + ::vl::presentation::controls::GuiToolstripGroup* __vwsn_precompile_10; + ::vl::presentation::controls::GuiToolstripButton* __vwsn_precompile_11; + ::vl::presentation::controls::GuiToolstripButton* __vwsn_precompile_12; + ::vl::presentation::controls::GuiToolstripButton* __vwsn_precompile_13; + ::vl::presentation::controls::GuiLabel* __vwsn_precompile_14; + ::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_15; + ::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_16; + ::vl::presentation::compositions::GuiGraphicsComposition* __vwsn_precompile_17; + void __vwsn_demo_MainWindow_Initialize(::demo::MainWindow* __vwsn_this_); + public: + MainWindowConstructor(); + }; + + class MainWindow : public ::vl::presentation::controls::GuiWindow, public ::demo::MainWindowConstructor, public ::vl::reflection::Description + { + friend class ::demo::MainWindowConstructor; + friend struct ::vl_workflow_global::__vwsnf1_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_; + friend struct ::vl_workflow_global::__vwsnf2_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_; +#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA + friend struct ::vl::reflection::description::CustomTypeDescriptorSelector; +#endif + public: + MainWindow(); + ~MainWindow(); + }; + + class MenuToolBarControlTemplateConstructor : public ::vl::Object, public ::vl::reflection::Description + { +#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA + friend struct ::vl::reflection::description::CustomTypeDescriptorSelector; +#endif + protected: + ::demo::MenuToolBarControlTemplate* __vwsn_precompile_0; + void __vwsn_demo_MenuToolBarControlTemplate_Initialize(::demo::MenuToolBarControlTemplate* __vwsn_this_); + public: + MenuToolBarControlTemplateConstructor(); + }; + + class MenuToolBarControlTemplate : public ::vl::presentation::templates::GuiControlTemplate, public ::demo::MenuToolBarControlTemplateConstructor, public ::vl::reflection::Description + { + friend class ::demo::MenuToolBarControlTemplateConstructor; +#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA + friend struct ::vl::reflection::description::CustomTypeDescriptorSelector; +#endif + public: + MenuToolBarControlTemplate(); + ~MenuToolBarControlTemplate(); + }; + +} +/*********************************************************************** +Global Variables and Functions +***********************************************************************/ + +namespace vl_workflow_global +{ + class Demo + { + public: + + static Demo& Instance(); + }; + +/*********************************************************************** +Closures +***********************************************************************/ + + struct __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_ + { + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnf1_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_(::demo::MainWindowConstructor* __vwsnctorthis_0); + + ::vl::presentation::templates::GuiControlTemplate* operator()(const ::vl::reflection::description::Value& __vwsn_viewModel_) const; + }; + + struct __vwsnf2_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_ + { + ::demo::MainWindowConstructor* __vwsnthis_0; + + __vwsnf2_Demo_demo_MainWindowConstructor___vwsn_demo_MainWindow_Initialize_(::demo::MainWindowConstructor* __vwsnctorthis_0); + + void operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiMouseEventArgs* arguments) const; + }; +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoReflection.cpp b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoReflection.cpp new file mode 100644 index 00000000..b55bceb2 --- /dev/null +++ b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoReflection.cpp @@ -0,0 +1,134 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#include "DemoReflection.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::MainWindow) + IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor) + IMPL_CPP_TYPE_INFO(demo::MenuToolBarControlTemplate) + IMPL_CPP_TYPE_INFO(demo::MenuToolBarControlTemplateConstructor) + +#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA +#define _ , + 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(__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_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(__vwsn_precompile_9) + CLASS_MEMBER_FIELD(commandCopy) + CLASS_MEMBER_FIELD(commandCut) + CLASS_MEMBER_FIELD(commandDelete) + CLASS_MEMBER_FIELD(commandExportHtml) + CLASS_MEMBER_FIELD(commandExportPrivate) + CLASS_MEMBER_FIELD(commandExportRtf) + CLASS_MEMBER_FIELD(commandPaste) + CLASS_MEMBER_FIELD(commandRedo) + CLASS_MEMBER_FIELD(commandUndo) + CLASS_MEMBER_FIELD(menuEdit) + CLASS_MEMBER_FIELD(self) + END_CLASS_MEMBER(::demo::MainWindowConstructor) + + BEGIN_CLASS_MEMBER(::demo::MenuToolBarControlTemplate) + CLASS_MEMBER_BASE(::vl::presentation::templates::GuiControlTemplate) + CLASS_MEMBER_BASE(::demo::MenuToolBarControlTemplateConstructor) + CLASS_MEMBER_CONSTRUCTOR(::demo::MenuToolBarControlTemplate*(), NO_PARAMETER) + END_CLASS_MEMBER(::demo::MenuToolBarControlTemplate) + + BEGIN_CLASS_MEMBER(::demo::MenuToolBarControlTemplateConstructor) + CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject) + CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MenuToolBarControlTemplateConstructor>(), NO_PARAMETER) + CLASS_MEMBER_METHOD(__vwsn_demo_MenuToolBarControlTemplate_Initialize, { L"__vwsn_this_" }) + CLASS_MEMBER_FIELD(__vwsn_precompile_0) + END_CLASS_MEMBER(::demo::MenuToolBarControlTemplateConstructor) + +#undef _ + class DemoTypeLoader : public Object, public ITypeLoader + { + public: + void Load(ITypeManager* manager) + { + ADD_TYPE_INFO(::demo::MainWindow) + ADD_TYPE_INFO(::demo::MainWindowConstructor) + ADD_TYPE_INFO(::demo::MenuToolBarControlTemplate) + ADD_TYPE_INFO(::demo::MenuToolBarControlTemplateConstructor) + } + + void Unload(ITypeManager* manager) + { + } + }; +#endif +#endif + + bool LoadDemoTypes() + { +#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA + if (auto manager = GetGlobalTypeManager()) + { + return manager->AddTypeLoader(MakePtr()); + } +#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 diff --git a/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoReflection.h b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoReflection.h new file mode 100644 index 00000000..ecbcd3f4 --- /dev/null +++ b/Tutorial/GacUI_Controls/Win11ToolstripMenu/UI/Source/DemoReflection.h @@ -0,0 +1,56 @@ +/*********************************************************************** +!!!!!! DO NOT MODIFY !!!!!! + +GacGen.exe Resource.xml + +This file is generated by Workflow compiler +https://github.com/vczh-libraries +***********************************************************************/ + +#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION +#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMOREFLECTION + +#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 + +/*********************************************************************** +Reflection +***********************************************************************/ + +namespace vl +{ + namespace reflection + { + namespace description + { +#ifndef VCZH_DEBUG_NO_REFLECTION + DECL_TYPE_INFO(::demo::MainWindow) + DECL_TYPE_INFO(::demo::MainWindowConstructor) + DECL_TYPE_INFO(::demo::MenuToolBarControlTemplate) + DECL_TYPE_INFO(::demo::MenuToolBarControlTemplateConstructor) +#endif + + extern bool LoadDemoTypes(); + } + } +} + +#if defined( _MSC_VER) +#pragma warning(pop) +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +#endif diff --git a/Tutorial/GacUI_Controls/Win11ToolstripMenu/Win11ToolstripMenu.vcxproj b/Tutorial/GacUI_Controls/Win11ToolstripMenu/Win11ToolstripMenu.vcxproj new file mode 100644 index 00000000..70d904f2 --- /dev/null +++ b/Tutorial/GacUI_Controls/Win11ToolstripMenu/Win11ToolstripMenu.vcxproj @@ -0,0 +1,164 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {1955debe-9913-45d6-b819-9adb52e5a447} + Win11ToolstripMenu + 10.0.17763.0 + + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + false + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + true + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + false + $(ProjectDir)..\..\..\Import;$(IncludePath) + + + + Level3 + true + VCZH_DEBUG_NO_REFLECTION;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Level3 + true + true + true + VCZH_DEBUG_NO_REFLECTION;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + true + VCZH_DEBUG_NO_REFLECTION;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Level3 + true + true + true + VCZH_DEBUG_NO_REFLECTION;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + + + + + + + + {96c559ca-9718-4bec-a053-28a0ab6a8ca2} + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Controls/Win11ToolstripMenu/Win11ToolstripMenu.vcxproj.filters b/Tutorial/GacUI_Controls/Win11ToolstripMenu/Win11ToolstripMenu.vcxproj.filters new file mode 100644 index 00000000..43b2d81f --- /dev/null +++ b/Tutorial/GacUI_Controls/Win11ToolstripMenu/Win11ToolstripMenu.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {2b8b1d80-1fde-40fe-9485-c3562f4c2581} + + + + + Source Files + + + UI + + + + + Resource Files + + + + + UI + + + UI + + + \ No newline at end of file