mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-25 09:17:37 +08:00
...
This commit is contained in:
+14
-11
@@ -26187,17 +26187,22 @@ GuiToolstripCommand
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void GuiToolstripCommand::RemoveShortcut()
|
||||
{
|
||||
if (shortcutKeyItem)
|
||||
{
|
||||
shortcutKeyItem->Executed.Detach(shortcutKeyItemExecutedHandler);
|
||||
shortcutKeyItem->GetManager()->DestroyShortcut(shortcutKeyItem);
|
||||
}
|
||||
shortcutKeyItem = nullptr;
|
||||
shortcutKeyItemExecutedHandler = nullptr;
|
||||
}
|
||||
|
||||
void GuiToolstripCommand::ReplaceShortcut(compositions::IGuiShortcutKeyItem* value)
|
||||
{
|
||||
if (shortcutKeyItem != value)
|
||||
{
|
||||
if (shortcutKeyItem)
|
||||
{
|
||||
shortcutKeyItem->Executed.Detach(shortcutKeyItemExecutedHandler);
|
||||
shortcutKeyItem->GetManager()->DestroyShortcut(shortcutKeyItem);
|
||||
}
|
||||
shortcutKeyItem = nullptr;
|
||||
shortcutKeyItemExecutedHandler = nullptr;
|
||||
RemoveShortcut();
|
||||
if (value)
|
||||
{
|
||||
shortcutKeyItem = value;
|
||||
@@ -26258,10 +26263,8 @@ GuiToolstripCommand
|
||||
|
||||
GuiToolstripCommand::~GuiToolstripCommand()
|
||||
{
|
||||
if (shortcutBuilder && shortcutKeyItem)
|
||||
{
|
||||
ReplaceShortcut(nullptr);
|
||||
}
|
||||
RemoveShortcut();
|
||||
shortcutBuilder = nullptr;
|
||||
}
|
||||
|
||||
void GuiToolstripCommand::Attach(GuiInstanceRootObject* rootObject)
|
||||
|
||||
@@ -10427,6 +10427,7 @@ namespace vl
|
||||
void InvokeDescriptionChanged();
|
||||
|
||||
compositions::IGuiShortcutKeyManager* GetShortcutManagerFromBuilder(Ptr<ShortcutBuilder> builder);
|
||||
void RemoveShortcut();
|
||||
void ReplaceShortcut(compositions::IGuiShortcutKeyItem* value);
|
||||
void BuildShortcut(const WString& builderText);
|
||||
void UpdateShortcutOwner();
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{
|
||||
GuiApplication::GetApplication().InvokeInMainThread(self, func():void
|
||||
{
|
||||
dialog.ShowDialog();-eval
|
||||
dialog.ShowDialog();
|
||||
});
|
||||
}
|
||||
]]></ev.Executed-eval>
|
||||
@@ -31,7 +31,7 @@
|
||||
</ToolstripGroupContainer>
|
||||
</ToolstripMenu>
|
||||
|
||||
<Table CellPadding="5" BorderVisible="true" AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<Table CellPadding="5" BorderVisible="false" AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<att.Rows>
|
||||
<_>composeType:MinSize</_>
|
||||
<_>composeType:Percentage percentage:1.0</_>
|
||||
@@ -53,9 +53,9 @@
|
||||
</ToolstripMenuBar>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:1">
|
||||
<Cell Site="row:1 column:0">
|
||||
<Label Font="fontFamily:'Segoe UI' size:24" Text="Right click to show the menu">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:5 top:0 right:5 bottom:0"/>
|
||||
</Label>
|
||||
</Cell>
|
||||
</Table>
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace demo
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_3)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_3)->SetBorderVisible(true);
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_3)->SetBorderVisible(false);
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_3)->SetCellPadding(static_cast<::vl::vint>(5));
|
||||
@@ -219,7 +219,7 @@ namespace demo
|
||||
}
|
||||
(this->__vwsn_precompile_11 = new ::vl::presentation::compositions::GuiCellComposition());
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_11)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1));
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_11)->SetSite(static_cast<::vl::vint>(1), static_cast<::vl::vint>(0), static_cast<::vl::vint>(1), static_cast<::vl::vint>(1));
|
||||
}
|
||||
{
|
||||
(this->__vwsn_precompile_12 = new ::vl::presentation::controls::GuiLabel(::vl::presentation::theme::ThemeName::Label));
|
||||
@@ -229,7 +229,7 @@ namespace demo
|
||||
}
|
||||
(this->__vwsn_precompile_13 = ::vl::__vwsn::This(this->__vwsn_precompile_12)->GetBoundsComposition());
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_13)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }());
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_13)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(5); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(5); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }());
|
||||
}
|
||||
{
|
||||
::vl::__vwsn::This(this->__vwsn_precompile_12)->SetText(::vl::WString::Unmanaged(L"Right click to show the menu"));
|
||||
|
||||
Reference in New Issue
Block a user