1*0d63794cSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*0d63794cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*0d63794cSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*0d63794cSAndrew Rist * distributed with this work for additional information 6*0d63794cSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*0d63794cSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*0d63794cSAndrew Rist * "License"); you may not use this file except in compliance 9*0d63794cSAndrew Rist * with the License. You may obtain a copy of the License at 10*0d63794cSAndrew Rist * 11*0d63794cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*0d63794cSAndrew Rist * 13*0d63794cSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*0d63794cSAndrew Rist * software distributed under the License is distributed on an 15*0d63794cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*0d63794cSAndrew Rist * KIND, either express or implied. See the License for the 17*0d63794cSAndrew Rist * specific language governing permissions and limitations 18*0d63794cSAndrew Rist * under the License. 19*0d63794cSAndrew Rist * 20*0d63794cSAndrew Rist *************************************************************/ 21*0d63794cSAndrew Rist 22*0d63794cSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _DRAGSOURCECONTEXT_HXX_ 25cdf0e10cSrcweir #define _DRAGSOURCECONTEXT_HXX_ 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx> 28cdf0e10cSrcweir #include <com/sun/star/datatransfer/dnd/XDragSourceContext.hpp> 29cdf0e10cSrcweir #include <cppuhelper/compbase1.hxx> 30cdf0e10cSrcweir #include <cppuhelper/basemutex.hxx> 31cdf0e10cSrcweir 32cdf0e10cSrcweir #include <boost/utility.hpp> 33cdf0e10cSrcweir 34cdf0e10cSrcweir #include "DragSource.hxx" 35cdf0e10cSrcweir 36cdf0e10cSrcweir // This class fires events to XDragSourceListener implementations. 37cdf0e10cSrcweir // Of that interface only dragDropEnd and dropActionChanged are called. 38cdf0e10cSrcweir // The functions dragEnter, dragExit and dragOver are not supported 39cdf0e10cSrcweir // currently. 40cdf0e10cSrcweir // An instance of SourceContext only lives as long as the drag and drop 41cdf0e10cSrcweir // operation lasts. 42cdf0e10cSrcweir class DragSourceContext: public cppu::BaseMutex, 43cdf0e10cSrcweir public cppu::WeakComponentImplHelper1<com::sun::star::datatransfer::dnd::XDragSourceContext>, 44cdf0e10cSrcweir private ::boost::noncopyable 45cdf0e10cSrcweir { 46cdf0e10cSrcweir public: 47cdf0e10cSrcweir DragSourceContext(DragSource* pSource); 48cdf0e10cSrcweir ~DragSourceContext(); 49cdf0e10cSrcweir 50cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getCurrentCursor( ) 51cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException); 52cdf0e10cSrcweir 53cdf0e10cSrcweir virtual void SAL_CALL setCursor( sal_Int32 cursorId ) 54cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException); 55cdf0e10cSrcweir 56cdf0e10cSrcweir virtual void SAL_CALL setImage( sal_Int32 imageId ) 57cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException); 58cdf0e10cSrcweir 59cdf0e10cSrcweir virtual void SAL_CALL transferablesFlavorsChanged( ) 60cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException); 61cdf0e10cSrcweir 62cdf0e10cSrcweir private: 63cdf0e10cSrcweir DragSource* m_pDragSource; 64cdf0e10cSrcweir }; 65cdf0e10cSrcweir 66cdf0e10cSrcweir 67cdf0e10cSrcweir 68cdf0e10cSrcweir #endif 69