1*fbcf0fe9SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*fbcf0fe9SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*fbcf0fe9SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*fbcf0fe9SAndrew Rist * distributed with this work for additional information 6*fbcf0fe9SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*fbcf0fe9SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*fbcf0fe9SAndrew Rist * "License"); you may not use this file except in compliance 9*fbcf0fe9SAndrew Rist * with the License. You may obtain a copy of the License at 10*fbcf0fe9SAndrew Rist * 11*fbcf0fe9SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*fbcf0fe9SAndrew Rist * 13*fbcf0fe9SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*fbcf0fe9SAndrew Rist * software distributed under the License is distributed on an 15*fbcf0fe9SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*fbcf0fe9SAndrew Rist * KIND, either express or implied. See the License for the 17*fbcf0fe9SAndrew Rist * specific language governing permissions and limitations 18*fbcf0fe9SAndrew Rist * under the License. 19*fbcf0fe9SAndrew Rist * 20*fbcf0fe9SAndrew Rist *************************************************************/ 21*fbcf0fe9SAndrew Rist 22*fbcf0fe9SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _TARGETDROPCONTEXT_HXX_ 25cdf0e10cSrcweir #define _TARGETDROPCONTEXT_HXX_ 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx> 28cdf0e10cSrcweir #include <com/sun/star/datatransfer/dnd/XDropTargetDropContext.hpp> 29cdf0e10cSrcweir 30cdf0e10cSrcweir #include "target.hxx" 31cdf0e10cSrcweir 32cdf0e10cSrcweir using namespace ::com::sun::star::datatransfer::dnd; 33cdf0e10cSrcweir using namespace ::cppu; 34cdf0e10cSrcweir using namespace ::com::sun::star::uno; 35cdf0e10cSrcweir using namespace ::com::sun::star::lang; 36cdf0e10cSrcweir 37cdf0e10cSrcweir class TargetDropContext: public WeakImplHelper1<XDropTargetDropContext> 38cdf0e10cSrcweir { 39cdf0e10cSrcweir // calls to the functions of XDropTargetDropContext are delegated 40cdf0e10cSrcweir // to non-interface functions of m_pDropTarget 41cdf0e10cSrcweir DropTarget* m_pDropTarget; 42cdf0e10cSrcweir 43cdf0e10cSrcweir TargetDropContext(); 44cdf0e10cSrcweir TargetDropContext( const TargetDropContext&); 45cdf0e10cSrcweir TargetDropContext &operator= ( const TargetDropContext&); 46cdf0e10cSrcweir public: 47cdf0e10cSrcweir TargetDropContext( DropTarget* pTarget); 48cdf0e10cSrcweir ~TargetDropContext(); 49cdf0e10cSrcweir 50cdf0e10cSrcweir 51cdf0e10cSrcweir // XDropTargetDragContext 52cdf0e10cSrcweir virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation ) 53cdf0e10cSrcweir throw( RuntimeException); 54cdf0e10cSrcweir virtual void SAL_CALL rejectDrop( ) 55cdf0e10cSrcweir throw( RuntimeException); 56cdf0e10cSrcweir 57cdf0e10cSrcweir 58cdf0e10cSrcweir /* virtual Sequence< DataFlavor > SAL_CALL getCurrentDataFlavors( ) 59cdf0e10cSrcweir throw( RuntimeException); 60cdf0e10cSrcweir virtual sal_Bool SAL_CALL isDataFlavorSupported( const DataFlavor& df ) 61cdf0e10cSrcweir throw( RuntimeException); 62cdf0e10cSrcweir */ 63cdf0e10cSrcweir 64cdf0e10cSrcweir // XDropTargetDropContext (inherits XDropTargetDragContext) 65cdf0e10cSrcweir virtual void SAL_CALL dropComplete( sal_Bool success ) 66cdf0e10cSrcweir throw( RuntimeException); 67cdf0e10cSrcweir }; 68cdf0e10cSrcweir #endif 69