1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SD_SOURCE_UI_SLIDESORTER_CONTROLLER_SLSDRAGANDDROPCONTEXT_HXX
21 #define INCLUDED_SD_SOURCE_UI_SLIDESORTER_CONTROLLER_SLSDRAGANDDROPCONTEXT_HXX
23 #include <tools/gen.hxx>
25 #include "model/SlsSharedPageDescriptor.hxx"
26 #include "controller/SlsInsertionIndicatorHandler.hxx"
29 namespace sd
{ namespace slidesorter
{
33 namespace sd
{ namespace slidesorter
{ namespace controller
{
35 /** A DragAndDropContext object handles an active drag and drop operation.
36 When the mouse is moved from one slide sorter window to another the
37 target SlideSorter object is exchanged accordingly.
39 class DragAndDropContext
42 /** Create a substitution display of the currently selected pages or,
43 when provided, the pages in the transferable.
45 DragAndDropContext (SlideSorter
& rSlideSorter
);
46 ~DragAndDropContext();
48 /** Call this method (for example as reaction to ESC key press) to avoid
49 processing (ie moving or inserting) the substition when the called
50 DragAndDropContext object is destroyed.
54 /** Move the substitution display by the distance the mouse has
55 travelled since the last call to this method or to
56 CreateSubstitution(). The given point becomes the new anchor.
59 const Point
& rMousePosition
,
60 const InsertionIndicatorHandler::Mode eMode
,
61 const bool bAllowAutoScroll
= true);
63 void SetTargetSlideSorter (
64 SlideSorter
* pSlideSorter
= NULL
,
65 const Point
& rMousePosition
= Point(0,0),
66 const InsertionIndicatorHandler::Mode eMode
= InsertionIndicatorHandler::UnknownMode
,
67 const bool bIsOverSourceView
= false);
70 SlideSorter
* mpTargetSlideSorter
;
71 model::SharedPageDescriptor mpHitDescriptor
;
72 sal_Int32 mnInsertionIndex
;
75 } } } // end of namespace ::sd::slidesorter::controller
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */