summaryrefslogtreecommitdiff
path: root/include/sfx2/thumbnailview.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-10-17 19:35:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-10-22 20:35:58 +0200
commit7476e6d987ce54c3a1058bafac8152e5b1abc52a (patch)
treee3a0620af4b3b14ddcd51a3e0b81dc2bb80d1c67 /include/sfx2/thumbnailview.hxx
parent2a635ba02b51a2523feef71fb28643cad540f942 (diff)
drop newly unused ThumbnailView
Change-Id: I6c025120abf7f7dfbc1c06ad47e80e1d23ba731d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104536 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/sfx2/thumbnailview.hxx')
-rw-r--r--include/sfx2/thumbnailview.hxx137
1 files changed, 2 insertions, 135 deletions
diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 767f4d6375aa..93d67e8928bb 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -181,141 +181,6 @@ public:
virtual ~ThumbnailViewBase();
};
-class SFX2_DLLPUBLIC ThumbnailView : public Control, public ThumbnailViewBase
-{
-public:
-
- ThumbnailView(vcl::Window* pParent);
-
- virtual ~ThumbnailView() override;
- virtual void dispose() override;
-
- virtual void MouseMove(const MouseEvent& rMEvt) override;
-
- void AppendItem(std::unique_ptr<ThumbnailViewItem> pItem);
-
- virtual void Clear();
-
- // Change current thumbnail item list with new one (invalidates all pointers to a thumbnail item)
- 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 isDrawMnemonic() const override { return false; }
-
- 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;
-
- /**
- *
- * @brief deselect all current selected items.
- *
- **/
-
- void deselectItems ();
-
- void ShowTooltips( bool bShowTooltips );
-
- void filterItems (const std::function<bool (const ThumbnailViewItem*) > &func);
-
- virtual void Resize() override;
-
- static BitmapEx readThumbnail(const OUString &msURL);
-
-protected:
-
- virtual void KeyInput( const KeyEvent& rKEvt ) override;
-
- virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
-
- virtual void Command( const CommandEvent& rCEvt ) override;
-
- virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
-
- virtual void GetFocus() override;
-
- virtual void LoseFocus() override;
-
- virtual void StateChanged( StateChangedType nStateChange ) override;
-
- virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
-
- virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
-
- virtual css::uno::Reference<css::accessibility::XAccessible> getAccessible() override;
-
-protected:
-
- // Drawing item related functions, override them to make your own custom ones.
-
- void DrawItem (ThumbnailViewItem const *pItem);
-
- virtual void OnItemDblClicked (ThumbnailViewItem *pItem);
-
-protected:
-
- friend class ThumbnailViewAcc;
- friend class ThumbnailViewItemAcc;
- using Window::ImplInit;
-
- void CalculateItemPositions (bool bScrollBarUsed = false);
- void MakeItemVisible( sal_uInt16 nId );
-
- SFX2_DLLPRIVATE void ImplInit();
-
- virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
-
- SFX2_DLLPRIVATE void ImplDeleteItems();
- SFX2_DLLPRIVATE size_t ImplGetItem( const Point& rPoint ) const;
- SFX2_DLLPRIVATE ThumbnailViewItem* ImplGetItem( size_t nPos );
- SFX2_DLLPRIVATE virtual sal_uInt16 ImplGetVisibleItemCount() const override;
- SFX2_DLLPRIVATE virtual ThumbnailViewItem* ImplGetVisibleItem(sal_uInt16 nVisiblePos) override;
- SFX2_DLLPRIVATE void ImplFireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue );
- SFX2_DLLPRIVATE bool ImplHasAccessibleListeners();
- DECL_DLLPRIVATE_LINK( ImplScrollHdl, ScrollBar*, void );
-
-protected:
-
- std::vector< std::unique_ptr<ThumbnailViewItem> > mItemList;
- ThumbnailValueItemList mFilteredItemList; ///< Cache to store the filtered items
- ThumbnailValueItemList::iterator mpStartSelRange;
- VclPtr<ScrollBar> mpScrBar;
- tools::Long mnItemWidth;
- tools::Long mnItemHeight;
- tools::Long mnItemPadding;
- tools::Long mnThumbnailHeight; // Maximum height of the thumbnail
- tools::Long mnDisplayHeight; // Height of the data display box (name, etc)
- tools::Long mnVisLines;
- tools::Long mnLines;
-
- sal_uInt16 mnCols;
- sal_uInt16 mnFirstLine;
- bool mbScroll : 1;
- bool mbHasVisibleItems : 1;
- bool mbShowTooltips : 1;
- Color maFillColor; ///< Background color of the thumbnail view widget.
- Color maTextColor; ///< Text color.
- Color maHighlightColor; ///< Color of the highlight (background) of the hovered item.
- Color maHighlightTextColor; ///< Color of the text for the highlighted item.
- Color maSelectHighlightColor; ///< Color of the highlight (background) of the selected and hovered item.
- Color maSelectHighlightTextColor; ///< Color of the text of the selected and hovered item.
- double mfHighlightTransparence; ///< Transparence of the highlight.
-
- std::unique_ptr<ThumbnailItemAttributes> mpItemAttrs;
-
- std::function<bool (const ThumbnailViewItem*)> maFilterFunc;
-};
-
class SFX2_DLLPUBLIC SfxThumbnailView : public weld::CustomWidgetController, public ThumbnailViewBase
{
public:
@@ -387,6 +252,8 @@ public:
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ static BitmapEx readThumbnail(const OUString &msURL);
+
protected:
virtual bool KeyInput( const KeyEvent& rKEvt ) override;