mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-06-01 23:06:39 +08:00
Update release
This commit is contained in:
+2
-1
@@ -31163,13 +31163,14 @@ GuiMenuButton
|
|||||||
return subMenu;
|
return subMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiMenuButton::CreateSubMenu(GuiMenu::IStyleController* subMenuStyleController)
|
GuiMenu* GuiMenuButton::CreateSubMenu(GuiMenu::IStyleController* subMenuStyleController)
|
||||||
{
|
{
|
||||||
if(!subMenu)
|
if(!subMenu)
|
||||||
{
|
{
|
||||||
GuiMenu* newSubMenu=new GuiMenu(subMenuStyleController?subMenuStyleController:styleController->CreateSubMenuStyleController(), this);
|
GuiMenu* newSubMenu=new GuiMenu(subMenuStyleController?subMenuStyleController:styleController->CreateSubMenuStyleController(), this);
|
||||||
SetSubMenu(newSubMenu, true);
|
SetSubMenu(newSubMenu, true);
|
||||||
}
|
}
|
||||||
|
return subMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiMenuButton::SetSubMenu(GuiMenu* value, bool owned)
|
void GuiMenuButton::SetSubMenu(GuiMenu* value, bool owned)
|
||||||
|
|||||||
+2
-1
@@ -11330,8 +11330,9 @@ MenuButton
|
|||||||
/// <returns>The sub menu.</returns>
|
/// <returns>The sub menu.</returns>
|
||||||
GuiMenu* GetSubMenu();
|
GuiMenu* GetSubMenu();
|
||||||
/// <summary>Create the sub menu if necessary. The created sub menu is owned by this menu button.</summary>
|
/// <summary>Create the sub menu if necessary. The created sub menu is owned by this menu button.</summary>
|
||||||
|
/// <returns>The created sub menu.</returns>
|
||||||
/// <param name="subMenuStyleController">The style controller for the sub menu. If this argument is null, it will call <see cref="IStyleController::CreateSubMenuStyleController"/> for a style controller.</param>
|
/// <param name="subMenuStyleController">The style controller for the sub menu. If this argument is null, it will call <see cref="IStyleController::CreateSubMenuStyleController"/> for a style controller.</param>
|
||||||
void CreateSubMenu(GuiMenu::IStyleController* subMenuStyleController=0);
|
GuiMenu* CreateSubMenu(GuiMenu::IStyleController* subMenuStyleController=0);
|
||||||
/// <summary>Associate a sub menu if there is no sub menu binded in this menu button. The associated sub menu is not owned by this menu button if the "owned" argument is set to false.</summary>
|
/// <summary>Associate a sub menu if there is no sub menu binded in this menu button. The associated sub menu is not owned by this menu button if the "owned" argument is set to false.</summary>
|
||||||
/// <param name="value">The sub menu to associate.</param>
|
/// <param name="value">The sub menu to associate.</param>
|
||||||
/// <param name="owned">Set to true if the menu is expected to be owned.</param>
|
/// <param name="owned">Set to true if the menu is expected to be owned.</param>
|
||||||
|
|||||||
+41
-19
@@ -704,18 +704,14 @@ GuiInstanceLoaderManager
|
|||||||
struct VirtualTypeInfo
|
struct VirtualTypeInfo
|
||||||
{
|
{
|
||||||
GlobalStringKey typeName;
|
GlobalStringKey typeName;
|
||||||
ITypeDescriptor* typeDescriptor;
|
ITypeDescriptor* typeDescriptor = nullptr;
|
||||||
GlobalStringKey parentTypeName; // for virtual type only
|
GlobalStringKey parentTypeName; // for virtual type only
|
||||||
Ptr<IGuiInstanceLoader> loader;
|
Ptr<IGuiInstanceLoader> loader;
|
||||||
|
|
||||||
List<ITypeDescriptor*> parentTypes; // all direct or indirect base types that does not has a type info
|
List<ITypeDescriptor*> parentTypes; // all direct or indirect base types that does not has a type info
|
||||||
List<VirtualTypeInfo*> parentTypeInfos; // type infos for all registered direct or indirect base types
|
List<VirtualTypeInfo*> parentTypeInfos; // type infos for all registered direct or indirect base types
|
||||||
|
|
||||||
VirtualTypeInfo()
|
|
||||||
:typeDescriptor(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef Dictionary<GlobalStringKey, Ptr<VirtualTypeInfo>> VirtualTypeInfoMap;
|
typedef Dictionary<GlobalStringKey, Ptr<VirtualTypeInfo>> VirtualTypeInfoMap;
|
||||||
typedef Dictionary<WString, Ptr<GuiResource>> ResourceMap;
|
typedef Dictionary<WString, Ptr<GuiResource>> ResourceMap;
|
||||||
typedef Pair<Ptr<GuiResource>, Ptr<GuiResourceItem>> ResourceItemPair;
|
typedef Pair<Ptr<GuiResource>, Ptr<GuiResourceItem>> ResourceItemPair;
|
||||||
@@ -759,6 +755,10 @@ GuiInstanceLoaderManager
|
|||||||
|
|
||||||
void FillParentTypeInfos(Ptr<VirtualTypeInfo> typeInfo)
|
void FillParentTypeInfos(Ptr<VirtualTypeInfo> typeInfo)
|
||||||
{
|
{
|
||||||
|
if (typeInfo->parentTypeName != GlobalStringKey::Empty)
|
||||||
|
{
|
||||||
|
typeInfo->typeDescriptor = nullptr;
|
||||||
|
}
|
||||||
typeInfo->parentTypes.Clear();
|
typeInfo->parentTypes.Clear();
|
||||||
typeInfo->parentTypeInfos.Clear();
|
typeInfo->parentTypeInfos.Clear();
|
||||||
|
|
||||||
@@ -5241,22 +5241,19 @@ GuiToolstripButtonInstanceLoader
|
|||||||
|
|
||||||
Ptr<workflow::WfExpression> GetParameter(const PropertyInfo& propertyInfo, GlobalStringKey variableName, collections::List<WString>& errors)
|
Ptr<workflow::WfExpression> GetParameter(const PropertyInfo& propertyInfo, GlobalStringKey variableName, collections::List<WString>& errors)
|
||||||
{
|
{
|
||||||
if (propertyInfo.typeInfo.typeName == GetTypeName())
|
if (propertyInfo.propertyName == _SubMenu)
|
||||||
{
|
{
|
||||||
if (propertyInfo.propertyName == _SubMenu)
|
auto refControl = MakePtr<WfReferenceExpression>();
|
||||||
{
|
refControl->name.value = variableName.ToString();
|
||||||
auto refControl = MakePtr<WfReferenceExpression>();
|
|
||||||
refControl->name.value = variableName.ToString();
|
|
||||||
|
|
||||||
auto refEnsureToolstripSubMenu = MakePtr<WfMemberExpression>();
|
auto refEnsureToolstripSubMenu = MakePtr<WfMemberExpression>();
|
||||||
refEnsureToolstripSubMenu->parent = refControl;
|
refEnsureToolstripSubMenu->parent = refControl;
|
||||||
refEnsureToolstripSubMenu->name.value = L"EnsureToolstripSubMenu";
|
refEnsureToolstripSubMenu->name.value = L"EnsureToolstripSubMenu";
|
||||||
|
|
||||||
auto call = MakePtr<WfCallExpression>();
|
auto call = MakePtr<WfCallExpression>();
|
||||||
call->function = refEnsureToolstripSubMenu;
|
call->function = refEnsureToolstripSubMenu;
|
||||||
|
|
||||||
return call;
|
return call;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@@ -10576,7 +10573,32 @@ WorkflowReferenceNamesVisitor
|
|||||||
|
|
||||||
if (auto propInfo = resolvedTypeInfo.typeDescriptor->GetPropertyByName(prop.ToString(), true))
|
if (auto propInfo = resolvedTypeInfo.typeDescriptor->GetPropertyByName(prop.ToString(), true))
|
||||||
{
|
{
|
||||||
resolvingResult.typeOverrides.Add(setTarget->instanceName, CopyTypeInfo(propInfo->GetReturn()));
|
auto propType = propInfo->GetReturn();
|
||||||
|
if (propType->GetTypeDescriptor() == td)
|
||||||
|
{
|
||||||
|
resolvingResult.typeOverrides.Add(setTarget->instanceName, CopyTypeInfo(propInfo->GetReturn()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (propType->GetDecorator())
|
||||||
|
{
|
||||||
|
case ITypeInfo::Nullable:
|
||||||
|
case ITypeInfo::RawPtr:
|
||||||
|
case ITypeInfo::SharedPtr:
|
||||||
|
{
|
||||||
|
auto elementType = MakePtr<TypeInfoImpl>(ITypeInfo::TypeDescriptor);
|
||||||
|
elementType->SetTypeDescriptor(td);
|
||||||
|
|
||||||
|
auto decoratedType = MakePtr<TypeInfoImpl>(propType->GetDecorator());
|
||||||
|
decoratedType->SetElementType(elementType);
|
||||||
|
|
||||||
|
resolvingResult.typeOverrides.Add(setTarget->instanceName, decoratedType);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
resolvingResult.typeOverrides.Add(setTarget->instanceName, CopyTypeInfo(propInfo->GetReturn()));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user