LibreOffice Module sd (master) 1
fusel.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include "fudraw.hxx"
23
24namespace com::sun::star::media { class XPlayer; }
25
26class SdrHdl;
27class SdrObject;
28
29namespace sd {
30
31class FuSelection final
32 : public FuDraw
33{
34public:
35
36 static rtl::Reference<FuPoor> Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
37 virtual void DoExecute( SfxRequest& rReq ) override;
38
39 // Mouse- & Key-Events
40 virtual bool KeyInput(const KeyEvent& rKEvt) override;
41 virtual bool MouseMove(const MouseEvent& rMEvt) override;
42 virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
43 virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
44
45 virtual void Activate() override;
46
47 virtual void SelectionHasChanged() override;
48
49 void SetEditMode(sal_uInt16 nMode);
50 sal_uInt16 GetEditMode() const { return nEditMode; }
51
52 bool HandleImageMapClick(const SdrObject* pObj, const Point& rPos);
53
60 virtual bool cancel() override;
61
62 //let mouse cursor move
63 virtual void ForcePointer(const MouseEvent* pMEvt = nullptr) override;
64
65private:
66 FuSelection (ViewShell* pViewSh,
67 ::sd::Window* pWin,
68 ::sd::View* pView,
69 SdDrawDocument* pDoc,
70 SfxRequest& rReq);
71
72 virtual ~FuSelection() override;
73
79 sal_uInt16 nEditMode;
80
85
93 SdrObject* pickObject (const Point& rTestPoint);
94 //Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
95 //and SHIFT+ENTER key to decide the position and draw the new insert point
98 //let mouse cursor move
100};
101
102} // end of namespace sd
103
104/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class for all Draw specific functions.
Definition: fudraw.hxx:34
Point oldPoint
Definition: fusel.hxx:97
SdrObject * pWaterCanCandidate
This pointer stores a candidate for assigning a style in the water can mode between mouse button down...
Definition: fusel.hxx:84
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: fusel.cxx:641
sal_uInt16 GetEditMode() const
Definition: fusel.hxx:50
virtual bool MouseMove(const MouseEvent &rMEvt) override
Definition: fusel.cxx:603
virtual void DoExecute(SfxRequest &rReq) override
Definition: fusel.cxx:96
SdrHdl * pHdl
Definition: fusel.hxx:76
SdrObject * pickObject(const Point &rTestPoint)
Find the object under the given test point without selecting it.
Definition: fusel.cxx:1308
bool bSelectionChanged
Definition: fusel.hxx:75
bool bMovedToCenterPoint
Definition: fusel.hxx:99
virtual void SelectionHasChanged() override
Definition: fusel.cxx:1180
virtual ~FuSelection() override
Definition: fusel.cxx:104
virtual bool KeyInput(const KeyEvent &rKEvt) override
Process keyboard input.
Definition: fusel.cxx:946
virtual bool cancel() override
is called when the current function should be aborted.
Definition: fusel.cxx:1294
virtual void ForcePointer(const MouseEvent *pMEvt=nullptr) override
Toggle mouse-pointer.
Definition: fusel.cxx:1315
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: fusel.cxx:125
void SetEditMode(sal_uInt16 nMode)
Set current bezier edit mode.
Definition: fusel.cxx:1201
bool bBeginInsertPoint
Definition: fusel.hxx:96
FuSelection(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: fusel.cxx:67
bool HandleImageMapClick(const SdrObject *pObj, const Point &rPos)
Execute ImageMap interaction.
Definition: fusel.cxx:1224
bool bSuppressChangesOfSelection
Definition: fusel.hxx:77
bool bTempRotation
Definition: fusel.hxx:74
bool bMirrorSide0
Definition: fusel.hxx:78
virtual void Activate() override
activates the function
Definition: fusel.cxx:1049
sal_uInt16 nEditMode
Definition: fusel.hxx:79
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: fusel.cxx:89
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45