namespace Tizen.NUI
{
/// <summary>
- /// DragAndDrop controls the drag objet and data.
+ /// DragAndDrop controls the drag object and data.
/// </summary>
+ /// <since_tizen> 10 </since_tizen>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000: Dispose objects before losing scope", Justification = "It does not have ownership.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
public class DragAndDrop : BaseHandle
{
- [EditorBrowsable(EditorBrowsableState.Never)]
- public delegate void SourceEventHandler(SourceEventType sourceEventType);
+ public delegate void SourceEventHandler(DragSourceEventType sourceEventType);
private delegate void InternalSourceEventHandler(int sourceEventType);
public delegate void DragAndDropEventHandler(View targetView, DragEvent dragEvent);
private delegate void InternalDragAndDropEventHandler(global::System.IntPtr dragEvent);
private int shadowWidth = 100;
private int shadowHeight = 100;
- [EditorBrowsable(EditorBrowsableState.Never)]
private DragAndDrop() : this(Interop.DragAndDrop.New(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <summary>
/// Gets the singleton instance of DragAndDrop.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 10 </since_tizen>
public static DragAndDrop Instance { get; } = new DragAndDrop();
/// <summary>
/// <param name="shadowView">The shadow view for drag object</param>
/// <param name="dragData">The data to send</param>
/// <param name="callback">The source event callback</param>
- /// <exception cref="NotSupportedException">The multi-window feature is not supported.</exception>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 10 </since_tizen>
public void StartDragAndDrop(View sourceView, View shadowView, DragData dragData, SourceEventHandler callback)
{
if (Window.IsSupportedMultiWindow() == false)
sourceEventCb = (sourceEventType) =>
{
- if ((SourceEventType)sourceEventType == SourceEventType.Finish)
+ if ((DragSourceEventType)sourceEventType == DragSourceEventType.Finish)
{
if (mShadowView)
{
mDragWindow.RenderOnce();
}
- callback((SourceEventType)sourceEventType);
+ callback((DragSourceEventType)sourceEventType);
};
if (!Interop.DragAndDrop.StartDragAndDrop(SwigCPtr, View.getCPtr(sourceView), Window.getCPtr(mDragWindow), dragData.MimeType, dragData.Data,
/// Adds listener for drop targets
/// </summary>
/// <param name="targetView">The target view</param>
- /// <param name="callback">The callback function to get drag event</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <param name="callback">The callback function to get drag event when the drag source enters, moves, leaves and drops on the drop target</param>
+ /// <since_tizen> 10 </since_tizen>
public void AddListener(View targetView, DragAndDropEventHandler callback)
{
InternalDragAndDropEventHandler cb = (dragEvent) =>
/// </summary>
/// <param name="targetView">The target view</param>
/// <param name="callback">The callback function to remove</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 10 </since_tizen>
public void RemoveListener(View targetView, DragAndDropEventHandler callback)
{
if (!targetEventDictionary.ContainsKey(targetView))
namespace Tizen.NUI
{
/// <summary>
- /// Source event type.
+ /// Drag source event type.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public enum SourceEventType
+ /// <since_tizen> 10 </since_tizen>
+ public enum DragSourceEventType
{
/// <summary>
/// Drag and drop is started.
/// <summary>
/// This specifies drag data.
/// </summary>
- /// Suppress warning : This struct will be used data of callback, so override equals and operator does not necessary.
+ /// <since_tizen> 10 </since_tizen>
+ // Suppress warning : This struct will be used data of callback, so override equals and operator does not necessary.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815: Override equals and operator equals on value types")]
- [EditorBrowsable(EditorBrowsableState.Never)]
public struct DragData
{
/// <summary>
/// <summary>
/// Drag event type.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 10 </since_tizen>
public enum DragType
{
/// <summary>
/// <summary>
/// This specifies drag event.
/// </summary>
- /// Suppress warning : This struct will be used data of callback, so override equals and operator does not necessary.
+ /// <since_tizen> 10 </since_tizen>
+ // Suppress warning : This struct will be used data of callback, so override equals and operator does not necessary.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815: Override equals and operator equals on value types")]
- [EditorBrowsable(EditorBrowsableState.Never)]
public struct DragEvent
{
/// <summary>
}
}
- public void OnSourceEventFunc(SourceEventType type)
+ public void OnSourceEventFunc(DragSourceEventType type)
{
- if (type == SourceEventType.Start)
+ if (type == DragSourceEventType.Start)
{
- Tizen.Log.Debug("NUIDnDSource", "Source App SourceEvnetType: " + "Start");
+ Tizen.Log.Debug("NUIDnDSource", "Source App DragSourceEventType: " + "Start");
}
- else if (type == SourceEventType.Cancel)
+ else if (type == DragSourceEventType.Cancel)
{
- Tizen.Log.Debug("NUIDnDSource", "Source App SourceEvnetType: " + "Cancel");
+ Tizen.Log.Debug("NUIDnDSource", "Source App DragSourceEventType: " + "Cancel");
}
- else if (type == SourceEventType.Accept)
+ else if (type == DragSourceEventType.Accept)
{
- Tizen.Log.Debug("NUIDnDSource", "Source App SourceEvnetType: " + "Accept");
+ Tizen.Log.Debug("NUIDnDSource", "Source App DragSourceEventType: " + "Accept");
}
- else if (type == SourceEventType.Finish)
+ else if (type == DragSourceEventType.Finish)
{
- Tizen.Log.Debug("NUIDnDSource", "Source App SourceEvnetType: " + "Finish");
+ Tizen.Log.Debug("NUIDnDSource", "Source App DragSourceEventType: " + "Finish");
}
}