LibreOffice Module sfx2 (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
RecentDocsViewItem Class Referencefinal

#include <recentdocsviewitem.hxx>

Inheritance diagram for RecentDocsViewItem:
[legend]
Collaboration diagram for RecentDocsViewItem:
[legend]

Public Member Functions

 RecentDocsViewItem (sfx2::RecentDocsView &rView, const OUString &rURL, const OUString &rTitle, std::u16string_view sThumbnailBase64, sal_uInt16 nId, tools::Long nThumbnailSize, bool isReadOnly, bool isPinned)
 
virtual tools::Rectangle updateHighlight (bool bVisible, const Point &rPoint) override
 Updates own highlight status based on the aPoint position. More...
 
virtual OUString getHelpText () const override
 Text to be used for the tooltip. More...
 
virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor, const ThumbnailItemAttributes *pAttrs) override
 
virtual void MouseButtonUp (const MouseEvent &rMEvt) override
 
void OpenDocument ()
 Called when the user clicks a document - it will open it. More...
 
- Public Member Functions inherited from ThumbnailViewItem
 ThumbnailViewItem (ThumbnailView &rView, sal_uInt16 nId)
 
virtual ~ThumbnailViewItem ()
 
bool isVisible () const
 
void show (bool bVisible)
 
bool isSelected () const
 
void setSelection (bool state)
 
bool isHighlighted () const
 
void setHighlight (bool state)
 
bool isPinned () const
 
virtual tools::Rectangle updateHighlight (bool bVisible, const Point &rPoint)
 Updates own highlight status based on the aPoint position. More...
 
void setHelpText (const OUString &sText)
 Text to be used for the tooltip. More...
 
virtual OUString getHelpText () const
 
OUString const & getTitle () const
 
void setTitle (const OUString &rTitle)
 
css::uno::Reference< css::accessibility::XAccessible > const & GetAccessible (bool bIsTransientChildrenDisabled)
 
void setDrawArea (const tools::Rectangle &area)
 
const tools::RectanglegetDrawArea () const
 
void calculateItemsPosition (const tools::Long nThumbnailHeight, const tools::Long nPadding, sal_uInt32 nMaxTextLength, const ThumbnailItemAttributes *pAttrs)
 
virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor, const ThumbnailItemAttributes *pAttrs)
 
void addTextPrimitives (const OUString &rText, const ThumbnailItemAttributes *pAttrs, Point aPos, drawinglayer::primitive2d::Primitive2DContainer &rSeq)
 
virtual void MouseButtonUp (const MouseEvent &)
 

Private Member Functions

tools::Rectangle getRemoveIconArea () const
 Return area where is the icon to remove document from the recent documents. More...
 

Private Attributes

sfx2::RecentDocsViewmrParentView
 
OUString maURL
 
bool m_isReadOnly = false
 
OUString m_sHelpText
 
bool m_bRemoveIconHighlighted
 Is the icon that the user can click to remove the document from the recent documents highlighted? More...
 
BitmapEx m_aRemoveRecentBitmap
 
BitmapEx m_aRemoveRecentBitmapHighlighted
 

Additional Inherited Members

- Static Public Member Functions inherited from ThumbnailViewItem
static rtl::Reference< drawinglayer::primitive2d::PolygonHairlinePrimitive2DcreateBorderLine (const basegfx::B2DPolygon &rPolygon)
 
- Public Attributes inherited from ThumbnailViewItem
ThumbnailViewmrParent
 
sal_uInt16 mnId
 
bool mbVisible
 
bool mbBorder
 
bool mbSelected
 
bool mbHover
 
bool mbPinned
 
BitmapEx maPreview1
 
OUString maTitle
 
OUString maHelpText
 
css::uno::Reference< css::accessibility::XAccessible > mxAcc
 
bool mbPinnedDocumentHighlighted
 
BitmapEx maPinnedDocumentBitmap
 
BitmapEx maPinnedDocumentBitmapHiglighted
 
- Protected Attributes inherited from ThumbnailViewItem
Point maTextPos
 
Point maPrev1Pos
 
Point maPinPos
 
