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

#include <recentdocsview.hxx>

Inheritance diagram for sfx2::RecentDocsView:
[legend]
Collaboration diagram for sfx2::RecentDocsView:
[legend]

Public Member Functions

 RecentDocsView (std::unique_ptr< weld::ScrolledWindow > xWindow, std::unique_ptr< weld::Menu > xMenu)
 
virtual ~RecentDocsView () override
 
void insertItem (const OUString &rURL, const OUString &rTitle, const OUString &rThumbnail, bool isReadOnly, bool isPinned, sal_uInt16 nId)
 
virtual void Clear () override
 
virtual void Reload () override
 Update the information in the view. More...
 
void PostLoadRecentUsedFile (LoadRecentFile *pLoadRecentFile)
 
void DispatchedLoadRecentUsedFile ()
 
void clearUnavailableFiles ()
 
void setFilter (ApplicationType aFilter)
 
- Public Member Functions inherited from ThumbnailView
 ThumbnailView (std::unique_ptr< weld::ScrolledWindow > xWindow, std::unique_ptr< weld::Menu > xMenu)
 
virtual ~ThumbnailView () override
 
virtual bool MouseMove (const MouseEvent &rMEvt) override
 
virtual void Reload ()
 Updates information in the view; used only in RecentDocsView ATM. More...
 
void AppendItem (std::unique_ptr< ThumbnailViewItem > pItem)
 
void RemoveItem (sal_uInt16 nItemId)
 
virtual void Clear ()
 
void updateItems (std::vector< std::unique_ptr< ThumbnailViewItem > > items)
 
size_t GetItemPos (sal_uInt16 nItemId) const
 
sal_uInt16 GetItemId (size_t nPos) const
 
sal_uInt16 GetItemId (const Point &rPos) const
 
virtual bool renameItem (ThumbnailViewItem *pItem, const OUString &sNewTitle)
 
bool isDrawMnemonic () const
 
void setItemMaxTextLength (sal_uInt32 nLength)
 
void setItemDimensions (tools::Long ItemWidth, tools::Long ThumbnailHeight, tools::Long DisplayHeight, int itemPadding)
 
void SelectItem (sal_uInt16 nItemId)
 
bool IsItemSelected (sal_uInt16 nItemId) const
 
void deselectItems ()
 deselect all current selected items. More...
 
void ShowTooltips (bool bShowTooltips)
 
void DrawMnemonics (bool bDrawMnemonics)
 
void filterItems (const std::function< bool(const ThumbnailViewItem *) > &func)
 
void setItemStateHdl (const Link< const ThumbnailViewItem *, void > &aLink)
 
virtual void Resize () override
 
virtual void Show () override
 
virtual void Hide () override
 
virtual void SetDrawingArea (weld::DrawingArea *pDrawingArea) override
 
- Public Member Functions inherited from weld::CustomWidgetController
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible ()
 
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0
 
virtual void Resize ()
 
virtual bool MouseButtonDown (const MouseEvent &)
 
virtual bool MouseMove (const MouseEvent &)
 
virtual bool MouseButtonUp (const MouseEvent &)
 
virtual void GetFocus ()
 
virtual void LoseFocus ()
 
virtual void StyleUpdated ()
 
virtual bool Command (const CommandEvent &)
 
virtual bool KeyInput (const KeyEvent &)
 
virtual tools::Rectangle GetFocusRect ()
 
virtual FactoryFunction GetUITestFactory () const
 
virtual OUString RequestHelp (tools::Rectangle &)
 
virtual OUString GetHelpText () const
 
Size const & GetOutputSizePixel () const
 
void SetOutputSizePixel (const Size &rSize)
 
virtual void SetDrawingArea (weld::DrawingArea *pDrawingArea)
 
weld::DrawingAreaGetDrawingArea () const
 
void Invalidate ()
 
void Invalidate (const tools::Rectangle &rRect)
 
virtual void Show ()
 
virtual void Hide ()
 
void SetCursor (void *pData)
 
void GrabFocus ()
 
bool HasFocus () const
 
bool HasChildFocus () const
 
bool IsVisible () const
 
bool IsReallyVisible () const
 
bool IsEnabled () const
 
void Enable () const
 
void Disable () const
 
bool IsActive () const
 
int GetTextHeight () const
 
int GetTextWidth (const OUString &rText) const
 
OUString GetAccessibleName () const
 
OUString GetAccessibleDescription () const
 
void CaptureMouse ()
 
bool IsMouseCaptured () const
 
Point GetPointerPosPixel () const
 
void EnableRTL (bool bEnable)
 
bool IsRTLEnabled () const
 
void ReleaseMouse ()
 
void SetPointer (PointerStyle ePointerStyle)
 
void SetHelpId (const OUString &rHelpId)
 
void SetAccessibleName (const OUString &rName)
 
void SetInputContext (const InputContext &rInputContext)
 
void SetCursorRect (const tools::Rectangle &rCursorRect, int nExtTextInputWidth)
 
virtual int GetSurroundingText (OUString &)
 
virtual bool DeleteSurroundingText (const Selection &)
 
css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget ()
 
css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard () const
 
void SetDragDataTransferable (rtl::Reference< TransferDataContainer > &rTransferable, sal_uInt8 eDNDConstants)
 
virtual bool StartDrag ()
 
void set_size_request (int nWidth, int nHeight)
 
void queue_resize ()
 
 CustomWidgetController ()
 
virtual ~CustomWidgetController ()
 
 CustomWidgetController (CustomWidgetController const &)=default
 
 CustomWidgetController (CustomWidgetController &&)=default
 
CustomWidgetControlleroperator= (CustomWidgetController const &)=default
 
CustomWidgetControlleroperator= (CustomWidgetController &&)=default
 

Static Public Member Functions

static bool typeMatchesExtension (ApplicationType type, std::u16string_view rExt)
 
- Static Public Member Functions inherited from ThumbnailView
static BitmapEx readThumbnail (const OUString &msURL)
 
- Static Public Member Functions inherited from weld::CustomWidgetController
static bool IsUpdateMode ()
 

Public Attributes

ApplicationType mnFileTypes
 

Private Member Functions

virtual bool MouseButtonDown (const MouseEvent &rMEvt) override
 
virtual bool MouseButtonUp (const MouseEvent &rMEvt) override
 
virtual void OnItemDblClicked (ThumbnailViewItem *pItem) override
 
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
 
virtual void LoseFocus () override
 
bool isAcceptedFile (const INetURLObject &rURL) const
 
 DECL_LINK (ExecuteHdl_Impl, void *, void)
 

Private Attributes

tools::Long mnItemMaxSize
 
size_t mnLastMouseDownItem
 
BitmapEx maWelcomeImage
 Image that appears when there is no recent document. More...
 
OUString maWelcomeLine1
 
OUString maWelcomeLine2
 
sfx2::LoadRecentFilempLoadRecentFile
 
ImplSVEventm_nExecuteHdlId
 

Additional Inherited Members

- Protected Member Functions inherited from ThumbnailView
virtual bool KeyInput (const KeyEvent &rKEvt) override
 
virtual bool MouseButtonDown (const MouseEvent &rMEvt) override
 
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
 
virtual void GetFocus () override
 
virtual void LoseFocus () override
 
virtual OUString RequestHelp (tools::Rectangle &rRect) override
 
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible () override
 
const css::uno::Reference< css::accessibility::XAccessible > & getAccessible () const
 
void DrawItem (ThumbnailViewItem const *pItem)
 
virtual void OnItemDblClicked (ThumbnailViewItem *pItem)
 
void UpdateColors ()
 
void CalculateItemPositions (bool bScrollBarUsed=false)
 
void MakeItemVisible (sal_uInt16 nId)
 
void ImplInit ()
 
