include/vcl/event.hxx | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-)
New commits: commit a1e897a46f2ada5e93ccd52d3ac382ee1a54c41c Author: Caolán McNamara <[email protected]> AuthorDate: Sat Apr 18 19:16:49 2020 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Apr 20 19:47:34 2020 +0200 add selected state to UserDrawEvent Change-Id: If01e0ec3871d0299e1e24e9f7d55893d4afca688 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92491 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx index 94705020e4c2..88cd3018b4e1 100644 --- a/include/vcl/event.hxx +++ b/include/vcl/event.hxx @@ -224,29 +224,28 @@ private: /// RenderContext to which we should draw - can be a VirtualDevice or anything. VclPtr<vcl::RenderContext> mpRenderContext; - tools::Rectangle maOutRect; + tools::Rectangle maOutRect; sal_uInt16 mnItemId; + bool mbSelected; public: UserDrawEvent(vcl::Window* pWindow, vcl::RenderContext* pRenderContext, - const tools::Rectangle& rOutRect, sal_uInt16 nId); + const tools::Rectangle& rOutRect, sal_uInt16 nId, bool bSelected = false) + : mpWindow(pWindow) + , mpRenderContext(pRenderContext) + , maOutRect( rOutRect ) + , mnItemId(nId) + , mbSelected(bSelected) + { + } vcl::Window* GetWindow() const { return mpWindow; } vcl::RenderContext* GetRenderContext() const { return mpRenderContext; } const tools::Rectangle& GetRect() const { return maOutRect; } sal_uInt16 GetItemId() const { return mnItemId; } + bool IsSelected() const { return mbSelected; } }; -inline UserDrawEvent::UserDrawEvent(vcl::Window* pWindow, vcl::RenderContext* pRenderContext, - const tools::Rectangle& rOutRect, sal_uInt16 nId) - : mpWindow(pWindow) - , mpRenderContext(pRenderContext) - , maOutRect( rOutRect ) - , mnItemId(nId) -{ -} - - class VCL_DLLPUBLIC TrackingEvent { private: _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
