forked from enlightenment/efl
csharp: updating Bind docs and hide api.
Summary: ref T8345 Reviewers: lauromoura, felipealmeida, segfaultxavi, woohyun Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8345 Differential Revision: https://phab.enlightenment.org/D10374
This commit is contained in:
parent
902ea935e4
commit
53e1d3ad08
|
@ -12,13 +12,15 @@ namespace Efl {
|
||||||
/// <summary>Represents a bindable property as used by <see cref="Efl.Ui.ItemFactory<T>" /> instances.
|
/// <summary>Represents a bindable property as used by <see cref="Efl.Ui.ItemFactory<T>" /> instances.
|
||||||
///
|
///
|
||||||
/// <para>It is internally instantiated and returned by generated extension methods.</para>
|
/// <para>It is internally instantiated and returned by generated extension methods.</para>
|
||||||
///
|
|
||||||
/// Since EFL 1.23.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BindableProperty<T>
|
public class BindableProperty<T>
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>Creates a new bindable property with the source name <c>name</c>.</summary>
|
/// <summary>Creates a new bindable property with the source name
|
||||||
|
/// <c>name</c>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">The property name of the bind.</param>
|
||||||
|
/// <param name="binder">The binder that will be used to bind the properties.</param>
|
||||||
public BindableProperty(string name, Efl.Ui.IPropertyBind binder)
|
public BindableProperty(string name, Efl.Ui.IPropertyBind binder)
|
||||||
{
|
{
|
||||||
this.propertyName = name;
|
this.propertyName = name;
|
||||||
|
@ -26,7 +28,11 @@ public class BindableProperty<T>
|
||||||
this.binder = binder;
|
this.binder = binder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Creates a new bindable property for part <c>part</c>.</summary>
|
/// <summary>Creates a new bindable property for part <c>part</c>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="partName">The name of the part this instance wraps.</param>
|
||||||
|
/// <param name="partProperty">The property name of the bind.</param>
|
||||||
|
/// <param name="binder">Yhe binder that will be used to bind the properties.</param>
|
||||||
public BindableProperty(string partName, string partProperty, Efl.Ui.IPropertyBind binder)
|
public BindableProperty(string partName, string partProperty, Efl.Ui.IPropertyBind binder)
|
||||||
{
|
{
|
||||||
this.partName = partName;
|
this.partName = partName;
|
||||||
|
@ -34,7 +40,10 @@ public class BindableProperty<T>
|
||||||
this.binder = binder;
|
this.binder = binder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Binds the model property <c>modelProperty</c> to the property <c>name</c> set in the constructor.</summary>
|
/// <summary>Binds the model property <c>modelProperty</c> to the property
|
||||||
|
/// <c>name</c> set in the constructor.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="modelProperty">The model property</param>
|
||||||
public Eina.Error Bind(string modelProperty)
|
public Eina.Error Bind(string modelProperty)
|
||||||
{
|
{
|
||||||
if (this.partName == null)
|
if (this.partName == null)
|
||||||
|
@ -70,52 +79,69 @@ public class BindableProperty<T>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The property name of the bind.
|
||||||
|
/// </summary>
|
||||||
string propertyName;
|
string propertyName;
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the part this instance wraps.
|
||||||
|
/// </summary>
|
||||||
string partName;
|
string partName;
|
||||||
|
/// <summary>
|
||||||
|
/// The binder that will be used to bind the properties.
|
||||||
|
/// </summary>
|
||||||
Efl.Ui.IPropertyBind binder;
|
Efl.Ui.IPropertyBind binder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Represents bindable parts as used by <see cref="Efl.Ui.ItemFactory<T>" /> instances.
|
/// <summary>Represents bindable parts as used by <see cref="Efl.Ui.ItemFactory<T>" /> instances.
|
||||||
///
|
///
|
||||||
/// <para>It is internally instantiated and returned by generated extension methods.</para>
|
/// <para>It is internally instantiated and returned by generated extension methods.</para>
|
||||||
///
|
|
||||||
/// Since EFL 1.23.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BindablePart<T>
|
public class BindablePart<T>
|
||||||
{
|
{
|
||||||
/// <summary>Creates a new bindable property with the binder <c>binder</c>.</summary>
|
/// <summary>Creates a new bindable property with the binder <c>binder</c>.
|
||||||
|
///</summary>
|
||||||
|
/// <param name="partName">The name of the part this instance wraps.</param>
|
||||||
|
/// <param name="binder">Yhe binder that will be used to bind the properties.</param>
|
||||||
public BindablePart(string partName, Efl.Ui.IPropertyBind binder)
|
public BindablePart(string partName, Efl.Ui.IPropertyBind binder)
|
||||||
{
|
{
|
||||||
this.PartName = partName;
|
this.PartName = partName;
|
||||||
this.Binder = binder;
|
this.Binder = binder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>The name of the part this instance wraps.</summary>
|
/// <summary>The name of the part this instance wraps.
|
||||||
|
/// </summary>
|
||||||
public string PartName { get; private set; }
|
public string PartName { get; private set; }
|
||||||
/// <summary>The binder that will be used to bind the properties.</summary>
|
/// <summary>The binder that will be used to bind the properties.
|
||||||
|
/// </summary>
|
||||||
public Efl.Ui.IPropertyBind Binder { get; private set; }
|
public Efl.Ui.IPropertyBind Binder { get; private set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Represents bindable factory parts as used by <see cref="Efl.Ui.ItemFactory<T>" /> instances.
|
/// <summary>Represents bindable factory parts as used by <see cref="Efl.Ui.ItemFactory<T>" /> instances.
|
||||||
///
|
|
||||||
/// Since EFL 1.23.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BindableFactoryPart<T>
|
public class BindableFactoryPart<T>
|
||||||
{
|
{
|
||||||
/// <summary>Creates a new bindable factory part with the binder <c>binder</c>.</summary>
|
/// <summary>Creates a new bindable factory part with the binder <c>binder</c>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="partName">The name of the part this instance wraps.</param>
|
||||||
|
/// <param name="binder">Yhe binder that will be used to bind the properties.</param>
|
||||||
public BindableFactoryPart(string partName, Efl.Ui.IFactoryBind binder)
|
public BindableFactoryPart(string partName, Efl.Ui.IFactoryBind binder)
|
||||||
{
|
{
|
||||||
this.PartName = partName;
|
this.PartName = partName;
|
||||||
this.Binder = binder;
|
this.Binder = binder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>The name of the part this instance wraps.</summary>
|
/// <summary>The name of the part this instance wraps.
|
||||||
|
/// </summary>
|
||||||
public string PartName { get; private set; }
|
public string PartName { get; private set; }
|
||||||
/// <summary>The binder that will be used to bind the properties.</summary>
|
/// <summary>The binder that will be used to bind the properties.
|
||||||
|
/// </summary>
|
||||||
public Efl.Ui.IFactoryBind Binder { get; private set; }
|
public Efl.Ui.IFactoryBind Binder { get; private set; }
|
||||||
|
|
||||||
/// <summary>Binds the given factory to this part.</summary>
|
/// <summary>Binds the given factory to this part.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="factory">The factory to be used.</param>
|
||||||
public Eina.Error BindFactory(Efl.Ui.IFactory factory)
|
public Eina.Error BindFactory(Efl.Ui.IFactory factory)
|
||||||
{
|
{
|
||||||
return this.Binder.BindFactory(this.PartName, factory);
|
return this.Binder.BindFactory(this.PartName, factory);
|
||||||
|
@ -128,6 +154,7 @@ namespace Csharp
|
||||||
/// <summary>Helper class to differentiate between factory extension methods.
|
/// <summary>Helper class to differentiate between factory extension methods.
|
||||||
///
|
///
|
||||||
/// For internal use only.</summary>
|
/// For internal use only.</summary>
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public class ExtensionTag<TBase, TInherited>
|
public class ExtensionTag<TBase, TInherited>
|
||||||
where TInherited : TBase
|
where TInherited : TBase
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue