Chromium Embedded Framework (CEF)  126.2.0+g5c56e98+chromium-126.0.6478.62
CefDragData Class Referenceabstract

Class used to represent drag data. More...

#include "include/cef_drag_data.h"

Inheritance diagram for CefDragData:
CefBaseRefCounted

Public Member Functions

virtual CefRefPtr< CefDragDataClone ()=0
 Returns a copy of the current object. More...
 
virtual bool IsReadOnly ()=0
 Returns true if this object is read-only. More...
 
virtual bool IsLink ()=0
 Returns true if the drag data is a link. More...
 
virtual bool IsFragment ()=0
 Returns true if the drag data is a text or html fragment. More...
 
virtual bool IsFile ()=0
 Returns true if the drag data is a file. More...
 
virtual CefString GetLinkURL ()=0
 Return the link URL that is being dragged. More...
 
virtual CefString GetLinkTitle ()=0
 Return the title associated with the link being dragged. More...
 
virtual CefString GetLinkMetadata ()=0
 Return the metadata, if any, associated with the link being dragged. More...
 
virtual CefString GetFragmentText ()=0
 Return the plain text fragment that is being dragged. More...
 
virtual CefString GetFragmentHtml ()=0
 Return the text/html fragment that is being dragged. More...
 
virtual CefString GetFragmentBaseURL ()=0
 Return the base URL that the fragment came from. More...
 
virtual CefString GetFileName ()=0
 Return the name of the file being dragged out of the browser window. More...
 
virtual size_t GetFileContents (CefRefPtr< CefStreamWriter > writer)=0
 Write the contents of the file being dragged out of the web view into |writer|. More...
 
virtual bool GetFileNames (std::vector< CefString > &names)=0
 Retrieve the list of file names that are being dragged into the browser window. More...
 
virtual bool GetFilePaths (std::vector< CefString > &paths)=0
 Retrieve the list of file paths that are being dragged into the browser window. More...
 
virtual void SetLinkURL (const CefString &url)=0
 Set the link URL that is being dragged. More...
 
virtual void SetLinkTitle (const CefString &title)=0
 Set the title associated with the link being dragged. More...
 
virtual void SetLinkMetadata (const CefString &data)=0
 Set the metadata associated with the link being dragged. More...
 
virtual void SetFragmentText (const CefString &text)=0
 Set the plain text fragment that is being dragged. More...
 
virtual void SetFragmentHtml (const CefString &html)=0
 Set the text/html fragment that is being dragged. More...
 
virtual void SetFragmentBaseURL (const CefString &base_url)=0
 Set the base URL that the fragment came from. More...
 
virtual void ResetFileContents ()=0
 Reset the file contents. More...
 
virtual void AddFile (const CefString &path, const CefString &display_name)=0
 Add a file that is being dragged into the webview. More...
 
virtual void ClearFilenames ()=0
 Clear list of filenames. More...
 
virtual CefRefPtr< CefImageGetImage ()=0
 Get the image representation of drag data. More...
 
virtual CefPoint GetImageHotspot ()=0
 Get the image hotspot (drag start location relative to image dimensions). More...
 
virtual bool HasImage ()=0
 Returns true if an image representation of drag data is available. More...
 
- Public Member Functions inherited from CefBaseRefCounted
virtual void AddRef () const =0
 Called to increment the reference count for the object. More...
 
virtual bool Release () const =0
 Called to decrement the reference count for the object. More...
 
virtual bool HasOneRef () const =0
 Returns true if the reference count is 1. More...
 
virtual bool HasAtLeastOneRef () const =0
 Returns true if the reference count is at least 1. More...
 

Static Public Member Functions

static CefRefPtr< CefDragDataCreate ()
 Create a new CefDragData object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CefBaseRefCounted
virtual ~CefBaseRefCounted ()
 

Detailed Description

Class used to represent drag data.

The methods of this class may be called on any thread.

Member Function Documentation

◆ AddFile()

virtual void CefDragData::AddFile ( const CefString path,
const CefString display_name 
)
pure virtual

Add a file that is being dragged into the webview.

◆ ClearFilenames()

virtual void CefDragData::ClearFilenames ( )
pure virtual

Clear list of filenames.

◆ Clone()

virtual CefRefPtr<CefDragData> CefDragData::Clone ( )
pure virtual

Returns a copy of the current object.

◆ Create()

static CefRefPtr<CefDragData> CefDragData::Create ( )
static

Create a new CefDragData object.

◆ GetFileContents()

virtual size_t CefDragData::GetFileContents ( CefRefPtr< CefStreamWriter writer)
pure virtual

Write the contents of the file being dragged out of the web view into |writer|.

Returns the number of bytes sent to |writer|. If |writer| is NULL this method will return the size of the file contents in bytes. Call GetFileName() to get a suggested name for the file.

◆ GetFileName()

virtual CefString CefDragData::GetFileName ( )
pure virtual

Return the name of the file being dragged out of the browser window.

◆ GetFileNames()

virtual bool CefDragData::GetFileNames ( std::vector< CefString > &  names)
pure virtual

Retrieve the list of file names that are being dragged into the browser window.

◆ GetFilePaths()

virtual bool CefDragData::GetFilePaths ( std::vector< CefString > &  paths)
pure virtual

Retrieve the list of file paths that are being dragged into the browser window.

◆ GetFragmentBaseURL()

virtual CefString CefDragData::GetFragmentBaseURL ( )
pure virtual

Return the base URL that the fragment came from.

This value is used for resolving relative URLs and may be empty.

◆ GetFragmentHtml()

virtual CefString CefDragData::GetFragmentHtml ( )
pure virtual

Return the text/html fragment that is being dragged.

◆ GetFragmentText()

virtual CefString CefDragData::GetFragmentText ( )
pure virtual

Return the plain text fragment that is being dragged.

◆ GetImage()

virtual CefRefPtr<CefImage> CefDragData::GetImage ( )
pure virtual

Get the image representation of drag data.

May return NULL if no image representation is available.

◆ GetImageHotspot()

virtual CefPoint CefDragData::GetImageHotspot ( )
pure virtual

Get the image hotspot (drag start location relative to image dimensions).

◆ GetLinkMetadata()

virtual CefString CefDragData::GetLinkMetadata ( )
pure virtual

Return the metadata, if any, associated with the link being dragged.

◆ GetLinkTitle()

virtual CefString CefDragData::GetLinkTitle ( )
pure virtual

Return the title associated with the link being dragged.

◆ GetLinkURL()

virtual CefString CefDragData::GetLinkURL ( )
pure virtual

Return the link URL that is being dragged.

◆ HasImage()

virtual bool CefDragData::HasImage ( )
pure virtual

Returns true if an image representation of drag data is available.

◆ IsFile()

virtual bool CefDragData::IsFile ( )
pure virtual

Returns true if the drag data is a file.

◆ IsFragment()

virtual bool CefDragData::IsFragment ( )
pure virtual

Returns true if the drag data is a text or html fragment.

◆ IsLink()

virtual bool CefDragData::IsLink ( )
pure virtual

Returns true if the drag data is a link.

◆ IsReadOnly()

virtual bool CefDragData::IsReadOnly ( )
pure virtual

Returns true if this object is read-only.

◆ ResetFileContents()

virtual void CefDragData::ResetFileContents ( )
pure virtual

Reset the file contents.

You should do this before calling CefBrowserHost::DragTargetDragEnter as the web view does not allow us to drag in this kind of data.

◆ SetFragmentBaseURL()

virtual void CefDragData::SetFragmentBaseURL ( const CefString base_url)
pure virtual

Set the base URL that the fragment came from.

◆ SetFragmentHtml()

virtual void CefDragData::SetFragmentHtml ( const CefString html)
pure virtual

Set the text/html fragment that is being dragged.

◆ SetFragmentText()

virtual void CefDragData::SetFragmentText ( const CefString text)
pure virtual

Set the plain text fragment that is being dragged.

◆ SetLinkMetadata()

virtual void CefDragData::SetLinkMetadata ( const CefString data)
pure virtual

Set the metadata associated with the link being dragged.

◆ SetLinkTitle()

virtual void CefDragData::SetLinkTitle ( const CefString title)
pure virtual

Set the title associated with the link being dragged.

◆ SetLinkURL()

virtual void CefDragData::SetLinkURL ( const CefString url)
pure virtual

Set the link URL that is being dragged.


The documentation for this class was generated from the following file: