10#ifndef INCLUDED_SFX2_THUMBNAILVIEW_HXX
11#define INCLUDED_SFX2_THUMBNAILVIEW_HXX
143#define THUMBNAILVIEW_ITEM_NOTFOUND (sal_uInt16(-1))
168 ThumbnailView(std::unique_ptr<weld::ScrolledWindow> xWindow, std::unique_ptr<weld::Menu> xMenu);
177 void AppendItem(std::unique_ptr<ThumbnailViewItem> pItem);
179 void RemoveItem(sal_uInt16 nItemId);
181 virtual void Clear();
184 void updateItems(std::vector<std::unique_ptr<ThumbnailViewItem>> items);
186 size_t GetItemPos( sal_uInt16 nItemId )
const;
188 sal_uInt16 GetItemId(
size_t nPos )
const;
190 sal_uInt16 GetItemId(
const Point& rPos )
const;
196 void setItemMaxTextLength (sal_uInt32 nLength);
201 void SelectItem( sal_uInt16 nItemId );
203 bool IsItemSelected( sal_uInt16 nItemId )
const;
211 void deselectItems ();
213 void ShowTooltips(
bool bShowTooltips );
215 void DrawMnemonics(
bool bDrawMnemonics );
221 virtual void Resize()
override;
225 mxScrolledWindow->show();
231 mxScrolledWindow->hide();
237 static BitmapEx readThumbnail(
const OUString &msURL);
253 virtual css::uno::Reference< css::accessibility::XAccessible >
CreateAccessible()
override;
255 const css::uno::Reference<css::accessibility::XAccessible> & getAccessible()
const;
273 void CalculateItemPositions (
bool bScrollBarUsed =
false);
274 void MakeItemVisible( sal_uInt16 nId );
278 void ImplDeleteItems();
279 size_t ImplGetItem(
const Point& rPoint )
const;
281 sal_uInt16 ImplGetVisibleItemCount()
const;
283 void ImplFireAccessibleEvent(
short nEventId,
const css::uno::Any& rOldValue,
const css::uno::Any& rNewValue );
284 bool ImplHasAccessibleListeners()
const;
289 std::vector< std::unique_ptr<ThumbnailViewItem> >
mItemList;
Class to display thumbnails with their names below their respective icons.
tools::Long mnThumbnailHeight
Link< const ThumbnailViewItem *, void > maItemStateHdl
tools::Long mnDisplayHeight
Color maHighlightColor
Color of the highlight (background) of the hovered item.
ThumbnailValueItemList::iterator mpStartSelRange
tools::Long mnItemPadding
std::unique_ptr< weld::Menu > mxContextMenu
double mfHighlightTransparence
Transparence of the highlight.
void setItemStateHdl(const Link< const ThumbnailViewItem *, void > &aLink)
Color maHighlightTextColor
Color of the text for the highlighted item.
std::unique_ptr< weld::ScrolledWindow > mxScrolledWindow
Color maTextColor
Text color.
css::uno::Reference< css::accessibility::XAccessible > mxAccessible
virtual void Reload()
Updates information in the view; used only in RecentDocsView ATM.
std::unique_ptr< ThumbnailItemAttributes > mpItemAttrs
std::function< bool(const ThumbnailViewItem *)> maFilterFunc
virtual void Show() override
Color maSelectHighlightTextColor
Color of the text of the selected and hovered item.
DECL_DLLPRIVATE_LINK(ImplScrollHdl, weld::ScrolledWindow &, void)
Color maSelectHighlightColor
Color of the highlight (background) of the selected and hovered item.
std::vector< std::unique_ptr< ThumbnailViewItem > > mItemList
Color maFillColor
Background color of the thumbnail view widget.
ThumbnailValueItemList mFilteredItemList
Cache to store the filtered items.
bool isDrawMnemonic() const
virtual void Hide() override
bool operator()(const ThumbnailViewItem *) const
void Clear(EHistoryType eHistory)
UNOTOOLS_DLLPUBLIC void AppendItem(EHistoryType eHistory, const OUString &sURL, const OUString &sFilter, const OUString &sTitle, const std::optional< OUString > &sThumbnail, std::optional< bool > oIsReadOnly)
::std::vector< ThumbnailViewItem * > ThumbnailValueItemList