tools::Rectangle maDrawArea
 

Detailed Description

Definition at line 20 of file recentdocsviewitem.hxx.

Constructor & Destructor Documentation

◆ RecentDocsViewItem()

RecentDocsViewItem::RecentDocsViewItem ( sfx2::RecentDocsView rView,
const OUString &  rURL,
const OUString &  rTitle,
std::u16string_view  sThumbnailBase64,
sal_uInt16  nId,
tools::Long  nThumbnailSize,
bool  isReadOnly,
bool  isPinned 
)

Member Function Documentation

◆ getHelpText()

OUString RecentDocsViewItem::getHelpText ( ) const
overridevirtual

Text to be used for the tooltip.

Reimplemented from ThumbnailViewItem.

Definition at line 268 of file recentdocsviewitem.cxx.

References m_sHelpText.

◆ getRemoveIconArea()

tools::Rectangle RecentDocsViewItem::getRemoveIconArea ( ) const
private

Return area where is the icon to remove document from the recent documents.

Definition at line 258 of file recentdocsviewitem.cxx.

References ThumbnailViewItem::getDrawArea(), BitmapEx::GetSizePixel(), m_aRemoveRecentBitmap, tools::Rectangle::Right(), THUMBNAILVIEW_ITEM_CORNER, tools::Rectangle::Top(), and Size::Width().

Referenced by MouseButtonUp(), Paint(), and updateHighlight().

◆ MouseButtonUp()

void RecentDocsViewItem::MouseButtonUp ( const MouseEvent rMEvt)
overridevirtual

◆ OpenDocument()

void RecentDocsViewItem::OpenDocument ( )

◆ Paint()

void RecentDocsViewItem::Paint ( drawinglayer::processor2d::BaseProcessor2D pProcessor,
const ThumbnailItemAttributes pAttrs 
)
overridevirtual

◆ updateHighlight()

tools::Rectangle RecentDocsViewItem::updateHighlight ( bool  bVisible,
const Point rPoint 
)
overridevirtual

Updates own highlight status based on the aPoint position.

Calls the ancestor's updateHighlight, and then takes care of m_bRemoveIconHighlighted.

Returns rectangle that needs to be invalidated.

Reimplemented from ThumbnailViewItem.

Definition at line 236 of file recentdocsviewitem.cxx.

References bVisible, getRemoveIconArea(), m_bRemoveIconHighlighted, tools::Rectangle::Union(), and ThumbnailViewItem::updateHighlight().

Member Data Documentation

◆ m_aRemoveRecentBitmap

BitmapEx RecentDocsViewItem::m_aRemoveRecentBitmap
private

Definition at line 61 of file recentdocsviewitem.hxx.

Referenced by getRemoveIconArea(), and Paint().

◆ m_aRemoveRecentBitmapHighlighted

BitmapEx RecentDocsViewItem::m_aRemoveRecentBitmapHighlighted
private

Definition at line 63 of file recentdocsviewitem.hxx.

Referenced by Paint().

◆ m_bRemoveIconHighlighted

bool RecentDocsViewItem::m_bRemoveIconHighlighted
private

Is the icon that the user can click to remove the document from the recent documents highlighted?

Definition at line 59 of file recentdocsviewitem.hxx.

Referenced by Paint(), and updateHighlight().

◆ m_isReadOnly

bool RecentDocsViewItem::m_isReadOnly = false
private

Definition at line 54 of file recentdocsviewitem.hxx.

Referenced by OpenDocument().

◆ m_sHelpText

OUString RecentDocsViewItem::m_sHelpText
private

Definition at line 56 of file recentdocsviewitem.hxx.

Referenced by getHelpText(), and RecentDocsViewItem().

◆ maURL

OUString RecentDocsViewItem::maURL
private

Definition at line 52 of file recentdocsviewitem.hxx.

Referenced by MouseButtonUp(), and OpenDocument().

◆ mrParentView

sfx2::RecentDocsView& RecentDocsViewItem::mrParentView
private

Definition at line 47 of file recentdocsviewitem.hxx.

Referenced by OpenDocument().


The documentation for this class was generated from the following files: