78 pAry[2].AdjustX(delta );
80 pAry[3].AdjustY(delta );
93 pAry[4].AdjustY(delta );
95 pAry[5].AdjustX( -delta );
103 pRenderContext->
Invert( aPoly, nInvertStyle );
109 pRenderContext->
Invert( aRect, nInvertStyle );
121 std::unique_ptr<vcl::PaintBufferGuard> pGuard;
123 if (bDoubleBuffering)
126 vcl::RenderContext* pRenderContext = bDoubleBuffering ? pGuard->GetRenderContext() : pWindow;
129 if (bDoubleBuffering)
130 pGuard->SetPaintRect(pRenderContext->
PixelToLogic(aPaintRect));
155 if (mpData && mpData->mpWindow)
158 if (ImplPrepForDraw(mpData->mpWindow, *mpData))
162 mpData->mbCurVisible =
true;
173 if (ImplPrepForDraw(&rRenderContext, aData))
182 assert( mpData && mpData->mbCurVisible );
185 mpData->mbCurVisible =
false;
213 mpData->mbCurVisible =
false;
214 mpData->maTimer.SetInvokeHandler(
LINK(
this,
Cursor, ImplTimerHdl ) );
215 mpData->maTimer.SetDebugName(
"vcl ImplCursorData maTimer" );
218 mpData->mpWindow = pWindow;
219 mpData->mnStyle = mnStyle;
220 if ( bDrawDirect || bRestore )
223 if ( !
mpWindow && (bDrawDirect || !mpData->maTimer.IsActive()) )
227 mpData->maTimer.Start();
228 else if ( !mpData->mbCurVisible )
230 LOKNotify( pWindow,
"cursor_invalidate" );
231 LOKNotify( pWindow,
"cursor_visible" );
241 assert(pWindow &&
"Cannot notify without a window");
242 assert(mpData &&
"Require ImplCursorData");
248 const vcl::ILibreOfficeKitNotifier* pNotifier = pParent->
GetLOKNotifier();
249 std::vector<vcl::LOKPayloadItem> aItems;
250 if (rAction ==
"cursor_visible")
251 aItems.emplace_back(
"visible", mpData->mbCurVisible ?
"true" :
"false");
252 else if (rAction ==
"cursor_invalidate")
261 aItems.emplace_back(
"rectangle", aRect.
toString());
264 pNotifier->notifyWindow(pParent->
GetLOKWindowId(), rAction, aItems);
269 bool bWasCurVisible =
false;
270 if ( mpData && mpData->mpWindow )
272 bWasCurVisible = mpData->mbCurVisible;
273 if ( mpData->mbCurVisible )
278 LOKNotify( mpData->mpWindow,
"cursor_visible" );
279 mpData->maTimer.Stop();
280 mpData->mpWindow =
nullptr;
283 return bWasCurVisible;
288 ImplDoShow(
true,
false );
298 ImplDoShow(
false, bRestore );
303 return ImplDoHide(
true );
308 if ( !(
mbVisible && mpData && mpData->mpWindow) )
311 if ( mpData->mbCurVisible )
317 LOKNotify( mpData->mpWindow,
"cursor_invalidate" );
319 mpData->maTimer.Start();
325 if ( mpData->mbCurVisible )
335 mnOrientation = 0_deg10;
343 maPos( rCursor.maPos )
355 if (mpData && mpData->mbCurVisible)
361 if ( mnStyle != nStyle )
397 if ( maPos != rPoint )
415 if (
maSize.Width() != nNewWidth )
417 maSize.setWidth( nNewWidth );
424 if ( mnOrientation != nNewOrientation )
426 mnOrientation = nNewOrientation;
433 if ( mnDirection != nNewDirection )
435 mnDirection = nNewDirection;
442 maPos = rCursor.
maPos;
455 ((maPos == rCursor.
maPos) &&
#define LINK(Instance, Class, Member)
vcl::LOKWindowId GetLOKWindowId() const
void DrawToDevice(OutputDevice &rRenderContext)
CursorDirection mnDirection
std::unique_ptr< ImplCursorData > mpData
void SetOrientation(Degree10 nOrientation=0_deg10)
void SetPos(const Point &rNewPos)
void setWidth(tools::Long nWidth)
SAL_DLLPRIVATE bool ImplSuspend()
const StyleSettings & GetStyleSettings() const
bool IsMapModeEnabled() const
tools::Long GetOutOffXPixel() const
SAL_DLLPRIVATE WindowImpl * ImplGetWindowImpl() const
SAL_DLLPRIVATE void ImplNew()
void EnableMapMode(bool bEnable=true)
void LOKNotify(vcl::Window *pWindow, const OUString &rAction)
CursorDirection mnDirection
void Invert(const tools::Rectangle &rRect, InvertFlags nFlags=InvertFlags::NONE)
VclPtr< vcl::Window > GetParentWithLOKNotifier()
Find the nearest parent with LOK Notifier; can be itself if this Window has LOK notifier set...
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
void SetStyle(sal_uInt16 nStyle)
#define STYLE_CURSOR_NOBLINKTIME
constexpr OUStringLiteral aData
SAL_DLLPRIVATE void ImplResume(bool bRestore=false)
SAL_DLLPRIVATE void ImplDraw()
An auto-timer is a multi-shot timer re-emitting itself at interval until destroyed or stopped...
VclPtr< vcl::Window > mpWindow
bool ImplDoHide(bool bStop)
SAL_DLLPRIVATE void ImplHide()
bool operator==(const Cursor &rCursor) const
tools::Long Width() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
void SetWindow(vcl::Window *pWindow)
std::unique_ptr< WindowImpl > mpWindowImpl
SAL_DLLPRIVATE void ImplShow()
void SetSize(const Size &rNewSize)
const AllSettings & GetSettings() const
Sets up the buffer to have settings matching the window, and restores the original state in the dtor...
VclPtr< vcl::Window > mpWindow
tools::Long GetOutOffYPixel() const
VclPtr< vcl::Window > mpWindow
Point PixelToLogic(const Point &rDevicePt) const
Point LogicToPixel(const Point &rLogicPt) const
static vcl::Window * GetFocusWindow()
Get the currently focused window.
sal_uInt64 GetCursorBlinkTime() const
tools::Long GetCursorSize() const
Cursor & operator=(const Cursor &rCursor)
reference_type * get() const
Get the body.
const vcl::ILibreOfficeKitNotifier * GetLOKNotifier() const
bool ImplPrepForDraw(const OutputDevice *pDevice, ImplCursorData &rData)
static tools::Rectangle ImplCursorInvert(vcl::RenderContext *pRenderContext, ImplCursorData const *pData)
void ImplDoShow(bool bDrawDirect, bool bRestore)
IMPL_LINK_NOARG(QuickSelectionEngine_Data, SearchStringTimeout, Timer *, void)
ImplFrameData * mpFrameData
void SetDirection(CursorDirection nDirection=CursorDirection::NONE)
bool SupportsDoubleBuffering() const
Can the widget derived from this Window do the double-buffering via RenderContext properly...
void SetWidth(tools::Long nNewWidth)
::basegfx::B2IVector maSize