Added Drag Data Class Back

Need to figure out why DataClass is not accepted
This commit is contained in:
daveaton
2014-11-29 13:21:48 -06:00
committed by amaitland
parent b415ec99a3
commit 6b3a6ddef1
4 changed files with 72 additions and 3 deletions
+1 -1
View File
@@ -484,7 +484,7 @@ namespace CefSharp
bool handled;
handled = handler->OnDragEnter(_browserControl);
handled = handler->OnDragEnter(_browserControl, (CefRefPtr<CefDragData>)dragData);
return handled;
}
+1
View File
@@ -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" />
+66
View File
@@ -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; }
}
}
+4 -2
View File
@@ -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);
}
}