GDragDropTarget Class Reference

A drag target class. More...

#include <GDragAndDrop.h>

Inheritance diagram for GDragDropTarget:

GTextView3 GWindow GDialog GDocApp< OptionsFmt > GAbout GAlert GFindReplaceCommon GFontSelect GInput GProgressDlg GFindDlg GReplaceDlg

List of all members.

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)


Detailed Description

A drag target class.

Member Function Documentation

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.

Returns:
DROPEFFECT_NONE for failure or DROPEFFECT_COPY, DROPEFFECT_MOVE, DROPEFFECT_LINK
Parameters:
Format  The selected format
Data  The data for the drop
Pt  The mouse coords
KeyState  The keyboard modifiers
See also:
LGI_EF_CTRL, LGI_EF_ALT, LGI_EF_SHIFT

Reimplemented in GTextView3, and GWindow.

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.

Returns:
DROPEFFECT_NONE for failure or DROPEFFECT_COPY, DROPEFFECT_MOVE, DROPEFFECT_LINK
Parameters:
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
See also:
LGI_EF_CTRL, LGI_EF_ALT, LGI_EF_SHIFT

Reimplemented in GTextView3, and GWindow.


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

Generated on Wed Dec 1 15:41:03 2010 for Lgi by  doxygen 1.5.7.1