LibreOffice Module sd (master) 1
|
A DragAndDropContext object handles an active drag and drop operation. More...
#include <SlsDragAndDropContext.hxx>
Public Member Functions | |
DragAndDropContext (SlideSorter &rSlideSorter) | |
Create a substitution display of the currently selected pages or, when provided, the pages in the transferable. More... | |
~DragAndDropContext () COVERITY_NOEXCEPT_FALSE | |
void | Dispose () |
Call this method (for example as reaction to ESC key press) to avoid processing (ie moving or inserting) the substitution when the called DragAndDropContext object is destroyed. More... | |
void | UpdatePosition (const Point &rMousePosition, const InsertionIndicatorHandler::Mode eMode, const bool bAllowAutoScroll) |
Move the substitution display by the distance the mouse has travelled since the last call to this method or to CreateSubstitution(). More... | |
void | SetTargetSlideSorter () |
Private Attributes | |
SlideSorter * | mpTargetSlideSorter |
sal_Int32 | mnInsertionIndex |
A DragAndDropContext object handles an active drag and drop operation.
When the mouse is moved from one slide sorter window to another the target SlideSorter object is exchanged accordingly.
Definition at line 37 of file SlsDragAndDropContext.hxx.
|
explicit |
Create a substitution display of the currently selected pages or, when provided, the pages in the transferable.
Definition at line 36 of file SlsDragAndDropContext.cxx.
References SdTransferable::AddUserData(), sd::slidesorter::controller::Clipboard::CreateTransferableUserData(), sd::slidesorter::SlideSorter::GetController(), sd::slidesorter::model::SlideSorterModel::GetEditMode(), sd::slidesorter::controller::TransferableData::GetFromTransferable(), sd::slidesorter::controller::SlideSorterController::GetInsertionIndicatorHandler(), sd::slidesorter::SlideSorter::GetModel(), Page, and SD_MOD.
sd::slidesorter::controller::DragAndDropContext::~DragAndDropContext | ( | ) |
Definition at line 59 of file SlsDragAndDropContext.cxx.
References SetTargetSlideSorter().
void sd::slidesorter::controller::DragAndDropContext::Dispose | ( | ) |
Call this method (for example as reaction to ESC key press) to avoid processing (ie moving or inserting) the substitution when the called DragAndDropContext object is destroyed.
Definition at line 64 of file SlsDragAndDropContext.cxx.
References mnInsertionIndex.
void sd::slidesorter::controller::DragAndDropContext::SetTargetSlideSorter | ( | ) |
Definition at line 103 of file SlsDragAndDropContext.cxx.
References sd::slidesorter::controller::Animator::AM_Animated, sd::slidesorter::SlideSorter::GetController(), sd::slidesorter::controller::SlideSorterController::GetInsertionIndicatorHandler(), sd::slidesorter::controller::SlideSorterController::GetScrollBarManager(), mpTargetSlideSorter, and sd::slidesorter::controller::ScrollBarManager::StopAutoScroll().
Referenced by ~DragAndDropContext().
void sd::slidesorter::controller::DragAndDropContext::UpdatePosition | ( | const Point & | rMousePosition, |
const InsertionIndicatorHandler::Mode | eMode, | ||
const bool | bAllowAutoScroll | ||
) |
Move the substitution display by the distance the mouse has travelled since the last call to this method or to CreateSubstitution().
The given point becomes the new anchor.
Definition at line 69 of file SlsDragAndDropContext.cxx.
References sd::slidesorter::controller::ScrollBarManager::AutoScroll(), eMode, VclPtr< class reference_type >::get(), sd::slidesorter::SlideSorter::GetContentWindow(), sd::slidesorter::SlideSorter::GetController(), sd::slidesorter::controller::SlideSorterController::GetInsertionIndicatorHandler(), sd::slidesorter::controller::SlideSorterController::GetScrollBarManager(), mnInsertionIndex, mpTargetSlideSorter, vcl::Window::PixelToLogic(), and UpdatePosition().
Referenced by UpdatePosition().
|
private |
Definition at line 63 of file SlsDragAndDropContext.hxx.
Referenced by Dispose(), and UpdatePosition().
|
private |
Definition at line 62 of file SlsDragAndDropContext.hxx.
Referenced by SetTargetSlideSorter(), and UpdatePosition().