// CodeGear C++Builder
// Copyright (c) 1995, 2008 by CodeGear
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Rvdragdrop.pas' rev: 20.00

#ifndef RvdragdropHPP
#define RvdragdropHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Activex.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Rvstr.hpp>	// Pascal unit
#include <Rvuni.hpp>	// Pascal unit
#include <Rvscroll.hpp>	// Pascal unit
#include <Shlobj.hpp>	// Pascal unit
#include <Rvclasses.hpp>	// Pascal unit
#include <Rvtypes.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------
DECLARE_DINTERFACE_TYPE(IDropTarget)
DECLARE_DINTERFACE_TYPE(IDropSource)
DECLARE_DINTERFACE_TYPE(IEnumFORMATETC)

namespace Rvdragdrop
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TRVDropTarget;
class PASCALIMPLEMENTATION TRVDropTarget : public Rvscroll::TRVScrollerInternalIfcObject
{
	typedef Rvscroll::TRVScrollerInternalIfcObject inherited;
	
private:
	bool FAccepted;
	bool __fastcall HasAcceptableFormats(const _di_IDataObject DataObj);
	bool __fastcall AllowMoving(int KeyState, int Effect);
	int __fastcall GetEffect(int KeyState, int Effect);
	void __fastcall FillFormatEtc(tagFORMATETC &FmtEtc, System::Word Format);
	bool __fastcall GetFiles(const unsigned Handle, Classes::TStrings* Files);
	
protected:
	DYNAMIC Types::TPoint __fastcall ScreenToRichView(const Types::TPoint &pt);
	DYNAMIC void __fastcall DoDragDropCaretChanged(void);
	
public:
	virtual HRESULT __stdcall DragEnter(const _di_IDataObject DataObj, int KeyState, const Types::TPoint pt, int &Effect);
	HRESULT __stdcall DragOver(int KeyState, const Types::TPoint pt, int &Effect);
	HRESULT __stdcall DragLeave(void);
	HRESULT __stdcall Drop(const _di_IDataObject DataObj, int KeyState, const Types::TPoint pt, int &Effect);
	bool __fastcall GetMedium(const _di_IDataObject DataObj, System::Word Format, tagSTGMEDIUM &StgMedium);
	Rvclasses::TRVMemoryStream* __fastcall GetAsStream(const _di_IDataObject DataObj, System::Word Format);
	bool __fastcall GetAsTextA(const _di_IDataObject DataObj, System::Word Format, Rvtypes::TRVAnsiString &s);
	bool __fastcall GetAsTextW(const _di_IDataObject DataObj, System::Word Format, Rvtypes::TRVRawByteString &s);
	Graphics::TBitmap* __fastcall GetAsBitmap(const _di_IDataObject DataObj, bool TryDIBFirst);
	Graphics::TMetafile* __fastcall GetAsMetafile(const _di_IDataObject DataObj);
	Classes::TStringList* __fastcall GetAsFiles(const _di_IDataObject DataObj);
	bool __fastcall HasFormat(const _di_IDataObject DataObj, System::Word Format);
	__fastcall virtual ~TRVDropTarget(void);
	DYNAMIC bool __fastcall RegisterDragDropWindow(void);
	DYNAMIC void __fastcall UnRegisterDragDropWindow(void);
public:
	/* TRVScrollerInternalIfcObject.Create */ inline __fastcall virtual TRVDropTarget(Rvscroll::TRVScroller* AOwner) : Rvscroll::TRVScrollerInternalIfcObject(AOwner) { }
	
private:
	void *__IDropTarget;	/* IDropTarget */
	
public:
	#if defined(MANAGED_INTERFACE_OPERATORS)
	operator _di_IDropTarget()
	{
		_di_IDropTarget intf;
		GetInterface(intf);
		return intf;
	}
	#else
	operator IDropTarget*(void) { return (IDropTarget*)&__IDropTarget; }
	#endif
	
};


