1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _TARGETLISTENER_HXX_ 29 #define _TARGETLISTENER_HXX_ 30 31 #if defined _MSC_VER 32 #pragma warning(push,1) 33 #endif 34 #include <windows.h> 35 #if defined _MSC_VER 36 #pragma warning(pop) 37 #endif 38 #include <cppuhelper/implbase1.hxx> 39 #include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp> 40 #include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp> 41 #include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp> 42 #include <com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.hpp> 43 44 using namespace ::com::sun::star::datatransfer; 45 using namespace ::com::sun::star::datatransfer::dnd; 46 using namespace ::cppu; 47 using namespace ::com::sun::star::uno; 48 using namespace ::com::sun::star::lang; 49 50 class DropTargetListener: public WeakImplHelper1<XDropTargetListener> 51 { 52 // this is a window where droped data are shown as text (only text) 53 HWND m_hEdit; 54 public: 55 DropTargetListener( HWND hEdit); 56 ~DropTargetListener(); 57 58 virtual void SAL_CALL disposing( const EventObject& Source ) 59 throw(RuntimeException); 60 61 62 virtual void SAL_CALL drop( const DropTargetDropEvent& dtde ) 63 throw(RuntimeException); 64 virtual void SAL_CALL dragEnter( const DropTargetDragEnterEvent& dtde ) 65 throw(RuntimeException); 66 virtual void SAL_CALL dragExit( const DropTargetEvent& dte ) 67 throw(RuntimeException); 68 virtual void SAL_CALL dragOver( const DropTargetDragEvent& dtde ) 69 throw(RuntimeException); 70 virtual void SAL_CALL dropActionChanged( const DropTargetDragEvent& dtde ) 71 throw(RuntimeException); 72 }; 73 74 #endif 75