44#include <osl/diagnose.h>
59const sal_uInt32 SINGLE_CLICK (0x00000001);
60const sal_uInt32 DOUBLE_CLICK (0x00000002);
61const sal_uInt32 LEFT_BUTTON (0x00000010);
62const sal_uInt32 RIGHT_BUTTON (0x00000020);
63const sal_uInt32 MIDDLE_BUTTON (0x00000040);
64const sal_uInt32 BUTTON_DOWN (0x00000100);
65const sal_uInt32 BUTTON_UP (0x00000200);
66const sal_uInt32 MOUSE_MOTION (0x00000400);
67const sal_uInt32 MOUSE_DRAG (0x00000800);
70const sal_uInt32 OVER_SELECTED_PAGE (0x00010000);
71const sal_uInt32 OVER_UNSELECTED_PAGE (0x00020000);
72const sal_uInt32 SHIFT_MODIFIER (0x00200000);
73const sal_uInt32 CONTROL_MODIFIER (0x00400000);
76const sal_uInt32 NO_MODIFIER (0x00000000);
77const sal_uInt32 NOT_OVER_PAGE (0x00000000);
80const sal_uInt32 MODIFIER_MASK (SHIFT_MODIFIER | CONTROL_MODIFIER);
85#define ANY_MODIFIER(code) \
87 case code|SHIFT_MODIFIER: \
88 case code|CONTROL_MODIFIER
106 sal_uInt32 nEventType,
110 sal_uInt32 nEventType,
136 const bool bIsMouseOverIndicatorAllowed);
158 const Point& rMousePosition);
191 virtual void Abort()
override;
193 void ResetButtonDownLocation();
218 MultiSelectionModeHandler (
219 SlideSorter& rSlideSorter,
220 SelectionFunction& rSelectionFunction,
221 const Point& rMouseModelPosition,
222 const sal_uInt32 nEventCode);
224 virtual ~MultiSelectionModeHandler()
override;
227 virtual void Abort()
override;
228 virtual void ProcessEvent (SelectionFunction::EventDescriptor& rDescriptor)
override;
233 void SetSelectionModeFromModifier (
const sal_uInt32 nEventCode);
236 virtual bool ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor)
override;
237 virtual bool ProcessMotionEvent (SelectionFunction::EventDescriptor& rDescriptor)
override;
238 virtual bool HandleUnprocessedEvent (SelectionFunction::EventDescriptor& rDescriptor)
override;
248 void UpdateModelPosition (
const Point& rMouseModelPosition);
249 void UpdateSelection();
254 void UpdatePosition (
255 const Point& rMousePosition,
256 const bool bAllowAutoScroll);
258 void UpdateSelectionState (
260 const bool bIsInSelection)
const;
268 DragAndDropModeHandler (
269 SlideSorter& rSlideSorter,
270 SelectionFunction& rSelectionFunction,
271 const Point& rMousePosition,
273 virtual ~DragAndDropModeHandler()
override;
276 virtual void Abort()
override;
279 virtual bool ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor)
override;
280 virtual bool ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor)
override;
295 rSlideSorter.GetViewShell(),
296 rSlideSorter.GetContentWindow(),
297 &rSlideSorter.GetView(),
298 rSlideSorter.GetModel().GetDocument(),
302 mnShiftKeySelectionAnchor(-1),
303 mpModeHandler(
std::
make_shared<NormalModeHandler>(rSlideSorter, *this))
359 bool bResult =
false;
368 if (rFocusManager.
HasFocus() && pDescriptor && pViewShell!=
nullptr)
382 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
409 if (pDescriptor && rCode.
IsMod1())
496 const bool bIsShiftDown,
497 const bool bIsControlDown)
509 else if ( ! bIsControlDown)
521 if (pFocusedDescriptor)
523 sal_Int32 nPageRangeEnd (pFocusedDescriptor->GetPageIndex());
532 const sal_Int32 nPageIndex(pDescriptor->GetPageIndex());
534 || (nPageIndex<=mnShiftKeySelectionAnchor && nPageIndex>=nPageRangeEnd))
546 else if (bIsControlDown)
585 SdPage* pPage = pDescriptor->GetPage();
586 OSL_ASSERT(pPage!=
nullptr);
605 if (pNextPageDescriptor)
609 OSL_ASSERT(pNextPageDescriptor);
637 pModeHandler->ProcessEvent(rDescriptor);
641 const sal_uInt32 nEventCode,
642 const sal_uInt32 nPositivePattern)
644 return (nEventCode & nPositivePattern)==nPositivePattern;
662 const Point& rMousePosition,
663 const sal_uInt32 nEventCode)
672 if (
mpModeHandler->IsMouseOverIndicatorAllowed() != rpHandler->IsMouseOverIndicatorAllowed())
674 if ( ! rpHandler->IsMouseOverIndicatorAllowed())
694 std::shared_ptr<NormalModeHandler> pHandler (
695 std::dynamic_pointer_cast<NormalModeHandler>(
mpModeHandler));
697 pHandler->ResetButtonDownLocation();
704 const sal_uInt32 nEventType,
707 : maMousePosition(rEvent.GetPosPixel()),
709 mnEventCode(nEventType),
732 const sal_uInt32 nEventType,
736 : maMousePosition(rEvent.maPosPixel),
738 mnEventCode(nEventType),
763 sal_uInt32 nEventCode (mnEventCode & (BUTTON_DOWN | BUTTON_UP | MOUSE_MOTION));
768 case MOUSE_LEFT: nEventCode |= LEFT_BUTTON;
break;
769 case MOUSE_RIGHT: nEventCode |= RIGHT_BUTTON;
break;
776 case 1: nEventCode |= SINGLE_CLICK;
break;
777 case 2: nEventCode |= DOUBLE_CLICK;
break;
782 nEventCode |= SHIFT_MODIFIER;
784 nEventCode |= CONTROL_MODIFIER;
791 sal_uInt32 nEventCode (0);
794 if (mpHitPage!=
nullptr && mpHitDescriptor)
797 nEventCode |= OVER_SELECTED_PAGE;
799 nEventCode |= OVER_UNSELECTED_PAGE;
810 const bool bIsMouseOverIndicatorAllowed)
812 mrSelectionFunction(rSelectionFunction),
813 mbIsMouseOverIndicatorAllowed(bIsMouseOverIndicatorAllowed)
823 mrSelectionFunction.ProcessEvent(rDescriptor);
832 bool bIsProcessed (
false);
833 switch (rDescriptor.
mnEventCode & (BUTTON_DOWN | BUTTON_UP | MOUSE_MOTION | MOUSE_DRAG))
836 bIsProcessed = ProcessButtonDownEvent(rDescriptor);
840 bIsProcessed = ProcessButtonUpEvent(rDescriptor);
844 bIsProcessed = ProcessMotionEvent(rDescriptor);
848 bIsProcessed = ProcessDragEvent(rDescriptor);
853 HandleUnprocessedEvent(rDescriptor);
863 mrSelectionFunction.SwitchToNormalMode();
869 if (mbIsMouseOverIndicatorAllowed)
874 mrSelectionFunction.SwitchToNormalMode();
896 SelectOnePage(rpDescriptor);
903 mrSelectionFunction.ResetShiftKeySelectionAnchor();
921 if (rpDescriptor && rpDescriptor->GetPage()!=
nullptr)
925 (rpDescriptor->GetPage()->GetPageNum()-1)/2);
934 const Point& rMousePosition)
941 if (
SD_MOD()->pTransferDrag !=
nullptr)
944 mrSelectionFunction.SwitchToDragAndDropMode(rMousePosition);
949NormalModeHandler::NormalModeHandler (
952 :
ModeHandler(rSlideSorter, rSelectionFunction, true)
961void NormalModeHandler::Abort()
965bool NormalModeHandler::ProcessButtonDownEvent (
966 SelectionFunction::EventDescriptor& rDescriptor)
972 if ((rDescriptor.mnEventCode & BUTTON_DOWN) != 0)
975 switch (rDescriptor.mnEventCode)
977 case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE:
978 SetCurrentPage(rDescriptor.mpHitDescriptor);
981 case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
984 case BUTTON_DOWN | LEFT_BUTTON | DOUBLE_CLICK | OVER_SELECTED_PAGE:
985 case BUTTON_DOWN | LEFT_BUTTON | DOUBLE_CLICK | OVER_UNSELECTED_PAGE:
988 SetCurrentPage(rDescriptor.mpHitDescriptor);
989 SwitchView(rDescriptor.mpHitDescriptor);
992 case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | SHIFT_MODIFIER:
993 case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | SHIFT_MODIFIER:
995 RangeSelect(rDescriptor.mpHitDescriptor);
999 case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE:
1005 SetCurrentPage(rDescriptor.mpHitDescriptor);
1008 case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
1012 case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE:
1019 case ANY_MODIFIER(BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE):
1026 case BUTTON_DOWN | LEFT_BUTTON | DOUBLE_CLICK | NOT_OVER_PAGE:
1031 std::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler
1034 pInsertionIndicatorHandler->Start(
false);
1035 pInsertionIndicatorHandler->UpdatePosition(
1036 rDescriptor.maMousePosition,
1040 pInsertionIndicatorHandler->GetInsertionPageIndex());
1044 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
1057bool NormalModeHandler::ProcessButtonUpEvent (
1058 SelectionFunction::EventDescriptor& rDescriptor)
1060 bool bIsProcessed (
true);
1061 switch (rDescriptor.mnEventCode)
1063 case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
1064 SetCurrentPage(rDescriptor.mpHitDescriptor);
1068 case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | CONTROL_MODIFIER:
1070 rDescriptor.mpHitDescriptor);
1073 case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | CONTROL_MODIFIER:
1075 rDescriptor.mpHitDescriptor);
1078 case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE:
1082 bIsProcessed =
false;
1085 mrSelectionFunction.SwitchToNormalMode();
1086 return bIsProcessed;
1089bool NormalModeHandler::ProcessMotionEvent (
1090 SelectionFunction::EventDescriptor& rDescriptor)
1095 bool bIsProcessed (
true);
1096 switch (rDescriptor.mnEventCode)
1099 case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE):
1100 case
ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE):
1104 const sal_Int32 nDistance(std::max(
1114 case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE):
1116 rDescriptor.maMouseModelPosition,
1117 rDescriptor.mnEventCode);
1121 bIsProcessed =
false;
1124 return bIsProcessed;
1127bool NormalModeHandler::ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor)
1129 mrSelectionFunction.SwitchToDragAndDropMode(rDescriptor.maMousePosition);
1130 ReprocessEvent(rDescriptor);
1147 const sal_uInt16 nAnchorIndex ((pAnchor->GetPage()->GetPageNum()-1) / 2);
1148 const sal_uInt16 nOtherIndex ((rpDescriptor->GetPage()->GetPageNum()-1) / 2);
1154 const sal_uInt16 nStep ((nAnchorIndex < nOtherIndex) ? +1 : -1);
1155 sal_uInt16
nIndex (nAnchorIndex);
1158 rSelector.SelectPage(nIndex);
1159 if (nIndex == nOtherIndex)
1165void NormalModeHandler::ResetButtonDownLocation()
1172MultiSelectionModeHandler::MultiSelectionModeHandler (
1173 SlideSorter& rSlideSorter,
1175 const Point& rMouseModelPosition,
1176 const sal_uInt32 nEventCode)
1177 :
ModeHandler(rSlideSorter, rSelectionFunction, false),
1187 SetSelectionModeFromModifier(nEventCode);
1190MultiSelectionModeHandler::~MultiSelectionModeHandler()
1206void MultiSelectionModeHandler::Abort()
1211void MultiSelectionModeHandler::ProcessEvent (
1212 SelectionFunction::EventDescriptor& rDescriptor)
1219 VisibleAreaManager::TemporaryDisabler aDisabler (
mrSlideSorter);
1224bool MultiSelectionModeHandler::ProcessButtonUpEvent (
1225 SelectionFunction::EventDescriptor& rDescriptor)
1235 if (
Match(rDescriptor.mnEventCode, BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK))
1237 mrSelectionFunction.SwitchToNormalMode();
1244bool MultiSelectionModeHandler::ProcessMotionEvent (
1245 SelectionFunction::EventDescriptor& rDescriptor)
1248 if (
Match(rDescriptor.mnEventCode, MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK))
1250 SetSelectionModeFromModifier(rDescriptor.mnEventCode);
1251 UpdatePosition(rDescriptor.maMousePosition,
true);
1258bool MultiSelectionModeHandler::HandleUnprocessedEvent (
1259 SelectionFunction::EventDescriptor& rDescriptor)
1264 mrSelectionFunction.SwitchToNormalMode();
1265 ReprocessEvent(rDescriptor);
1270void MultiSelectionModeHandler::UpdatePosition (
1271 const Point& rMousePosition,
1272 const bool bAllowAutoScroll)
1274 VisibleAreaManager::TemporaryDisabler aDisabler (
mrSlideSorter);
1280 const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition));
1284 [
this, &rMousePosition] () {
return this->UpdatePosition(rMousePosition,
false); });
1287 UpdateModelPosition(aMouseModelPosition);
1292void MultiSelectionModeHandler::SetSelectionModeFromModifier (
1293 const sal_uInt32 nEventCode)
1295 switch (nEventCode & MODIFIER_MASK)
1298 SetSelectionMode(SM_Normal);
1301 case SHIFT_MODIFIER:
1302 SetSelectionMode(SM_Add);
1305 case CONTROL_MODIFIER:
1306 SetSelectionMode(SM_Toggle);
1311void MultiSelectionModeHandler::SetSelectionMode (
const SelectionMode eSelectionMode)
1320void MultiSelectionModeHandler::UpdateSelectionState (
1322 const bool bIsInSelection)
const
1329 bool bSelect (
false);
1333 bSelect = bIsInSelection;
1337 bSelect = bIsInSelection || bWasSelected;
1342 bSelect = !bWasSelected;
1344 bSelect = bWasSelected;
1355void MultiSelectionModeHandler::UpdateModelPosition (
const Point& rMouseModelPosition)
1361void MultiSelectionModeHandler::UpdateSelection()
1366 const sal_Int32 nPageCount (rModel.GetPageCount());
1368 const sal_Int32 nIndexUnderMouse (
1373 if (nIndexUnderMouse < 0 || nIndexUnderMouse >= nPageCount)
1385 UpdateSelectionState(rModel.GetPageDescriptor(nIndex), aRange.Contains(nIndex));
1391DragAndDropModeHandler::DragAndDropModeHandler (
1392 SlideSorter& rSlideSorter,
1394 const Point& rMousePosition,
1396 :
ModeHandler(rSlideSorter, rSelectionFunction, false)
1401 SlideSorterViewShell* pSlideSorterViewShell
1403 if (pSlideSorterViewShell !=
nullptr)
1404 pSlideSorterViewShell->StartDrag(rMousePosition, pWindow);
1405 pDragTransferable =
SD_MOD()->pTransferDrag;
1410 pDragTransferable !=
nullptr
1414DragAndDropModeHandler::~DragAndDropModeHandler()
1430void DragAndDropModeHandler::Abort()
1438bool DragAndDropModeHandler::ProcessButtonUpEvent (
1439 SelectionFunction::EventDescriptor& rDescriptor)
1441 if (
Match(rDescriptor.mnEventCode, BUTTON_UP | LEFT_BUTTON))
1445 rDescriptor.mpHitDescriptor.reset();
1446 mrSelectionFunction.SwitchToNormalMode();
1453bool DragAndDropModeHandler::ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor)
1457 if (rDescriptor.mbIsLeaving)
1459 mrSelectionFunction.SwitchToNormalMode();
1464 rDescriptor.maMousePosition,
1465 rDescriptor.meDragMode,
true);
SlideSorterController & mrController
PointerStyle maSavedPointer
#define ANY_MODIFIER(code)
bool mbAutoScrollInstalled
std::unique_ptr< DragAndDropContext, o3tl::default_delete< DragAndDropContext > > mpDragAndDropContext
SelectionMode meSelectionMode
::std::optional< Point > maButtonDownLocation
SlideSorter & mrSlideSorter
const vcl::KeyCode & GetKeyCode() const
bool IsLeaveWindow() const
sal_uInt16 GetClicks() const
sal_uInt16 GetButtons() const
const Point & GetPosPixel() const
SAL_DLLPRIVATE void SetSelected(SdPage *pPage, bool bSelect)
const ::sd::View * GetView() const
sal_uInt16 GetPageNum() const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
SfxDispatcher * GetDispatcher() const
reference_type * get() const
void SetSelectedPage(sal_uInt16 nPage)
Base class for all functions.
virtual bool KeyInput(const KeyEvent &rKEvt)
handle keyboard events
VclPtr< ::sd::Window > mpWindow
Point aMDPos
position of MouseButtonDown
void SetMouseButtonCode(sal_uInt16 nNew)
Base class of the stacked shell hierarchy.
bool IsMainViewShell() const
Return <TRUE> when the called view shell is the main sub shell of its ViewShellBase object,...
FrameView * GetFrameView()
An SdWindow contains the actual working area of ViewShell.
static const OUString msCenterPaneURL
static ::std::shared_ptr< FrameworkHelper > Instance(ViewShellBase &rBase)
Return the FrameworkHelper object that is associated with the given ViewShellBase.
static const OUString msImpressViewURL
Show previews for all the slides in a document and allow the user to insert or delete slides and modi...
SD_DLLPUBLIC controller::SlideSorterController & GetController() const
ViewShell * GetViewShell() const
Return the view shell that was given at construction.
ViewShellBase * GetViewShellBase() const
Return the ViewShellBase object.
const VclPtr< sd::Window > & GetContentWindow() const
Return the content window.
model::SlideSorterModel & GetModel() const
view::SlideSorterView & GetView() const
SD_DLLPUBLIC void DoPaste()
SD_DLLPUBLIC void DoCopy()
This class manages the focus of the slide sorter.
void MoveFocus(FocusMoveDirection eDirection)
Move the focus from the currently focused page to one that is displayed adjacent to it,...
bool ToggleFocus()
Toggle the focused state of the current slide.
model::SharedPageDescriptor GetFocusedPageDescriptor() const
Return the descriptor of the page that currently has the focus.
bool SetFocusedPage(const model::SharedPageDescriptor &rDescriptor)
Set the focused page to the one described by the given page descriptor.
void ShowFocus(const bool bScrollToFocus=true)
Show the focus indicator of the current slide.
bool IsFocusShowing() const
Return <TRUE> when the focus indicator is currently shown.
bool HasFocus() const
Return whether the window managed by the called focus manager has the input focus of the application.
Manage the visibility and location of the insertion indicator.
Use the UpdateLock whenever you do a complex selection, i.e.
A sub-controller that handles page selection of the slide browser.
void DeselectPage(int nPageIndex)
Deselect the descriptor that is associated with the given page.
SD_DLLPUBLIC void DeselectAllPages()
void SelectPage(int nPageIndex)
Select the specified descriptor.
model::SharedPageDescriptor mpHitDescriptor
EventDescriptor(sal_uInt32 nEventType, const MouseEvent &rEvent, SlideSorter const &rSlideSorter)
InsertionIndicatorHandler::Mode meDragMode
sal_uInt32 EncodeMouseEvent(const MouseEvent &rEvent) const
Compute a numerical code that describes a mouse event and that can be used for fast look up of the ap...
sal_uInt32 EncodeState() const
Compute a numerical code that describes the current state like whether the selection rectangle is vis...
Point maMouseModelPosition
const bool mbIsMouseOverIndicatorAllowed
void SetCurrentPage(const model::SharedPageDescriptor &rpDescriptor)
Set the selection to exactly the specified page and also set it as the current page.
virtual bool ProcessMotionEvent(EventDescriptor &rDescriptor)
ModeHandler(SlideSorter &rSlideSorter, SelectionFunction &rSelectionFunction, const bool bIsMouseOverIndicatorAllowed)
void SwitchView(const model::SharedPageDescriptor &rpDescriptor)
When the view on which this selection function is working is the main view then the view is switched ...
virtual ~ModeHandler() COVERITY_NOEXCEPT_FALSE
SelectionFunction & mrSelectionFunction
virtual void ProcessEvent(EventDescriptor &rDescriptor)
void ReprocessEvent(EventDescriptor &rDescriptor)
virtual bool ProcessButtonUpEvent(EventDescriptor &rDescriptor)
SlideSorter & mrSlideSorter
void StartDrag(const Point &rMousePosition)
virtual Mode GetMode() const =0
virtual bool HandleUnprocessedEvent(EventDescriptor &rDescriptor)
virtual bool ProcessDragEvent(EventDescriptor &rDescriptor)
void DeselectAllPages()
Deselect all pages.
virtual bool ProcessButtonDownEvent(EventDescriptor &rDescriptor)
void SelectOnePage(const model::SharedPageDescriptor &rpDescriptor)
bool IsMouseOverIndicatorAllowed() const
SlideSorter & mrSlideSorter
void MoveFocus(const FocusManager::FocusMoveDirection eDirection, const bool bIsShiftDown, const bool bIsControlDown)
void ResetShiftKeySelectionAnchor()
SlideSorterController & mrController
void GotoPage(int nIndex)
Make the slide with the given index the new current slide.
void SwitchToDragAndDropMode(const Point &rMousePosition)
std::shared_ptr< ModeHandler > mpModeHandler
The selection function can be in one of several mutually exclusive modes.
virtual void DoCopy() override
Forward to the clipboard manager.
sal_Int32 mnShiftKeySelectionAnchor
Remember the slide where the shift key was pressed and started a multiselection via keyboard.
void NotifyDragFinished()
Turn of substitution display and insertion indicator.
virtual void DoPaste() override
Forward to the clipboard manager.
void MouseDragged(const AcceptDropEvent &rEvent, const sal_Int8 nDragAction)
void ResetMouseAnchor()
Special case handling for when the context menu is hidden.
void GotoNextPage(int nOffset)
Make the slide nOffset slides away of the current one the new current slide.
virtual void DoCut() override
Forward to the clipboard manager.
void SwitchToMultiSelectionMode(const Point &rMousePosition, const sal_uInt32 nEventCode)
SelectionFunction(const SelectionFunction &)=delete
void SwitchToNormalMode()
virtual bool KeyInput(const KeyEvent &rKEvt) override
handle keyboard events
void ProcessEvent(EventDescriptor &rEvent)
virtual ~SelectionFunction() override
static rtl::Reference< FuPoor > Create(SlideSorter &rSlideSorter, SfxRequest &rRequest)
void SwitchMode(const std::shared_ptr< ModeHandler > &rpHandler)
virtual bool MouseMove(const MouseEvent &rMEvt) override
virtual bool cancel() override
is called when the current function should be aborted.
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
void ProcessMouseEvent(sal_uInt32 nEventType, const MouseEvent &rEvent)
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
FocusManager & GetFocusManager()
model::SharedPageDescriptor GetPageAt(const Point &rPixelPosition)
Return the descriptor of the page that is rendered under the given position.
std::shared_ptr< CurrentSlideManager > const & GetCurrentSlideManager() const
std::shared_ptr< SelectionManager > const & GetSelectionManager() const
SD_DLLPUBLIC PageSelector & GetPageSelector()
ScrollBarManager & GetScrollBarManager()
Return the object that manages the scroll bars.
std::shared_ptr< InsertionIndicatorHandler > const & GetInsertionIndicatorHandler() const
SD_DLLPUBLIC controller::Clipboard & GetClipboard()
static PageEnumeration CreateAllPagesEnumeration(const SlideSorterModel &rModel)
The returned enumeration of slides iterates over all slides of the given model.
Public class of page enumerations that delegates its calls to an implementation object that can filte...
virtual SharedPageDescriptor GetNextElement() override
Return the next element of the enumeration.
virtual bool HasMoreElements() const override
Return <TRUE> when the enumeration has more elements, i.e.
SdDrawDocument * GetDocument()
This method is present to let the view create a ShowView for displaying slides.
sal_Int32 GetPageCount() const
Return the number of slides in the document regardless of whether they are visible or not or whether ...
SharedPageDescriptor GetPageDescriptor(const sal_Int32 nPageIndex, const bool bCreate=true) const
Return a page descriptor for the page with the specified index.
void SaveCurrentSelection()
The current selection is saved by copying the ST_Selected state into ST_WasSelected for slides.
vcl::Region RestoreSelection()
The current selection is restored from the ST_WasSelected state from the slides.
sal_Int32 GetIndexAtPoint(const Point &rModelPosition, const bool bIncludePageBorders, const bool bClampToValidRange=true) const
Return the index of the page object that is rendered at the given point.
view::Layouter & GetLayouter()
void SetPageUnderMouse(const model::SharedPageDescriptor &rpDescriptor)
void UpdatePageUnderMouse()
The page under the mouse is not highlighted in some contexts.
sal_uInt16 GetCode() const
virtual std::shared_ptr< SfxDialogController > GetController() override
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_ESCAPE
constexpr sal_uInt16 KEY_HOME
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_F10
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DELETE
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SPACE
constexpr sal_uInt16 KEY_PAGEUP
constexpr sal_uInt16 KEY_BACKSPACE
constexpr sal_uInt16 KEY_END
std::shared_ptr< T > make_shared(Args &&... args)
static bool Match(const sal_uInt32 nEventCode, const sal_uInt32 nPositivePattern)
std::shared_ptr< PageDescriptor > SharedPageDescriptor