LibreOffice Module sfx2 (master) 1
|
#include <recentdocsviewitem.hxx>
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::Rectangle & | getDrawArea () 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::RecentDocsView & | mrParentView |
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::PolygonHairlinePrimitive2D > | createBorderLine (const basegfx::B2DPolygon &rPolygon) |
Public Attributes inherited from ThumbnailViewItem | |
ThumbnailView & | mrParent |
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 |
Definition at line 20 of file recentdocsviewitem.hxx.
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 | ||
) |
Definition at line 123 of file recentdocsviewitem.cxx.
References BitmapEx::CopyPixel(), comphelper::Base64::decode(), INetURLObject::getExtension(), INetURLObject::getFSysPath(), PaperInfo::getHeight(), INetURLObject::GetLastName(), INetURLObject::GetProtocol(), BitmapEx::GetSizePixel(), PaperInfo::getSystemDefaultPaper(), INetURLObject::GetURLNoPass(), PaperInfo::getWidth(), Size::Height(), BitmapEx::IsEmpty(), ThumbnailViewItem::isPinned(), m_sHelpText, ThumbnailViewItem::maPreview1, ThumbnailViewItem::maTitle, maURL, ThumbnailViewItem::mbPinned, vcl::N24_BPP, nId, PAPER_SCREEN_4_3, vcl::PngImageReader::read(), BitmapEx::Scale(), TemplateLocalView::scaleImg(), sfx2::TYPE_DATABASE, sfx2::TYPE_IMPRESS, sfx2::RecentDocsView::typeMatchesExtension(), Size::Width(), and INetURLObject::WithCharset.
|
overridevirtual |
Text to be used for the tooltip.
Reimplemented from ThumbnailViewItem.
Definition at line 268 of file recentdocsviewitem.cxx.
References m_sHelpText.
|
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().
|
overridevirtual |
Reimplemented from ThumbnailViewItem.
Definition at line 292 of file recentdocsviewitem.cxx.
References SvtHistoryOptions::DeleteItem(), MouseEvent::GetPosPixel(), getRemoveIconArea(), BitmapEx::GetSizePixel(), MouseEvent::IsLeft(), ThumbnailViewItem::maPinnedDocumentBitmap, ThumbnailViewItem::maPinPos, maURL, ThumbnailViewItem::mrParent, OpenDocument(), ThumbnailView::Reload(), and SvtHistoryOptions::TogglePinItem().
void RecentDocsViewItem::OpenDocument | ( | ) |
Called when the user clicks a document - it will open it.
Definition at line 316 of file recentdocsviewitem.cxx.
References sfx2::LoadRecentFile::aArgSeq, aTargetURL, sfx2::LoadRecentFile::aTargetURL, weld::CustomWidgetController::Disable(), m_isReadOnly, comphelper::makePropertyValue(), maURL, mrParentView, sfx2::RecentDocsView::PostLoadRecentUsedFile(), sfx2::LoadRecentFile::pView, weld::CustomWidgetController::SetPointer(), xDispatch, and sfx2::LoadRecentFile::xDispatch.
Referenced by MouseButtonUp(), and sfx2::RecentDocsView::OnItemDblClicked().
|
overridevirtual |
Reimplemented from ThumbnailViewItem.
Definition at line 273 of file recentdocsviewitem.cxx.
References aSeq, getRemoveIconArea(), ThumbnailViewItem::isHighlighted(), m_aRemoveRecentBitmap, m_aRemoveRecentBitmapHighlighted, m_bRemoveIconHighlighted, ThumbnailViewItem::Paint(), drawinglayer::processor2d::BaseProcessor2D::process(), TopLeft, Point::X(), and Point::Y().
|
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().
|
private |
Definition at line 61 of file recentdocsviewitem.hxx.
Referenced by getRemoveIconArea(), and Paint().
|
private |
Definition at line 63 of file recentdocsviewitem.hxx.
Referenced by Paint().
|
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().
|
private |
Definition at line 54 of file recentdocsviewitem.hxx.
Referenced by OpenDocument().
|
private |
Definition at line 56 of file recentdocsviewitem.hxx.
Referenced by getHelpText(), and RecentDocsViewItem().
|
private |
Definition at line 52 of file recentdocsviewitem.hxx.
Referenced by MouseButtonUp(), and OpenDocument().
|
private |
Definition at line 47 of file recentdocsviewitem.hxx.
Referenced by OpenDocument().