1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
10 #ifndef INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX
11 #define INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX
13 #include <sfx2/thumbnailview.hxx>
15 class RecentDocsViewItem
: public ThumbnailViewItem
18 RecentDocsViewItem(ThumbnailView
&rView
, const OUString
&rURL
,
19 const OUString
&rTitle
, const BitmapEx
& rThumbnail
, sal_uInt16 nId
, long nThumbnailSize
= 256);
20 virtual void setEditTitle (bool edit
, bool bChangeFocus
= true) SAL_OVERRIDE
;
22 /** Updates own highlight status based on the aPoint position.
24 Calls the ancestor's updateHighlight, and then takes care of m_bRemoveIconHighlighted.
26 Returns rectangle that needs to be invalidated.
28 virtual Rectangle
updateHighlight(bool bVisible
, const Point
& rPoint
) SAL_OVERRIDE
;
30 /// Text to be used for the tooltip.
31 virtual OUString
getHelpText() const SAL_OVERRIDE
;
33 virtual void Paint(drawinglayer::processor2d::BaseProcessor2D
*pProcessor
,
34 const ThumbnailItemAttributes
*pAttrs
) SAL_OVERRIDE
;
36 virtual void MouseButtonUp(const MouseEvent
& rMEvt
) SAL_OVERRIDE
;
38 /// Called when the user clicks a document - it will open it.
42 /// Return area where is the icon to remove document from the recent documents.
43 Rectangle
getRemoveIconArea() const;
50 /// Is the icon that the user can click to remove the document from the recent documents highlighted?
51 bool m_bRemoveIconHighlighted
;
53 BitmapEx m_aRemoveRecentBitmap
;
55 BitmapEx m_aRemoveRecentBitmapHighlighted
;
58 #endif // INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX
60 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */