C++ API Reference
|
Drag-and-drop data, used with MExternalDropCallback. More...
#include <MExternalDropData.h>
Public Member Functions | |
bool | hasText () const |
Query whether the drop contains text data. More... | |
MString | text () const |
Obtain the text data contained in the drop, if any. More... | |
bool | hasUrls () const |
Query whether the drop contains URL data. More... | |
MStringArray | urls () const |
Obtain the URL data contained in the drop, if any. More... | |
bool | hasHtml () const |
Query whether the drop contains html data. More... | |
MString | html () const |
Obtain the html data contained in the drop, if any. More... | |
bool | hasColor () const |
Query whether the drop contains color data. More... | |
MColor | color () const |
Obtain the color data contained in the drop, if any. More... | |
bool | hasImage () const |
Query whether the drop contains image data. More... | |
MImage | image () const |
Obtain the image data contained in the drop, if any. More... | |
MStringArray | formats () const |
Obtain the list of data formats contained in the drop. More... | |
bool | hasFormat (const MString &format) const |
Query whether the drop contains data in a given format. More... | |
unsigned int | dataSize (const MString &format) const |
Return the size (in bytes) of the data with the given format contained in the drop. More... | |
MStatus | copyData (const MString &format, void *buffer, unsigned int bufferSize) const |
This method is not available in Python. More... | |
int | keyboardModifiers () const |
Return the modifier state for this drop. More... | |
Protected Attributes | |
OPENMAYA_PRIVATE int | mouseButtons |
Return the mouse button state for this drop. More... | |
Drag-and-drop data, used with MExternalDropCallback.
MExternalDropData is the data that a drag-and-drop operation carries if dragging from an external application and dropping onto Maya.
It typically arrives from a MExternalDropCallback callback method.
bool hasText | ( | ) | const |
Query whether the drop contains text data.
MString text | ( | ) | const |
Obtain the text data contained in the drop, if any.
bool hasUrls | ( | ) | const |
Query whether the drop contains URL data.
MStringArray urls | ( | ) | const |
Obtain the URL data contained in the drop, if any.
bool hasHtml | ( | ) | const |
Query whether the drop contains html data.
MString html | ( | ) | const |
Obtain the html data contained in the drop, if any.
bool hasColor | ( | ) | const |
Query whether the drop contains color data.
MColor color | ( | ) | const |
Obtain the color data contained in the drop, if any.
bool hasImage | ( | ) | const |
Query whether the drop contains image data.
MImage image | ( | ) | const |
Obtain the image data contained in the drop, if any.
MStringArray formats | ( | ) | const |
Obtain the list of data formats contained in the drop.
bool hasFormat | ( | const MString & | format | ) | const |
Query whether the drop contains data in a given format.
The result will be true iff the format is contained in the result of the formats() method.
[in] | format | The format to look for. |
unsigned int dataSize | ( | const MString & | format | ) | const |
Return the size (in bytes) of the data with the given format contained in the drop.
[in] | format | The format to look for. |
This method is not available in Python.
Copy the data with the given format contained in the drop to a buffer.
[in] | format | The format to look for. |
[in] | buffer | The buffer to which to copy the data. |
[in] | bufferSize | The size of the buffer (in bytes). |
int keyboardModifiers | ( | ) | const |
Return the modifier state for this drop.
Use MExternalDropData::KeyboardModifiers bitmask to distinguish the states.
|
protected |
Return the mouse button state for this drop.
Use MExternalDropData::MouseButtons bitmask to distinguish the states.