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 #include "X11_dndcontext.hxx"
21 #include "X11_selection.hxx"
27 * DropTargetDropContext
30 DropTargetDropContext::DropTargetDropContext(
32 SelectionManager
& rManager
) :
33 m_aDropWindow( aDropWindow
),
34 m_xManager( &rManager
)
38 DropTargetDropContext::~DropTargetDropContext()
42 void DropTargetDropContext::acceptDrop( sal_Int8 dragOperation
)
44 m_xManager
->accept( dragOperation
, m_aDropWindow
);
47 void DropTargetDropContext::rejectDrop()
49 m_xManager
->reject( m_aDropWindow
);
52 void DropTargetDropContext::dropComplete( sal_Bool success
)
54 m_xManager
->dropComplete( success
, m_aDropWindow
);
58 * DropTargetDragContext
61 DropTargetDragContext::DropTargetDragContext(
63 SelectionManager
& rManager
) :
64 m_aDropWindow( aDropWindow
),
65 m_xManager( &rManager
)
69 DropTargetDragContext::~DropTargetDragContext()
73 void DropTargetDragContext::acceptDrag( sal_Int8 dragOperation
)
75 m_xManager
->accept( dragOperation
, m_aDropWindow
);
78 void DropTargetDragContext::rejectDrag()
80 m_xManager
->reject( m_aDropWindow
);
87 DragSourceContext::DragSourceContext(
89 SelectionManager
& rManager
) :
90 m_aDropWindow( aDropWindow
),
91 m_xManager( &rManager
)
95 DragSourceContext::~DragSourceContext()
99 sal_Int32
DragSourceContext::getCurrentCursor()
101 return m_xManager
->getCurrentCursor();
104 void DragSourceContext::setCursor( sal_Int32 cursorId
)
106 m_xManager
->setCursor( cursorId
, m_aDropWindow
);
109 void DragSourceContext::setImage( sal_Int32
)
113 void DragSourceContext::transferablesFlavorsChanged()
115 m_xManager
->transferablesFlavorsChanged();
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */