Update release

This commit is contained in:
vczh
2016-07-24 13:13:30 -07:00
parent 7258f873ca
commit 8dc131c2ed
33 changed files with 357 additions and 285 deletions
+289 -127
View File
File diff suppressed because it is too large Load Diff
+54 -12
View File
@@ -16664,9 +16664,12 @@ GuiBindableTextList
WString checkedProperty;
public:
ItemSource(Ptr<description::IValueEnumerable> _itemSource);
ItemSource();
~ItemSource();
Ptr<description::IValueEnumerable> GetItemSource();
void SetItemSource(Ptr<description::IValueEnumerable> _itemSource);
description::Value Get(vint index);
void UpdateBindingProperties();
@@ -16700,13 +16703,20 @@ GuiBindableTextList
/// <param name="_styleProvider">The style provider for this control.</param>
/// <param name="_itemStyleProvider">The item style provider callback for this control.</param>
/// <param name="_itemSource">The item source.</param>
GuiBindableTextList(IStyleProvider* _styleProvider, list::TextItemStyleProvider::IBulletFactory* _bulletFactory, Ptr<description::IValueEnumerable> _itemSource);
GuiBindableTextList(IStyleProvider* _styleProvider, list::TextItemStyleProvider::IBulletFactory* _bulletFactory);
~GuiBindableTextList();
/// <summary>Text property name changed event.</summary>
compositions::GuiNotifyEvent TextPropertyChanged;
/// <summary>Checked property name changed event.</summary>
compositions::GuiNotifyEvent CheckedPropertyChanged;
/// <summary>Get the item source.</summary>
/// <returns>The item source.</returns>
Ptr<description::IValueEnumerable> GetItemSource();
/// <summary>Set the item source.</summary>
/// <param name="itemSource">The item source. Null is acceptable if you want to clear all data.</param>
void SetItemSource(Ptr<description::IValueEnumerable> _itemSource);
/// <summary>Get the text property name to get the item text from an item.</summary>
/// <returns>The text property name.</returns>
@@ -16787,8 +16797,11 @@ GuiBindableListView
WString smallImageProperty;
public:
ItemSource(Ptr<description::IValueEnumerable> _itemSource);
ItemSource();
~ItemSource();
Ptr<description::IValueEnumerable> GetItemSource();
void SetItemSource(Ptr<description::IValueEnumerable> _itemSource);
description::Value Get(vint index);
void UpdateBindingProperties();
@@ -16839,7 +16852,7 @@ GuiBindableListView
/// <summary>Create a bindable List view control.</summary>
/// <param name="_styleProvider">The style provider for this control.</param>
/// <param name="_itemSource">The item source.</param>
GuiBindableListView(IStyleProvider* _styleProvider, Ptr<description::IValueEnumerable> _itemSource);
GuiBindableListView(IStyleProvider* _styleProvider);
~GuiBindableListView();
/// <summary>Get all data columns indices in columns.</summary>
@@ -16848,6 +16861,13 @@ GuiBindableListView
/// <summary>Get all columns.</summary>
/// <returns>All columns.</returns>
ListViewColumns& GetColumns();
/// <summary>Get the item source.</summary>
/// <returns>The item source.</returns>
Ptr<description::IValueEnumerable> GetItemSource();
/// <summary>Set the item source.</summary>
/// <param name="itemSource">The item source. Null is acceptable if you want to clear all data.</param>
void SetItemSource(Ptr<description::IValueEnumerable> _itemSource);
/// <summary>Large image property name changed event.</summary>
compositions::GuiNotifyEvent LargeImagePropertyChanged;
@@ -16904,10 +16924,11 @@ GuiBindableTreeView
void UnprepareChildren();
public:
ItemSourceNode(const description::Value& _itemSource, ItemSourceNode* _parent);
ItemSourceNode(const description::Value& _itemSource, ItemSource* _rootProvider);
ItemSourceNode(ItemSource* _rootProvider);
~ItemSourceNode();
description::Value GetItemSource();
void SetItemSource(const description::Value& _itemSource);
// ===================== tree::INodeProvider =====================
@@ -16935,9 +16956,12 @@ GuiBindableTreeView
Ptr<ItemSourceNode> rootNode;
public:
ItemSource(const description::Value& _itemSource);
ItemSource();
~ItemSource();
description::Value GetItemSource();
void SetItemSource(const description::Value& _itemSource);
void UpdateBindingProperties(bool updateChildrenProperty);
// ===================== tree::INodeRootProvider =====================
@@ -16967,7 +16991,7 @@ GuiBindableTreeView
/// <summary>Create a bindable Tree view control.</summary>
/// <param name="_styleProvider">The style provider for this control.</param>
/// <param name="_itemSource">The item source.</param>
GuiBindableTreeView(IStyleProvider* _styleProvider, const description::Value& _itemSource);
GuiBindableTreeView(IStyleProvider* _styleProvider);
~GuiBindableTreeView();
/// <summary>Text property name changed event.</summary>
@@ -16976,6 +17000,13 @@ GuiBindableTreeView
compositions::GuiNotifyEvent ImagePropertyChanged;
/// <summary>Children property name changed event.</summary>
compositions::GuiNotifyEvent ChildrenPropertyChanged;
/// <summary>Get the item source.</summary>
/// <returns>The item source.</returns>
description::Value GetItemSource();
/// <summary>Set the item source.</summary>
/// <param name="itemSource">The item source. Null is acceptable if you want to clear all data.</param>
void SetItemSource(description::Value _itemSource);
/// <summary>Get the text property name to get the item text from an item.</summary>
/// <returns>The text property name.</returns>
@@ -17009,16 +17040,16 @@ GuiBindableDataGrid
namespace list
{
class BindableDataProvider;
/// <summary>Column object for [T:vl.presentation.controls.GuiBindableDataGrid].</summary>
class BindableDataColumn : public StructuredColummProviderBase, public Description<BindableDataColumn>
{
friend class BindableDataProvider;
protected:
description::Value viewModelContext;
Ptr<description::IValueReadonlyList> itemSource;
BindableDataProvider* dataProvider;
WString valueProperty;
void SetItemSource(Ptr<description::IValueReadonlyList> _itemSource);
public:
BindableDataColumn();
~BindableDataColumn();
@@ -17053,15 +17084,19 @@ GuiBindableDataGrid
/// <summary>Data provider object for [T:vl.presentation.controls.GuiBindableDataGrid].</summary>
class BindableDataProvider : public StructuredDataProviderBase, public Description<BindableDataProvider>
{
friend class BindableDataColumn;
protected:
description::Value viewModelContext;
Ptr<description::IValueReadonlyList> itemSource;
Ptr<EventHandler> itemChangedEventHandler;
public:
BindableDataProvider(Ptr<description::IValueEnumerable> _itemSource, const description::Value& _viewModelContext);
BindableDataProvider(const description::Value& _viewModelContext);
~BindableDataProvider();
Ptr<description::IValueEnumerable> GetItemSource();
void SetItemSource(Ptr<description::IValueEnumerable> _itemSource);
vint GetRowCount()override;
description::Value GetRowValue(vint row);
@@ -17085,8 +17120,15 @@ GuiBindableDataGrid
/// <param name="_styleProvider">The style provider for this control.</param>
/// <param name="_itemSource">The item source.</param>
/// <param name="_viewModelContext">The view mode context, which will be passed to every visualizers and editors in this grid.</param>
GuiBindableDataGrid(IStyleProvider* _styleProvider, Ptr<description::IValueEnumerable> _itemSource, const description::Value& _viewModelContext = description::Value());
GuiBindableDataGrid(IStyleProvider* _styleProvider, const description::Value& _viewModelContext = description::Value());
~GuiBindableDataGrid();
/// <summary>Get the item source.</summary>
/// <returns>The item source.</returns>
Ptr<description::IValueEnumerable> GetItemSource();
/// <summary>Set the item source.</summary>
/// <param name="itemSource">The item source. Null is acceptable if you want to clear all data.</param>
void SetItemSource(Ptr<description::IValueEnumerable> _itemSource);
/// <summary>Insert a column.</summary>
/// <returns>Returns true if this operation succeeded.</returns>
+5 -141
View File
@@ -4111,52 +4111,9 @@ GuiListViewInstanceLoader
{
};
#define BASE_TYPE GuiListViewInstanceLoaderBase<GuiBindableListView>
class GuiBindableListViewInstanceLoader : public BASE_TYPE
class GuiBindableListViewInstanceLoader : public GuiListViewInstanceLoaderBase<GuiBindableListView>
{
protected:
GlobalStringKey _ItemSource;
void AddAdditionalArguments(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors, Ptr<WfNewClassExpression> createControl)override
{
vint indexItemSource = arguments.Keys().IndexOf(_ItemSource);
if (indexItemSource != -1)
{
createControl->arguments.Add(arguments.GetByIndex(indexItemSource)[0].expression);
}
}
public:
GuiBindableListViewInstanceLoader()
{
_ItemSource = GlobalStringKey::Get(L"ItemSource");
}
void GetConstructorParameters(const TypeInfo& typeInfo, collections::List<GlobalStringKey>& propertyNames)override
{
if (typeInfo.typeName == GetTypeName())
{
propertyNames.Add(_ItemSource);
}
BASE_TYPE::GetConstructorParameters(typeInfo, propertyNames);
}
Ptr<GuiInstancePropertyInfo> GetPropertyType(const PropertyInfo& propertyInfo)override
{
if (propertyInfo.propertyName == _ItemSource)
{
if (bindable)
{
auto info = GuiInstancePropertyInfo::Assign(description::GetTypeDescriptor<IValueEnumerable>());
info->scope = GuiInstancePropertyInfo::Constructor;
info->required = true;
info->bindable = true;
return info;
}
}
return BASE_TYPE::GetPropertyType(propertyInfo);
}
};
#undef BASE_TYPE
/***********************************************************************
GuiTreeViewInstanceLoader
@@ -4297,49 +4254,9 @@ GuiTreeViewInstanceLoader
{
};
#define BASE_TYPE GuiTreeViewInstanceLoaderBase<GuiBindableTreeView>
class GuiBindableTreeViewInstanceLoader : public BASE_TYPE
class GuiBindableTreeViewInstanceLoader : public GuiTreeViewInstanceLoaderBase<GuiBindableTreeView>
{
protected:
GlobalStringKey _ItemSource;
void AddAdditionalArguments(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors, Ptr<WfNewClassExpression> createControl)override
{
vint indexItemSource = arguments.Keys().IndexOf(_ItemSource);
if (indexItemSource != -1)
{
createControl->arguments.Add(arguments.GetByIndex(indexItemSource)[0].expression);
}
}
public:
GuiBindableTreeViewInstanceLoader()
{
_ItemSource = GlobalStringKey::Get(L"ItemSource");
}
void GetConstructorParameters(const TypeInfo& typeInfo, collections::List<GlobalStringKey>& propertyNames)override
{
if (typeInfo.typeName == GetTypeName())
{
propertyNames.Add(_ItemSource);
}
BASE_TYPE::GetConstructorParameters(typeInfo, propertyNames);
}
Ptr<GuiInstancePropertyInfo> GetPropertyType(const PropertyInfo& propertyInfo)override
{
if (propertyInfo.propertyName == _ItemSource)
{
auto info = GuiInstancePropertyInfo::Assign(description::GetTypeDescriptor<Value>());
info->scope = GuiInstancePropertyInfo::Constructor;
info->required = true;
info->bindable = true;
return info;
}
return BASE_TYPE::GetPropertyType(propertyInfo);
}
};
#undef BASE_TYPE
/***********************************************************************
GuiBindableTextListInstanceLoader
@@ -4348,53 +4265,16 @@ GuiBindableTextListInstanceLoader
#define BASE_TYPE GuiTemplateControlInstanceLoader<GuiBindableTextList, GuiTextListTemplate_StyleProvider, GuiTextListTemplate>
class GuiBindableTextListInstanceLoader : public BASE_TYPE
{
protected:
GlobalStringKey _ItemSource;
void AddAdditionalArguments(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors, Ptr<WfNewClassExpression> createControl)override
{
vint indexItemSource = arguments.Keys().IndexOf(_ItemSource);
if (indexItemSource != -1)
{
createControl->arguments.Add(arguments.GetByIndex(indexItemSource)[0].expression);
}
}
public:
GuiBindableTextListInstanceLoader(const WString& type)
:BASE_TYPE(
L"presentation::controls::GuiBindable" + type + L"TextList",
L"CreateTextListStyle",
L"Create" + type + L"TextListItemStyle"
)
GuiBindableTextListInstanceLoader()
:BASE_TYPE(description::TypeInfo<GuiBindableTextList>::TypeName, L"CreateTextListStyle", L"CreateTextListItemStyle")
{
_ItemSource = GlobalStringKey::Get(L"ItemSource");
}
GlobalStringKey GetTypeName()override
{
return typeName;
}
void GetConstructorParameters(const TypeInfo& typeInfo, collections::List<GlobalStringKey>& propertyNames)override
{
if (typeInfo.typeName == GetTypeName())
{
propertyNames.Add(_ItemSource);
}
BASE_TYPE::GetConstructorParameters(typeInfo, propertyNames);
}
Ptr<GuiInstancePropertyInfo> GetPropertyType(const PropertyInfo& propertyInfo)override
{
if (propertyInfo.propertyName == _ItemSource)
{
auto info = GuiInstancePropertyInfo::Assign(description::GetTypeDescriptor<IValueEnumerable>());
info->scope = GuiInstancePropertyInfo::Constructor;
info->required = true;
info->bindable = true;
return info;
}
return BASE_TYPE::GetPropertyType(propertyInfo);
}
};
#undef BASE_TYPE
@@ -4564,15 +4444,11 @@ GuiBindableDataGridInstanceLoader
{
protected:
GlobalStringKey typeName;
GlobalStringKey _ItemSource;
GlobalStringKey _ViewModelContext;
GlobalStringKey _Columns;
void AddAdditionalArguments(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors, Ptr<WfNewClassExpression> createControl)override
{
auto indexItemSource = arguments.Keys().IndexOf(_ItemSource);
createControl->arguments.Add(arguments.GetByIndex(indexItemSource)[0].expression);
auto indexViewModelContext = arguments.Keys().IndexOf(_ViewModelContext);
if (indexViewModelContext == -1)
{
@@ -4590,7 +4466,6 @@ GuiBindableDataGridInstanceLoader
:BASE_TYPE(description::TypeInfo<GuiBindableDataGrid>::TypeName, L"CreateListViewStyle")
{
typeName = GlobalStringKey::Get(description::TypeInfo<GuiBindableDataGrid>::TypeName);
_ItemSource = GlobalStringKey::Get(L"ItemSource");
_ViewModelContext = GlobalStringKey::Get(L"ViewModelContext");
_Columns = GlobalStringKey::Get(L"Columns");
}
@@ -4610,7 +4485,6 @@ GuiBindableDataGridInstanceLoader
{
if (typeInfo.typeName == GetTypeName())
{
propertyNames.Add(_ItemSource);
propertyNames.Add(_ViewModelContext);
}
BASE_TYPE::GetConstructorParameters(typeInfo, propertyNames);
@@ -4622,14 +4496,6 @@ GuiBindableDataGridInstanceLoader
{
return GuiInstancePropertyInfo::Collection(description::GetTypeDescriptor<list::BindableDataColumn>());
}
else if (propertyInfo.propertyName == _ItemSource)
{
auto info = GuiInstancePropertyInfo::Assign(description::GetTypeDescriptor<IValueEnumerable>());
info->scope = GuiInstancePropertyInfo::Constructor;
info->required = true;
info->bindable = true;
return info;
}
else if (propertyInfo.propertyName == _ViewModelContext)
{
auto info = GuiInstancePropertyInfo::Assign(description::GetTypeDescriptor<Value>());
@@ -4872,9 +4738,7 @@ Initialization
manager->SetLoader(new GuiTreeViewInstanceLoader);
manager->SetLoader(new GuiBindableTreeViewInstanceLoader);
manager->SetLoader(new GuiBindableTextListInstanceLoader(L""));
manager->SetLoader(new GuiBindableTextListInstanceLoader(L"Check"));
manager->SetLoader(new GuiBindableTextListInstanceLoader(L"Radio"));
manager->SetLoader(new GuiBindableTextListInstanceLoader);
manager->SetLoader(new GuiBindableDataColumnInstanceLoader);
manager->SetLoader(new GuiBindableDataGridInstanceLoader);
+9 -5
View File
@@ -3176,8 +3176,9 @@ Type Declaration
BEGIN_CLASS_MEMBER(GuiBindableTextList)
CLASS_MEMBER_BASE(GuiVirtualTextList)
CLASS_MEMBER_CONSTRUCTOR(GuiBindableTextList*(GuiBindableTextList::IStyleProvider*, list::TextItemStyleProvider::IBulletFactory*, Ptr<IValueEnumerable>), {L"styleProvider" _ L"bulletFactory" _ L"itemSource"})
CLASS_MEMBER_CONSTRUCTOR(GuiBindableTextList*(GuiBindableTextList::IStyleProvider*, list::TextItemStyleProvider::IBulletFactory*), {L"styleProvider" _ L"bulletFactory"})
CLASS_MEMBER_PROPERTY_FAST(ItemSource)
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(TextProperty)
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(CheckedProperty)
CLASS_MEMBER_PROPERTY_EVENT_READONLY_FAST(SelectedItem, SelectionChanged)
@@ -3185,10 +3186,11 @@ Type Declaration
BEGIN_CLASS_MEMBER(GuiBindableListView)
CLASS_MEMBER_BASE(GuiVirtualListView)
CLASS_MEMBER_CONSTRUCTOR(GuiBindableListView*(GuiBindableListView::IStyleProvider*, Ptr<IValueEnumerable>), {L"styleProvider" _ L"itemSource"})
CLASS_MEMBER_CONSTRUCTOR(GuiBindableListView*(GuiBindableListView::IStyleProvider*), {L"styleProvider"})
CLASS_MEMBER_PROPERTY_READONLY_FAST(DataColumns)
CLASS_MEMBER_PROPERTY_READONLY_FAST(Columns)
CLASS_MEMBER_PROPERTY_FAST(ItemSource)
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(LargeImageProperty)
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(SmallImageProperty)
CLASS_MEMBER_PROPERTY_EVENT_READONLY_FAST(SelectedItem, SelectionChanged)
@@ -3196,8 +3198,9 @@ Type Declaration
BEGIN_CLASS_MEMBER(GuiBindableTreeView)
CLASS_MEMBER_BASE(GuiVirtualTreeView)
CLASS_MEMBER_CONSTRUCTOR(GuiBindableTreeView*(GuiBindableTreeView::IStyleProvider*, const Value&), {L"styleProvider" _ L"itemSource"})
CLASS_MEMBER_CONSTRUCTOR(GuiBindableTreeView*(GuiBindableTreeView::IStyleProvider*), {L"styleProvider"})
CLASS_MEMBER_PROPERTY_FAST(ItemSource)
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(TextProperty)
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(ImageProperty)
CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(ChildrenProperty)
@@ -3216,13 +3219,14 @@ Type Declaration
BEGIN_CLASS_MEMBER(GuiBindableDataGrid)
CLASS_MEMBER_BASE(GuiVirtualDataGrid)
CLASS_MEMBER_CONSTRUCTOR(GuiBindableDataGrid*(GuiBindableDataGrid::IStyleProvider*, Ptr<IValueEnumerable>, const Value&), {L"styleProvider" _ L"itemSource" _ L"viewModelContext"})
CLASS_MEMBER_CONSTRUCTOR(GuiBindableDataGrid*(GuiBindableDataGrid::IStyleProvider*, const Value&), {L"styleProvider" _ L"viewModelContext"})
CLASS_MEMBER_METHOD(InsertBindableColumn, { L"index" _ L"column" })
CLASS_MEMBER_METHOD(AddBindableColumn, { L"column" })
CLASS_MEMBER_METHOD(RemoveBindableColumn, { L"column" })
CLASS_MEMBER_METHOD(ClearBindableColumns, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetBindableColumn, { L"index" })
CLASS_MEMBER_PROPERTY_FAST(ItemSource)
CLASS_MEMBER_PROPERTY_EVENT_READONLY_FAST(SelectedRowValue, SelectedCellChanged)
CLASS_MEMBER_PROPERTY_EVENT_READONLY_FAST(SelectedCellValue, SelectedCellChanged)
END_CLASS_MEMBER(GuiBindableDataGrid)
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.