LibreOffice Module sd (master) 1
|
Base class for all Draw specific functions. More...
#include <fudraw.hxx>
Public Member Functions | |
virtual bool | KeyInput (const KeyEvent &rKEvt) override |
Process keyboard input. More... | |
virtual bool | MouseMove (const MouseEvent &rMEvt) override |
virtual bool | MouseButtonUp (const MouseEvent &rMEvt) override |
virtual bool | MouseButtonDown (const MouseEvent &rMEvt) override |
virtual bool | RequestHelp (const HelpEvent &rHEvt) override |
virtual void | Activate () override |
activates the function More... | |
virtual void | ForcePointer (const MouseEvent *pMEvt=nullptr) |
Toggle mouse-pointer. More... | |
virtual void | DoubleClick (const MouseEvent &rMEvt) |
Response of doubleclick. More... | |
bool | SetPointer (const SdrObject *pObj, const Point &rPos) |
Set cursor to pointer when in clickable area of an ImageMap. More... | |
bool | SetHelpText (const SdrObject *pObj, const Point &rPos, const SdrViewEvent &rVEvt) |
void | SetPermanent (bool bSet) |
virtual bool | cancel () override |
is called when the current function should be aborted. More... | |
Public Member Functions inherited from sd::FuPoor | |
virtual void | DoExecute (SfxRequest &rReq) |
void | SetMouseButtonCode (sal_uInt16 nNew) |
sal_uInt16 | GetMouseButtonCode () const |
DrawDocShell * | GetDocSh () |
virtual void | DoCut () |
Cut object to clipboard. More... | |
virtual void | DoCopy () |
Copy object to clipboard. More... | |
virtual void | DoPaste () |
Paste object from clipboard. More... | |
virtual void | DoPasteUnformatted () |
Paste unformatted text from clipboard. More... | |
virtual bool | KeyInput (const KeyEvent &rKEvt) |
handle keyboard events More... | |
virtual bool | MouseMove (const MouseEvent &) |
virtual bool | MouseButtonUp (const MouseEvent &rMEvt) |
virtual bool | MouseButtonDown (const MouseEvent &rMEvt) |
virtual bool | Command (const CommandEvent &rCEvt) |
virtual bool | RequestHelp (const HelpEvent &rHEvt) |
virtual void | ReceiveRequest (SfxRequest &rReq) |
virtual void | Activate () |
activates the function More... | |
virtual void | Deactivate () |
deactivates the function More... | |
void | SetWindow (::sd::Window *pWin) |
virtual void | SelectionHasChanged () |
sal_uInt16 | GetSlotID () const |
void | StartDelayToScrollTimer () |
virtual rtl::Reference< SdrObject > | CreateDefaultObject (const sal_uInt16 nID, const ::tools::Rectangle &rRectangle) |
virtual bool | cancel () |
is called when the current function should be aborted. More... | |
virtual bool | doConstructOrthogonal () const |
Decide if the object to be created should be created orthogonal. More... | |
Public Member Functions inherited from sd::SimpleReferenceComponent | |
SimpleReferenceComponent () | |
void | acquire () |
@ATTENTION The results are undefined if, for any individual instance of SimpleReferenceComponent, the total number of calls to acquire() exceeds the total number of calls to release() by a platform dependent amount (which, hopefully, is quite large). More... | |
void | release () |
void | Dispose () |
bool | isDisposed () const |
Protected Member Functions | |
FuDraw (ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq) | |
Base-class for all drawmodul-specific functions. More... | |
virtual | ~FuDraw () override |
Protected Member Functions inherited from sd::FuPoor | |
FuPoor (ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq) | |
virtual | ~FuPoor () override |
DECL_LINK (DelayHdl, Timer *, void) | |
void | SwitchLayer (sal_Int32 nOffset) |
Switch to another layer. More... | |
DECL_LINK (ScrollHdl, Timer *, void) | |
void | ForceScroll (const Point &aPixPos) |
scroll when approached the border of the window; is called by MouseMove More... | |
DECL_LINK (DragHdl, Timer *, void) | |
Protected Member Functions inherited from sd::SimpleReferenceComponent | |
virtual void | disposing () |
virtual | ~SimpleReferenceComponent () |
Protected Attributes | |
PointerStyle | aNewPointer |
PointerStyle | aOldPointer |
bool | bMBDown |
bool | bDragHelpLine |
sal_uInt16 | nHelpLine |
bool | bPermanent |
Protected Attributes inherited from sd::FuPoor | |
::sd::View * | mpView |
ViewShell * | mpViewShell |
VclPtr< ::sd::Window > | mpWindow |
DrawDocShell * | mpDocSh |
SdDrawDocument * | mpDoc |
sal_uInt16 | nSlotId |
Timer | aScrollTimer |
for auto-scrolling More... | |
Timer | aDragTimer |
for Drag&Drop More... | |
bool | bIsInDragMode |
Point | aMDPos |
position of MouseButtonDown More... | |
bool | bNoScrollUntilInside |
Flag to prevent auto-scrolling until one drags from outside into the window. More... | |
Timer | aDelayToScrollTimer |
timer to delay scrolling (~ 1 sec) when dragging out of the window More... | |
bool | bScrollable |
bool | bDelayActive |
bool | bFirstMouseMove |
Private Member Functions | |
void | DoModifiers (const MouseEvent &rMEvt, bool bSnapModPressed) |
Code shared by MouseButtonDown and MouseMove. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from sd::FuPoor | |
static const int | HITPIX = 2 |
static const int | HITLOG = 53 |
static const int | DRGLOG = 53 |
Static Protected Member Functions inherited from sd::FuPoor | |
static void | ImpForceQuadratic (::tools::Rectangle &rRect) |
Base class for all Draw specific functions.
Definition at line 32 of file fudraw.hxx.
|
protected |
Base-class for all drawmodul-specific functions.
Definition at line 65 of file fudraw.cxx.
References Arrow.
|
overrideprotectedvirtual |
Definition at line 77 of file fudraw.cxx.
References SdrCreateView::BrkAction(), and sd::FuPoor::mpView.
|
overridevirtual |
activates the function
Reimplemented from sd::FuPoor.
Reimplemented in sd::FuConstruct3dObject, sd::FuConstructArc, sd::FuConstructBezierPolygon, sd::FuConstructCustomShape, sd::FuConstructRectangle, sd::FuConstruct, sd::FuConstructUnoControl, sd::FuEditGluePoints, sd::FuFormatPaintBrush, sd::FuSelection, and sd::FuText.
Definition at line 441 of file fudraw.cxx.
References sd::FuPoor::Activate(), and ForcePointer().
Referenced by sd::FuConstruct::Activate(), sd::FuEditGluePoints::Activate(), and sd::FuSelection::Activate().
|
overridevirtual |
is called when the current function should be aborted.
This is used when a function gets a KEY_ESCAPE but can also be called directly.
Reimplemented from sd::FuPoor.
Reimplemented in sd::FuSelection, and sd::FuText.
Definition at line 773 of file fudraw.cxx.
References SdrMarkView::AreObjectsMarked(), SdrCreateView::BrkAction(), SfxDispatcher::Execute(), SfxViewFrame::GetBindings(), SfxViewFrame::GetDispatcher(), SdrHdlList::GetFocusHdl(), SdrMarkView::GetHdlList(), sd::ViewShell::GetViewFrame(), SfxBindings::Invalidate(), SdrCreateView::IsAction(), SdrObjEditView::IsTextEdit(), sd::FuPoor::mpView, sd::FuPoor::mpViewShell, sd::View::SdrEndTextEdit(), and SdrView::UnmarkAll().
Referenced by KeyInput().
|
private |
Code shared by MouseButtonDown and MouseMove.
Definition at line 86 of file fudraw.cxx.
References sd::ViewShell::GetFrameView(), SdrSnapView::IsAngleSnapEnabled(), SdrSnapView::IsBordSnap(), SdrCreateView::IsCreate1stPointAsCenter(), SdrSnapView::IsGridSnap(), SdrSnapView::IsHlplSnap(), MouseEvent::IsMod2(), SdrSnapView::IsOConSnap(), SdrSnapView::IsOFrmSnap(), SdrSnapView::IsOPntSnap(), SdrDragView::IsResizeAtCenter(), MouseEvent::IsShift(), sd::FuPoor::mpView, sd::FuPoor::mpViewShell, SdrSnapView::SetAngleSnapEnabled(), SdrSnapView::SetBordSnap(), SdrCreateView::SetCreate1stPointAsCenter(), SdrSnapView::SetGridSnap(), SdrSnapView::SetHlplSnap(), SdrSnapView::SetOConSnap(), SdrSnapView::SetOFrmSnap(), SdrSnapView::SetOPntSnap(), and SdrDragView::SetResizeAtCenter().
Referenced by MouseButtonDown(), and MouseMove().
|
virtual |
Response of doubleclick.
Reimplemented in sd::FuText.
Definition at line 627 of file fudraw.cxx.
References sd::FuPoor::aMDPos, SdrMarkView::AreObjectsMarked(), DynCastSdrTextObj(), SfxDispatcher::Execute(), SfxDispatcher::ExecuteList(), GetDispatcher(), SfxViewFrame::GetDispatcher(), sd::ViewShell::GetFrameView(), SdrMarkList::GetMark(), SdrMarkList::GetMarkCount(), SdrMarkView::GetMarkedObjectList(), SdrMark::GetMarkedSdrObj(), SdrObject::GetObjIdentifier(), SdrObject::GetObjInventor(), sd::ViewShell::GetViewFrame(), sd::FuPoor::HITPIX, sd::FrameView::IsDoubleClickTextEdit(), SdrObject::IsEmptyPresObj(), SfxObjectShell::IsReadOnly(), MouseEvent::IsShift(), SdrMarkView::MarkObj(), sd::FuPoor::mpDocSh, sd::FuPoor::mpView, sd::FuPoor::mpViewShell, sd::FuPoor::mpWindow, SD_MOD, SdrMarkView::UnMarkAll(), and Width.
Referenced by sd::FuConstruct::MouseButtonUp(), and sd::FuSelection::MouseButtonUp().
|
virtual |
Toggle mouse-pointer.
Reimplemented in sd::FuEditGluePoints, and sd::FuSelection.
Definition at line 450 of file fudraw.cxx.
References DynCastE3dObject(), DynCastE3dScene(), SfxViewFrame::GetChildWindow(), SdrMarkView::GetDragMode(), SdrPaintView::getHitTolLog(), SdrMarkList::GetMark(), SdrMarkList::GetMarkCount(), SdrMarkView::GetMarkedObjectList(), SdrMark::GetMarkedSdrObj(), MouseEvent::GetModifier(), SdrObject::GetObjIdentifier(), MouseEvent::GetPosPixel(), SdrView::GetPreferredPointer(), sd::ViewShell::GetViewFrame(), SfxChildWindow::GetWindow(), SfxViewFrame::HasChildWindow(), SdrCreateView::IsAction(), SdrDragView::IsDragObj(), SdrObject::IsEmptyPresObj(), SvxBmpMask::IsEyedropping(), MouseEvent::IsLeft(), MouseEvent::IsMod2(), SdrViewEvent::mpObj, sd::FuPoor::mpView, sd::FuPoor::mpViewShell, sd::FuPoor::mpWindow, SdrView::PickAnything(), SdrMarkView::PickHandle(), SdrMarkView::PickObj(), pObject, SD_MOD, and SetPointer().
Referenced by Activate(), sd::FuEditGluePoints::ForcePointer(), sd::FuSelection::ForcePointer(), MouseButtonDown(), sd::FuText::MouseButtonDown(), MouseButtonUp(), sd::FuText::MouseButtonUp(), MouseMove(), sd::FuText::MouseMove(), and sd::FuConstructBezierPolygon::SetEditMode().
|
overridevirtual |
Process keyboard input.
Reimplemented from sd::FuPoor.
Reimplemented in sd::FuEditGluePoints, sd::FuFormatPaintBrush, sd::FuSelection, and sd::FuText.
Definition at line 317 of file fudraw.cxx.
References SdrMarkView::AreObjectsMarked(), cancel(), Application::CreateMessageDialog(), SdrView::DeleteMarked(), SfxDispatcher::Execute(), SdrMarkView::GetAllMarkedRect(), vcl::KeyCode::GetCode(), SfxViewFrame::GetDispatcher(), sd::ViewShell::GetFrameWeld(), KeyEvent::GetKeyCode(), sd::ViewShell::GetViewFrame(), SdrMarkView::HasMultipleMarkableObjects(), vcl::KeyCode::IsMod1(), vcl::KeyCode::IsMod2(), sd::View::IsPresObjSelected(), SfxObjectShell::IsReadOnly(), vcl::KeyCode::IsShift(), KEY_BACKSPACE, KEY_DELETE, KEY_END, KEY_ESCAPE, KEY_HOME, KEY_TAB, sd::FuPoor::KeyInput(), SdrPaintView::MakeVisible(), SdrMarkView::MarkNextObj(), sd::FuPoor::mpDocSh, sd::FuPoor::mpView, sd::FuPoor::mpViewShell, sd::FuPoor::mpWindow, SdResId(), and SdrMarkView::UnmarkAllObj().
Referenced by sd::FuEditGluePoints::KeyInput(), sd::FuSelection::KeyInput(), and sd::FuText::KeyInput().
|
overridevirtual |
Reimplemented from sd::FuPoor.
Reimplemented in sd::FuConstruct3dObject, sd::FuConstructArc, sd::FuConstructBezierPolygon, sd::FuConstructCustomShape, sd::FuConstructRectangle, sd::FuConstruct, sd::FuConstructUnoControl, sd::FuEditGluePoints, sd::FuFormatPaintBrush, sd::FuSelection, and sd::FuText.
Definition at line 141 of file fudraw.cxx.
References sd::FuPoor::aMDPos, bDragHelpLine, SdrSnapView::BegDragHelpLine(), sd::FuPoor::doConstructOrthogonal(), DoModifiers(), ForcePointer(), MouseEvent::GetButtons(), SdrPaintView::GetDragStat(), SdrMarkView::GetEditMode(), sd::ViewShell::GetFrameView(), SdrDragStat::GetHdl(), MouseEvent::GetPosPixel(), sd::FuPoor::HITPIX, SdrHdl::IsCornerHdl(), SdrCreateView::IsCreateObj(), SdrSnapView::IsDragHelpLine(), SdrDragView::IsDragObj(), SdrPaintView::IsHlplVisible(), MouseEvent::IsLeft(), MouseEvent::IsMod1(), SdrSnapView::IsOrtho(), MouseEvent::IsShift(), SdrSnapView::IsSnapEnabled(), SdrHdl::IsVertexHdl(), sd::FuPoor::mpView, sd::FuPoor::mpViewShell, sd::FuPoor::mpWindow, nHelpLine, SdrMarkView::PickHandle(), SdrSnapView::PickHelpLine(), sd::FuPoor::SetMouseButtonCode(), SdrSnapView::SetOrtho(), SdrSnapView::SetSnapEnabled(), and Width.
Referenced by sd::FuConstruct::MouseButtonDown(), sd::FuEditGluePoints::MouseButtonDown(), sd::FuSelection::MouseButtonDown(), and sd::FuText::MouseButtonDown().
|
overridevirtual |
Reimplemented from sd::FuPoor.
Reimplemented in sd::FuConstruct3dObject, sd::FuConstructArc, sd::FuConstructBezierPolygon, sd::FuConstructCustomShape, sd::FuConstructRectangle, sd::FuConstruct, sd::FuConstructUnoControl, sd::FuEditGluePoints, sd::FuFormatPaintBrush, sd::FuSelection, and sd::FuText.
Definition at line 274 of file fudraw.cxx.
References bDragHelpLine, sd::FuPoor::bIsInDragMode, tools::Rectangle::Contains(), SdrPageView::DeleteHelpLine(), SdrSnapView::EndDragHelpLine(), ForcePointer(), sd::ViewShell::GetFrameView(), MouseEvent::GetPosPixel(), SdrPaintView::GetSdrPageView(), SdrSnapView::IsAngleSnapEnabled(), SdrSnapView::IsBordSnap(), SdrSnapView::IsDragHelpLine(), SdrDragView::IsDragWithCopy(), SdrSnapView::IsGridSnap(), SdrSnapView::IsHlplSnap(), SdrSnapView::IsOConSnap(), SdrSnapView::IsOFrmSnap(), SdrSnapView::IsOPntSnap(), SdrSnapView::IsOrtho(), sd::FuPoor::MouseButtonUp(), sd::FuPoor::mpView, sd::FuPoor::mpViewShell, sd::FuPoor::mpWindow, nHelpLine, SdrSnapView::SetAngleSnapEnabled(), SdrSnapView::SetBordSnap(), SdrCreateView::SetCreate1stPointAsCenter(), SdrDragView::SetDragWithCopy(), SdrSnapView::SetGridSnap(), SdrSnapView::SetHlplSnap(), SdrSnapView::SetOConSnap(), SdrSnapView::SetOFrmSnap(), SdrSnapView::SetOPntSnap(), SdrSnapView::SetOrtho(), SdrDragView::SetResizeAtCenter(), and SdrSnapView::SetSnapEnabled().
Referenced by sd::FuConstruct::MouseButtonUp(), sd::FuEditGluePoints::MouseButtonUp(), and sd::FuSelection::MouseButtonUp().
|
overridevirtual |
Reimplemented from sd::FuPoor.
Reimplemented in sd::FuConstruct, sd::FuEditGluePoints, sd::FuFormatPaintBrush, sd::FuSelection, and sd::FuText.
Definition at line 214 of file fudraw.cxx.
References sd::FuPoor::doConstructOrthogonal(), DoModifiers(), ForcePointer(), SdrPaintView::GetDragStat(), sd::ViewShell::GetFrameView(), SdrDragStat::GetHdl(), MouseEvent::GetPosPixel(), SdrCreateView::IsAction(), SdrHdl::IsCornerHdl(), SdrSnapView::IsDragHelpLine(), SdrDragView::IsDragObj(), SdrDragView::IsDragWithCopy(), MouseEvent::IsMod1(), MouseEvent::IsMod2(), SdrSnapView::IsOrtho(), MouseEvent::IsShift(), SdrHdl::IsVertexHdl(), SdrView::MouseMove(), SdrSnapView::MovDragHelpLine(), sd::FuPoor::mpView, sd::FuPoor::mpViewShell, sd::FuPoor::mpWindow, SdrDragView::SetDragWithCopy(), and SdrSnapView::SetOrtho().
Referenced by sd::FuConstruct::MouseMove(), sd::FuEditGluePoints::MouseMove(), sd::FuSelection::MouseMove(), and sd::FuText::MouseMove().
|
overridevirtual |
Reimplemented from sd::FuPoor.
Reimplemented in sd::FuText.
Definition at line 681 of file fudraw.cxx.
References DynCastE3dScene(), SdrPaintView::getHitTolLog(), HelpEvent::GetMousePosPixel(), Help::IsBalloonHelpEnabled(), Help::IsQuickHelpEnabled(), MOUSE_LEFT, SdrViewEvent::mpObj, sd::FuPoor::mpView, sd::FuPoor::mpWindow, SdrView::PickAnything(), SdrMarkView::PickObj(), sd::FuPoor::RequestHelp(), SdrMarkView::RequestHelp(), and SetHelpText().
Referenced by sd::FuText::RequestHelp().
bool FuDraw::SetHelpText | ( | const SdrObject * | pObj, |
const Point & | rPos, | ||
const SdrViewEvent & | rVEvt | ||
) |
Definition at line 726 of file fudraw.cxx.
References aURL, tools::Rectangle::BottomRight(), INetURLObject::decode(), IMapObject::GetAltText(), SvxIMapInfo::GetHitIMapObject(), SdrObject::GetLogicRect(), SvxURLField::GetURL(), IMapObject::GetURL(), SfxHelp::GetURLHelpText(), Help::IsBalloonHelpEnabled(), Help::IsQuickHelpEnabled(), SdrViewEvent::mpURLField, sd::FuPoor::mpWindow, Help::ShowBalloon(), Help::ShowQuickHelp(), tools::Rectangle::TopLeft(), and INetURLObject::WithCharset.
Referenced by RequestHelp().
|
inline |
Definition at line 52 of file fudraw.hxx.
References bPermanent.
Referenced by sd::FuConstruct3dObject::Create(), sd::FuConstructArc::Create(), sd::FuConstructBezierPolygon::Create(), sd::FuConstructCustomShape::Create(), sd::FuConstructRectangle::Create(), sd::FuConstructUnoControl::Create(), sd::FuEditGluePoints::Create(), and sd::DrawViewShell::FuPermanent().
Set cursor to pointer when in clickable area of an ImageMap.
Definition at line 583 of file fudraw.cxx.
References Point::AdjustX(), Point::AdjustY(), SvxIMapInfo::GetHitIMapObject(), SvxIMapInfo::GetIMapInfo(), SdrPaintView::GetSdrPageView(), SdrPageView::GetVisibleLayers(), sd::FuPoor::HITPIX, SdrObject::IsClosedObj(), sd::FuPoor::mpView, sd::FuPoor::mpWindow, SdrObjectPrimitiveHit(), and Width.
Referenced by ForcePointer().
|
protected |
Definition at line 71 of file fudraw.hxx.
Referenced by sd::FuConstructUnoControl::Activate().
|
protected |
Definition at line 72 of file fudraw.hxx.
Referenced by sd::FuConstructUnoControl::Activate(), and sd::FuConstructUnoControl::Deactivate().
|
protected |
Definition at line 74 of file fudraw.hxx.
Referenced by MouseButtonDown(), and MouseButtonUp().
|
protected |
Definition at line 73 of file fudraw.hxx.
Referenced by sd::FuConstruct::IsIgnoreUnexpectedMouseButtonUp(), sd::FuConstruct::MouseButtonDown(), sd::FuSelection::MouseButtonDown(), sd::FuText::MouseButtonDown(), sd::FuConstructBezierPolygon::MouseButtonUp(), sd::FuConstruct::MouseButtonUp(), sd::FuSelection::MouseButtonUp(), and sd::FuText::MouseButtonUp().
|
protected |
Definition at line 76 of file fudraw.hxx.
Referenced by sd::FuConstruct3dObject::Create(), sd::FuConstructArc::Create(), sd::FuConstructBezierPolygon::Create(), sd::FuConstructCustomShape::Create(), sd::FuConstructRectangle::Create(), sd::FuConstructUnoControl::Create(), sd::FuEditGluePoints::Create(), sd::FuText::KeyInput(), sd::FuText::MouseButtonDown(), sd::FuConstruct3dObject::MouseButtonUp(), sd::FuConstructArc::MouseButtonUp(), sd::FuConstructBezierPolygon::MouseButtonUp(), sd::FuConstructCustomShape::MouseButtonUp(), sd::FuConstructRectangle::MouseButtonUp(), sd::FuConstructUnoControl::MouseButtonUp(), sd::FuText::MouseButtonUp(), sd::FuText::SetInEditMode(), and SetPermanent().
|
protected |
Definition at line 75 of file fudraw.hxx.
Referenced by MouseButtonDown(), and MouseButtonUp().