#include <GDragAndDrop.h>
Public Member Functions | |
void | SetWindow (GView *To) |
call this when you have a operating system view handle (e.g. HWND/Window/HIViewRef) | |
virtual void | OnDragInit (bool Suc) |
Initialize event. | |
virtual void | OnDragEnter () |
Drag entered this target event. | |
virtual void | OnDragExit () |
Drag exited this target event. | |
virtual int | WillAccept (List< char > &Formats, GdcPt2 Pt, int KeyState) |
virtual int | OnDrop (char *Format, GVariant *Data, GdcPt2 Pt, int KeyState) |
virtual int GDragDropTarget::WillAccept | ( | List< char > & | Formats, | |
GdcPt2 | Pt, | |||
int | KeyState | |||
) | [inline, virtual] |
'WillAccept' is called to see whether this target can cope with any of the data types being passed to it. Once you have decided what format you want the data in clear all the other formats from the list. The first format left in the list will be passed to the 'OnDrop' function.
Formats | The list of formats the source provides, delete any you can't handle |
Pt | The mouse pointer in view space co-ords |
KeyState |
The current keyboard mobifiers
|
Reimplemented in GTextView3, and GWindow.
virtual int GDragDropTarget::OnDrop | ( | char * | Format, | |
GVariant * | Data, | |||
GdcPt2 | Pt, | |||
int | KeyState | |||
) | [inline, virtual] |
'OnDrop' is called when the user releases the data over your window. The data is going to be a binary GVariant in the format you accepted earlier.
Format | The selected format |
Data | The data for the drop |
Pt | The mouse coords |
KeyState |
The keyboard modifiers
|
Reimplemented in GTextView3, and GWindow.