void ImplDeleteItems ()
 
size_t ImplGetItem (const Point &rPoint) const
 
ThumbnailViewItemImplGetItem (size_t nPos)
 
sal_uInt16 ImplGetVisibleItemCount () const
 
ThumbnailViewItemImplGetVisibleItem (sal_uInt16 nVisiblePos)
 
void ImplFireAccessibleEvent (short nEventId, const css::uno::Any &rOldValue, const css::uno::Any &rNewValue)
 
bool ImplHasAccessibleListeners () const
 
 DECL_DLLPRIVATE_LINK (ImplScrollHdl, weld::ScrolledWindow &, void)
 
- Protected Attributes inherited from ThumbnailView
std::vector< std::unique_ptr< ThumbnailViewItem > > mItemList
 
css::uno::Reference< css::accessibility::XAccessible > mxAccessible
 
ThumbnailValueItemList mFilteredItemList
 Cache to store the filtered items. More...
 
ThumbnailValueItemList::iterator mpStartSelRange
 
tools::Long mnItemWidth
 
tools::Long mnItemHeight
 
tools::Long mnItemPadding
 
tools::Long mnThumbnailHeight
 
tools::Long mnDisplayHeight
 
tools::Long mnVItemSpace
 
tools::Long mnVisLines
 
tools::Long mnLines
 
sal_uInt16 mnCols
 
sal_uInt16 mnFirstLine
 
bool mbScroll: 1
 
bool mbAllowVScrollBar: 1
 
bool mbHasVisibleItems: 1
 
bool mbShowTooltips: 1
 
bool mbDrawMnemonics: 1
 
bool mbSelectOnFocus: 1
 
Color maFillColor
 Background color of the thumbnail view widget. More...
 
Color maTextColor
 Text color. More...
 
Color maHighlightColor
 Color of the highlight (background) of the hovered item. More...
 
Color maHighlightTextColor
 Color of the text for the highlighted item. More...
 
Color maSelectHighlightColor
 Color of the highlight (background) of the selected and hovered item. More...
 
Color maSelectHighlightTextColor
 Color of the text of the selected and hovered item. More...
 
double mfHighlightTransparence
 Transparence of the highlight. More...
 
Link< const ThumbnailViewItem *, void > maItemStateHdl
 
std::unique_ptr< ThumbnailItemAttributesmpItemAttrs
 
std::unique_ptr< weld::ScrolledWindowmxScrolledWindow
 
std::unique_ptr< weld::MenumxContextMenu
 
std::function< bool(const ThumbnailViewItem *)> maFilterFunc
 

Detailed Description

Definition at line 60 of file recentdocsview.hxx.

Constructor & Destructor Documentation

◆ RecentDocsView()

sfx2::RecentDocsView::RecentDocsView ( std::unique_ptr< weld::ScrolledWindow xWindow,
std::unique_ptr< weld::Menu xMenu 
)

◆ ~RecentDocsView()

sfx2::RecentDocsView::~RecentDocsView ( )
overridevirtual

Member Function Documentation

◆ Clear()

void sfx2::RecentDocsView::Clear ( )
overridevirtual

Reimplemented from ThumbnailView.

Definition at line 293 of file recentdocsview.cxx.

References ThumbnailView::Clear(), and weld::CustomWidgetController::Invalidate().

Referenced by Reload().

◆ clearUnavailableFiles()

void sfx2::RecentDocsView::clearUnavailableFiles ( )

◆ DECL_LINK()

sfx2::RecentDocsView::DECL_LINK ( ExecuteHdl_Impl  ,
void *  ,
void   
)
private

◆ DispatchedLoadRecentUsedFile()

void sfx2::RecentDocsView::DispatchedLoadRecentUsedFile ( )

Definition at line 306 of file recentdocsview.cxx.

References mpLoadRecentFile.

Referenced by sfx2::IMPL_LINK().

◆ insertItem()

