/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
class LokControlHandler
{ public: staticbool postMouseEvent(const SdrPage* pPage, const SdrView* pDrawView,
vcl::DocWindow& rMainWindow, int nType, Point aPointHmm, int nCount, int nButtons, int nModifier)
{ static std::optional<PointerStyle> eDocPointerStyle;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xWindowPeer); if (pWindow)
{
tools::Rectangle aControlRectPx
= o3tl::convert(aControlRectHMM, o3tl::Length::mm100, o3tl::Length::px); // used by Control::LogicInvalidate
pWindow->SetPosPixel(aControlRectPx.TopLeft());
// when entering into control area save current pointer style // and set pointer style to arrow if (!eDocPointerStyle)
{
eDocPointerStyle = rMainWindow.GetPointer();
rMainWindow.SetPointer(pWindow->GetPointer());
}
Point aControlRelativePositionHMM = aPointHmm - aControlRectHMM.TopLeft();
Point aControlRelativePosition = o3tl::convert(
aControlRelativePositionHMM, o3tl::Length::mm100, o3tl::Length::px);
// when exiting from control area restore document pointer style if (eDocPointerStyle)
{
rMainWindow.SetPointer(*eDocPointerStyle);
eDocPointerStyle.reset();
} returnfalse;
}
// Check if we intersect with the tile rectangle and we // need to draw the control. if (aObjectRectHMM.Overlaps(aTileRectHMM))
{
drawUnoControl(pDrawView, pUnoObect, rMainWindow, rDevice, aTileRectHMM, double(scaleX), double(scaleY));
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.