Public Member Functions
|int||Drag (GView *SourceWnd, int Effect)|
|Start a drag operation. |
|virtual void||OnRegister (bool Suc)|
|Called when window is registered. |
|virtual void||OnStartData ()|
|Called on start of drag op. |
|virtual void||OnEndData ()|
|Called on end of drag op. |
|virtual bool||GetData (GVariant *Data, char *Format)|
|virtual bool||GetFormats (List< char > &Formats)|
Protected Member Functions
|bool||CreateFileDrop (GVariant *Var, GMouse &m, List< char > &Files)|
|Creates a file drop. |
|virtual bool GDragDropSource::GetData||(||GVariant *||Data,|
|virtual bool GDragDropSource::GetFormats||(||List< char > &||Formats||)||
This is called to see what formats your support Insert into the list dynamically allocated strings that describe the formats you can supply data in. One of these will be chosen by the target and passed to 'GetData'
You can define your own formats by making up a string or you can use OS defined ones to interact with other apps in the system. e.g. Win32 defines "CF_HDROP" for file d'n'd. You can use 'FormatToInt' and 'FormatToStr' to convert to and from the OS's integer id's. This works the same on Win32 as Linux. But the system formats will obviously be different.
The default file drop format for each OS is defined as LGI_FileDropFormat.
|Formats||List of format you can provide. You should keep the format length to 4 bytes on the Mac.|
Referenced by Drag().