Update release

This commit is contained in:
vczh
2015-12-24 15:37:09 -08:00
parent e4b89340bd
commit 602873b970
6 changed files with 45 additions and 21 deletions
+2 -1
View File
@@ -31163,13 +31163,14 @@ GuiMenuButton
return subMenu;
}
void GuiMenuButton::CreateSubMenu(GuiMenu::IStyleController* subMenuStyleController)
GuiMenu* GuiMenuButton::CreateSubMenu(GuiMenu::IStyleController* subMenuStyleController)
{
if(!subMenu)
{
GuiMenu* newSubMenu=new GuiMenu(subMenuStyleController?subMenuStyleController:styleController->CreateSubMenuStyleController(), this);
SetSubMenu(newSubMenu, true);
}
return subMenu;
}
void GuiMenuButton::SetSubMenu(GuiMenu* value, bool owned)
+2 -1
View File
@@ -11330,8 +11330,9 @@ MenuButton
/// <returns>The sub menu.</returns>
GuiMenu* GetSubMenu();
/// <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>
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>
/// <param name="value">The sub menu to associate.</param>
/// <param name="owned">Set to true if the menu is expected to be owned.</param>
+41 -19
View File
@@ -704,18 +704,14 @@ GuiInstanceLoaderManager
struct VirtualTypeInfo
{
GlobalStringKey typeName;
ITypeDescriptor* typeDescriptor;
ITypeDescriptor* typeDescriptor = nullptr;
GlobalStringKey parentTypeName; // for virtual type only
Ptr<IGuiInstanceLoader> loader;
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
VirtualTypeInfo()
:typeDescriptor(0)
{
}
};
typedef Dictionary<GlobalStringKey, Ptr<VirtualTypeInfo>> VirtualTypeInfoMap;
typedef Dictionary<WString, Ptr<GuiResource>> ResourceMap;
typedef Pair<Ptr<GuiResource>, Ptr<GuiResourceItem>> ResourceItemPair;
@@ -759,6 +755,10 @@ GuiInstanceLoaderManager
void FillParentTypeInfos(Ptr<VirtualTypeInfo> typeInfo)
{
if (typeInfo->parentTypeName != GlobalStringKey::Empty)
{
typeInfo->typeDescriptor = nullptr;
}
typeInfo->parentTypes.Clear();
typeInfo->parentTypeInfos.Clear();
@@ -5241,22 +5241,19 @@ GuiToolstripButtonInstanceLoader
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>();
refEnsureToolstripSubMenu->parent = refControl;
refEnsureToolstripSubMenu->name.value = L"EnsureToolstripSubMenu";
auto refEnsureToolstripSubMenu = MakePtr<WfMemberExpression>();
refEnsureToolstripSubMenu->parent = refControl;
refEnsureToolstripSubMenu->name.value = L"EnsureToolstripSubMenu";
auto call = MakePtr<WfCallExpression>();
call->function = refEnsureToolstripSubMenu;
auto call = MakePtr<WfCallExpression>();
call->function = refEnsureToolstripSubMenu;
return call;
}
return call;
}
return nullptr;
}
@@ -10576,7 +10573,32 @@ WorkflowReferenceNamesVisitor
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
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.