mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 12:09:40 +00:00
Added Drag Data Class Back
Need to figure out why DataClass is not accepted
This commit is contained in:
@@ -484,7 +484,7 @@ namespace CefSharp
|
||||
|
||||
bool handled;
|
||||
|
||||
handled = handler->OnDragEnter(_browserControl);
|
||||
handled = handler->OnDragEnter(_browserControl, (CefRefPtr<CefDragData>)dragData);
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CefFileDialogMode.cs" />
|
||||
<Compile Include="DragData.cs" />
|
||||
<Compile Include="IFocusHandler.cs" />
|
||||
<Compile Include="IDragHandler.cs" />
|
||||
<Compile Include="IsBrowserInitializedChangedEventArgs.cs" />
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
public class DragData
|
||||
{
|
||||
/// <summary>
|
||||
/// Return the name of the file being dragged out of the browser window.
|
||||
/// </summary>
|
||||
public string GetFileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the list of file names that are being dragged into the browser window
|
||||
/// </summary>
|
||||
public bool GetFileNames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Return the base URL that the fragment came from. This value is used for resolving relative URLs and may be empty.
|
||||
/// </summary>
|
||||
public string GetFragmentBaseURL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Return the text/html fragment that is being dragged.
|
||||
/// </summary>
|
||||
public string GetFragmentHtml { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Return the plain text fragment that is being dragged.
|
||||
/// </summary>
|
||||
public string GetFragmentText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Return the metadata, if any, associated with the link being dragged.
|
||||
/// </summary>
|
||||
public string GetLinkMetadata { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Return the title associated with the link being dragged.
|
||||
/// </summary>
|
||||
public string GetLinkTitle { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Return the link URL that is being dragged.
|
||||
/// </summary>
|
||||
public string GetLinkURL { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the drag data is a file.
|
||||
/// </summary>
|
||||
public bool IsFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the drag data is a text or html fragment.
|
||||
/// </summary>
|
||||
public bool IsFragment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the drag data is a link
|
||||
/// </summary>
|
||||
public bool IsLink { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,12 @@
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
namespace CefSharp
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
public interface IDragHandler
|
||||
{
|
||||
bool OnDragEnter(IWebBrowser browser);
|
||||
bool OnDragEnter(IWebBrowser browser, List<string> dragData, out List<string> result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user