class DELPHICLASS TRVEnumFormatEtc;
class PASCALIMPLEMENTATION TRVEnumFormatEtc : public System::TInterfacedObject
{
	typedef System::TInterfacedObject inherited;
	
private:
	Graphics::TGraphic* FGraphic;
	int FIndex;
	System::Word __fastcall GetCurFormat(void);
	
public:
	__fastcall TRVEnumFormatEtc(Graphics::TGraphic* Graphic, int Index);
	HRESULT __stdcall Next(int Celt, /* out */ void *Elt, System::PLongint PCeltFetched);
	HRESULT __stdcall Skip(int Celt);
	HRESULT __stdcall Reset(void);
	HRESULT __stdcall Clone(/* out */ _di_IEnumFORMATETC &Enum);
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TRVEnumFormatEtc(void) { }
	
private:
	void *__IEnumFORMATETC;	/* IEnumFORMATETC */
	
public:
	#if defined(MANAGED_INTERFACE_OPERATORS)
	operator _di_IEnumFORMATETC()
	{
		_di_IEnumFORMATETC intf;
		GetInterface(intf);
		return intf;
	}
	#else
	operator IEnumFORMATETC*(void) { return (IEnumFORMATETC*)&__IEnumFORMATETC; }
	#endif
	
};


class DELPHICLASS TRVDropSource;
class PASCALIMPLEMENTATION TRVDropSource : public Rvscroll::TRVScrollerInternalIfcObject
{
	typedef Rvscroll::TRVScrollerInternalIfcObject inherited;
	
protected:
	tagSTGMEDIUM FMedium;
	bool FUseMedium;
	DYNAMIC bool __fastcall IsAvailableFormat(System::Word Format);
	DYNAMIC Classes::TMemoryStream* __fastcall GetAsStream(System::Word Format);
	DYNAMIC HRESULT __fastcall GetAsHandle(System::Word Format, unsigned &Handle);
	DYNAMIC HRESULT __fastcall SaveToHandle(System::Word Format, unsigned Handle);
	
public:
	HRESULT __stdcall QueryContinueDrag(BOOL FEscapePressed, int KeyState);
	HRESULT __stdcall GiveFeedback(int Effect);
	virtual HRESULT __stdcall GetData(const tagFORMATETC &FormatEtcIn, /* out */ tagSTGMEDIUM &Medium);
	virtual HRESULT __stdcall GetDataHere(const tagFORMATETC &FormatEtcIn, /* out */ tagSTGMEDIUM &Medium);
	virtual HRESULT __stdcall QueryGetData(const tagFORMATETC &FormatEtc);
	virtual HRESULT __stdcall GetCanonicalFormatEtc(const tagFORMATETC &FormatEtc, /* out */ tagFORMATETC &FormatEtcOut);
	virtual HRESULT __stdcall SetData(const tagFORMATETC &FormatEtc, tagSTGMEDIUM &Medium, BOOL FRelease);
	virtual HRESULT __stdcall EnumFormatEtc(int Direction, /* out */ _di_IEnumFORMATETC &EnumFormatEtc);
	virtual HRESULT __stdcall DAdvise(const tagFORMATETC &FormatEtc, int advf, const _di_IAdviseSink advsink, /* out */ int &Connection);
	virtual HRESULT __stdcall DUnadvise(int Connection);
	virtual HRESULT __stdcall EnumDAdvise(/* out */ _di_IEnumSTATDATA &EnumAdvise);
	__fastcall virtual ~TRVDropSource(void);
	bool __fastcall StoreData(System::Word Format);
public:
	/* TRVScrollerInternalIfcObject.Create */ inline __fastcall virtual TRVDropSource(Rvscroll::TRVScroller* AOwner) : Rvscroll::TRVScrollerInternalIfcObject(AOwner) { }
	
private:
	void *__IDataObject;	/* IDataObject */
	void *__IDropSource;	/* IDropSource */
	
public:
	#if defined(MANAGED_INTERFACE_OPERATORS)
	operator _di_IDataObject()
	{
		_di_IDataObject intf;
		GetInterface(intf);
		return intf;
	}
	#else
	operator IDataObject*(void) { return (IDataObject*)&__IDataObject; }
	#endif
	#if defined(MANAGED_INTERFACE_OPERATORS)
	operator _di_IDropSource()
	{
		_di_IDropSource intf;
		GetInterface(intf);
		return intf;
	}
	#else
	operator IDropSource*(void) { return (IDropSource*)&__IDropSource; }
	#endif
	
};


typedef TMetaClass* TRVDropSourceClass;

//-- var, const, procedure ---------------------------------------------------

}	/* namespace Rvdragdrop */
using namespace Rvdragdrop;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// RvdragdropHPP