void sfx2::RecentDocsView::insertItem ( const OUString &  rURL,
const OUString &  rTitle,
const OUString &  rThumbnail,
bool  isReadOnly,
bool  isPinned,
sal_uInt16  nId 
)

Definition at line 147 of file recentdocsview.cxx.

References ThumbnailView::AppendItem(), mnItemMaxSize, and nId.

Referenced by Reload().

◆ isAcceptedFile()

bool sfx2::RecentDocsView::isAcceptedFile ( const INetURLObject rURL) const
private

◆ LoseFocus()

void sfx2::RecentDocsView::LoseFocus ( )
overrideprivatevirtual

Reimplemented from ThumbnailView.

Definition at line 286 of file recentdocsview.cxx.

References ThumbnailView::deselectItems(), and ThumbnailView::LoseFocus().

◆ MouseButtonDown()

bool sfx2::RecentDocsView::MouseButtonDown ( const MouseEvent rMEvt)
overrideprivatevirtual

◆ MouseButtonUp()

bool sfx2::RecentDocsView::MouseButtonUp ( const MouseEvent rMEvt)
overrideprivatevirtual

◆ OnItemDblClicked()

void sfx2::RecentDocsView::OnItemDblClicked ( ThumbnailViewItem pItem)
overrideprivatevirtual

Reimplemented from ThumbnailView.

Definition at line 240 of file recentdocsview.cxx.

References RecentDocsViewItem::OpenDocument().

◆ Paint()

void sfx2::RecentDocsView::Paint ( vcl::RenderContext rRenderContext,
const tools::Rectangle rRect 
)
overrideprivatevirtual

◆ PostLoadRecentUsedFile()

void sfx2::RecentDocsView::PostLoadRecentUsedFile ( LoadRecentFile pLoadRecentFile)

◆ Reload()

void sfx2::RecentDocsView::Reload ( )
overridevirtual

◆ setFilter()

void sfx2::RecentDocsView::setFilter ( ApplicationType  aFilter)

Definition at line 182 of file recentdocsview.cxx.

References mnFileTypes, and Reload().

◆ typeMatchesExtension()

bool sfx2::RecentDocsView::typeMatchesExtension ( ApplicationType  type,
std::u16string_view  rExt 
)
static

Member Data Documentation

◆ m_nExecuteHdlId

ImplSVEvent* sfx2::RecentDocsView::m_nExecuteHdlId
private

Definition at line 112 of file recentdocsview.hxx.

Referenced by PostLoadRecentUsedFile(), and ~RecentDocsView().

◆ maWelcomeImage

BitmapEx sfx2::RecentDocsView::maWelcomeImage
private

Image that appears when there is no recent document.

Definition at line 107 of file recentdocsview.hxx.

Referenced by Paint().

◆ maWelcomeLine1

OUString sfx2::RecentDocsView::maWelcomeLine1
private

Definition at line 108 of file recentdocsview.hxx.

Referenced by Paint().

◆ maWelcomeLine2

OUString sfx2::RecentDocsView::maWelcomeLine2
private

Definition at line 109 of file recentdocsview.hxx.

Referenced by Paint().

◆ mnFileTypes

ApplicationType sfx2::RecentDocsView::mnFileTypes

Definition at line 71 of file recentdocsview.hxx.

Referenced by isAcceptedFile(), Reload(), and setFilter().

◆ mnItemMaxSize

tools::Long sfx2::RecentDocsView::mnItemMaxSize
private

Definition at line 103 of file recentdocsview.hxx.

Referenced by insertItem(), and RecentDocsView().

◆ mnLastMouseDownItem

size_t sfx2::RecentDocsView::mnLastMouseDownItem
private

Definition at line 104 of file recentdocsview.hxx.

Referenced by MouseButtonDown(), and MouseButtonUp().

◆ mpLoadRecentFile

sfx2::LoadRecentFile* sfx2::RecentDocsView::mpLoadRecentFile
private

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