diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-03-26 16:27:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-03-28 22:07:06 +0100 |
commit | 3e078e17ee2144fb976a7e6b9227152113cea0d4 (patch) | |
tree | 01faab7d3c82c5b027b42a6722700736b249a775 /include/sfx2 | |
parent | 1e2868296730d3548574f61a3c6e323aa5c0598a (diff) |
weld SfxTemplateManagerDlg
like expert configuration change the gear menu not to display a down indicator
and use CommandEvent to distinguish mouse/non-mouse context menus
Change-Id: I64bb660a9c7dacb5b90b240d9d76d29324c5fd9f
Reviewed-on: https://gerrit.libreoffice.org/69893
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/emojiviewitem.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/inputdlg.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/recentdocsviewitem.hxx | 9 | ||||
-rw-r--r-- | include/sfx2/templatedlg.hxx | 86 | ||||
-rw-r--r-- | include/sfx2/templatelocalview.hxx | 121 | ||||
-rw-r--r-- | include/sfx2/templateviewitem.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/thumbnailview.hxx | 184 | ||||
-rw-r--r-- | include/sfx2/thumbnailviewitem.hxx | 6 |
8 files changed, 354 insertions, 58 deletions
diff --git a/include/sfx2/emojiviewitem.hxx b/include/sfx2/emojiviewitem.hxx index 0ca32e78238f..e0aa57675f9a 100644 --- a/include/sfx2/emojiviewitem.hxx +++ b/include/sfx2/emojiviewitem.hxx @@ -15,7 +15,7 @@ class EmojiViewItem : public ThumbnailViewItem { public: - EmojiViewItem (ThumbnailView &rView, sal_uInt16 nId); + EmojiViewItem (ThumbnailViewBase &rView, sal_uInt16 nId); virtual ~EmojiViewItem () override; diff --git a/include/sfx2/inputdlg.hxx b/include/sfx2/inputdlg.hxx index 6f50e012e997..bd54b6a5de02 100644 --- a/include/sfx2/inputdlg.hxx +++ b/include/sfx2/inputdlg.hxx @@ -21,7 +21,7 @@ private: std::unique_ptr<weld::Button> m_xHelp; public: - InputDialog(weld::Window* pParent, const OUString &rLabelText); + InputDialog(weld::Widget* pParent, const OUString &rLabelText); OUString GetEntryText() const; void SetEntryText(const OUString& rStr); void HideHelpBtn(); diff --git a/include/sfx2/recentdocsviewitem.hxx b/include/sfx2/recentdocsviewitem.hxx index 8320d4710d81..2ee90de19f03 100644 --- a/include/sfx2/recentdocsviewitem.hxx +++ b/include/sfx2/recentdocsviewitem.hxx @@ -12,10 +12,15 @@ #include <sfx2/thumbnailview.hxx> +namespace sfx2 +{ + class RecentDocsView; +} + class RecentDocsViewItem final : public ThumbnailViewItem { public: - RecentDocsViewItem(ThumbnailView &rView, const OUString &rURL, + RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUString &rURL, const OUString &rTitle, const BitmapEx& rThumbnail, sal_uInt16 nId, long nThumbnailSize); /** Updates own highlight status based on the aPoint position. @@ -38,6 +43,8 @@ public: void OpenDocument(); private: + sfx2::RecentDocsView& mrParentView; + /// Return area where is the icon to remove document from the recent documents. tools::Rectangle getRemoveIconArea() const; diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx index 7f730c50161d..5e8a12853419 100644 --- a/include/sfx2/templatedlg.hxx +++ b/include/sfx2/templatedlg.hxx @@ -38,18 +38,16 @@ namespace com { } } } } -class SFX2_DLLPUBLIC SfxTemplateManagerDlg : public ModalDialog +class SFX2_DLLPUBLIC SfxTemplateManagerDlg : public weld::GenericDialogController { typedef bool (*selection_cmp_fn)(const ThumbnailViewItem*,const ThumbnailViewItem*); public: - SfxTemplateManagerDlg(vcl::Window *parent = nullptr); + SfxTemplateManagerDlg(weld::Window *parent); virtual ~SfxTemplateManagerDlg() override; - virtual void dispose() override; - virtual short Execute() override; - virtual bool EventNotify( NotifyEvent& rNEvt ) override; + virtual short run() override; void setDocumentModel (const css::uno::Reference<css::frame::XModel> &rModel); @@ -63,21 +61,19 @@ protected: void fillFolderComboBox(); - DECL_LINK(TBXDropdownHdl, ToolBox*, void); + DECL_LINK(SelectApplicationHdl, weld::ComboBox&, void); + DECL_LINK(SelectRegionHdl, weld::ComboBox&, void); - DECL_LINK(SelectApplicationHdl, ListBox&, void); - DECL_LINK(SelectRegionHdl, ListBox&, void); - - DECL_LINK(OkClickHdl, Button*, void); - DECL_LINK(MoveClickHdl, Button*, void); - DECL_LINK(ExportClickHdl, Button*, void); - DECL_LINK(ImportClickHdl, Button*, void); - DECL_STATIC_LINK(SfxTemplateManagerDlg, LinkClickHdl, Button*, void); + DECL_LINK(OkClickHdl, weld::Button&, void); + DECL_LINK(MoveClickHdl, weld::Button&, void); + DECL_LINK(ExportClickHdl, weld::Button&, void); + DECL_LINK(ImportClickHdl, weld::Button&, void); + DECL_STATIC_LINK(SfxTemplateManagerDlg, LinkClickHdl, weld::Button&, void); DECL_LINK(TVItemStateHdl, const ThumbnailViewItem*, void); - DECL_LINK(MenuSelectHdl, Menu*, bool); - DECL_LINK(DefaultTemplateMenuSelectHdl, Menu*, bool); + DECL_LINK(MenuSelectHdl, const OString&, void); + void DefaultTemplateMenuSelectHdl(const OString& rIdent); DECL_LINK(OpenRegionHdl, void*, void); DECL_LINK(CreateContextMenuHdl, ThumbnailViewItem*, void); @@ -86,8 +82,13 @@ protected: DECL_LINK(DeleteTemplateHdl, ThumbnailViewItem*, void); DECL_LINK(DefaultTemplateHdl, ThumbnailViewItem*, void); - DECL_LINK(SearchUpdateHdl, Edit&, void); - DECL_LINK(GetFocusHdl, Control&, void); + void SearchUpdate(); + + DECL_LINK(SearchUpdateHdl, weld::Entry&, void); + DECL_LINK(GetFocusHdl, weld::Widget&, void); + DECL_LINK(LoseFocusHdl, weld::Widget&, void); + DECL_LINK(ImplUpdateDataHdl, Timer*, void); + DECL_LINK(KeyInputHdl, const KeyEvent&, bool); void OnTemplateImportCategory(const OUString& sCategory); static void OnTemplateLink (); @@ -122,27 +123,28 @@ protected: FILTER_APPLICATION getCurrentApplicationFilter(); protected: - - VclPtr<Edit> mpSearchFilter; - VclPtr<ListBox> mpCBApp; - VclPtr<ListBox> mpCBFolder; - - VclPtr<PushButton> mpOKButton; - VclPtr<PushButton> mpMoveButton; - VclPtr<PushButton> mpExportButton; - VclPtr<PushButton> mpImportButton; - VclPtr<PushButton> mpLinkButton; - VclPtr<CheckBox> mpCBXHideDlg; - VclPtr<ToolBox> mpActionBar; - VclPtr<TemplateSearchView> mpSearchView; - VclPtr<TemplateLocalView> mpLocalView; - VclPtr<PopupMenu> mpActionMenu; - VclPtr<PopupMenu> mpTemplateDefaultMenu; - std::set<const ThumbnailViewItem*,selection_cmp_fn> maSelTemplates; - css::uno::Reference< css::frame::XModel > m_xModel; css::uno::Reference< css::frame::XDesktop2 > mxDesktop; + + Timer m_aUpdateDataTimer; + + std::unique_ptr<weld::Entry> mxSearchFilter; + std::unique_ptr<weld::ComboBox> mxCBApp; + std::unique_ptr<weld::ComboBox> mxCBFolder; + + std::unique_ptr<weld::Button> mxOKButton; + std::unique_ptr<weld::Button> mxMoveButton; + std::unique_ptr<weld::Button> mxExportButton; + std::unique_ptr<weld::Button> mxImportButton; + std::unique_ptr<weld::Button> mxLinkButton; + std::unique_ptr<weld::CheckButton> mxCBXHideDlg; + std::unique_ptr<weld::MenuButton> mxActionBar; + std::unique_ptr<TemplateSearchView> mxSearchView; + std::unique_ptr<SfxTemplateLocalView> mxLocalView; + std::unique_ptr<weld::Menu> mxTemplateDefaultMenu; + std::unique_ptr<weld::CustomWeld> mxSearchViewWeld; + std::unique_ptr<weld::CustomWeld> mxLocalViewWeld; }; // class SfxTemplateCategoryDialog ------------------------------------------------------------------- @@ -192,23 +194,21 @@ public: class SFX2_DLLPUBLIC SfxTemplateSelectionDlg : public SfxTemplateManagerDlg { public: - SfxTemplateSelectionDlg(vcl::Window *parent); + SfxTemplateSelectionDlg(weld::Window *parent); virtual ~SfxTemplateSelectionDlg() override; - virtual void dispose() override; - virtual short Execute() override; + virtual short run() override; OUString const & getTemplatePath() const { return msTemplatePath; }; - bool IsStartWithTemplate() const { return mpCBXHideDlg->IsChecked(); }; + bool IsStartWithTemplate() const { return mxCBXHideDlg->get_active(); }; private: DECL_LINK(OpenTemplateHdl, ThumbnailViewItem*, void); - DECL_LINK(OkClickHdl, Button*, void); + DECL_LINK(OkClickHdl, weld::Button&, void); - OUString msTemplatePath; + OUString msTemplatePath; }; - #endif // INCLUDED_SFX2_INC_TEMPLATEDLG_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx index b739549580a8..93282b9ae9d0 100644 --- a/include/sfx2/templatelocalview.hxx +++ b/include/sfx2/templatelocalview.hxx @@ -193,6 +193,127 @@ protected: std::vector<TemplateItemProperties > maAllTemplates; }; +class SFX2_DLLPUBLIC SfxTemplateLocalView : public SfxThumbnailView +{ + typedef bool (*selection_cmp_fn)(const ThumbnailViewItem*,const ThumbnailViewItem*); + +public: + + SfxTemplateLocalView(std::unique_ptr<weld::ScrolledWindow> xWindow, + std::unique_ptr<weld::Menu> xMenu); + + virtual ~SfxTemplateLocalView () override; + + // Fill view with new item list + void insertItems (const std::vector<TemplateItemProperties> &rTemplates, bool isRegionSelected = true, bool bShowCategoryInTooltip = false); + + // Fill view with template folders thumbnails + void Populate (); + + virtual void reload (); + + virtual void showAllTemplates (); + + void showRegion (TemplateContainerItem const *pItem); + + void showRegion (const OUString &rName); + + void createContextMenu(const bool bIsDefault ); + + void ContextMenuSelectHdl(const OString& rIdent); + + TemplateContainerItem* getRegion(OUString const & sStr); + + sal_uInt16 getRegionId (size_t pos) const; + + sal_uInt16 getRegionId (OUString const & sRegionName) const; + + OUString getRegionName(const sal_uInt16 nRegionId) const; + + OUString getRegionItemName(const sal_uInt16 nItemId) const; + + std::vector<OUString> getFolderNames (); + + std::vector<TemplateItemProperties> + getFilteredItems (const std::function<bool (const TemplateItemProperties&) > &rFunc) const; + + sal_uInt16 createRegion (const OUString &rName); + + bool renameRegion(const OUString &rTitle, const OUString &rNewTitle); + + bool removeRegion (const sal_uInt16 nItemId); + + bool removeTemplate (const sal_uInt16 nItemId, const sal_uInt16 nSrcItemId); + + bool moveTemplate (const ThumbnailViewItem* pItem, const sal_uInt16 nSrcItem, + const sal_uInt16 nTargetItem); + + void moveTemplates (const std::set<const ThumbnailViewItem*,selection_cmp_fn> &rItems, const sal_uInt16 nTargetItem); + + bool copyFrom(TemplateContainerItem *pItem, const OUString &rPath); + + bool exportTo (const sal_uInt16 nItemId, const sal_uInt16 nRegionItemId, const OUString &rName); + + virtual bool renameItem(ThumbnailViewItem* pItem, const OUString& sNewTitle) override; + + virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override; + + virtual bool ContextMenu(const CommandEvent& rPos) override; + + virtual bool KeyInput( const KeyEvent& rKEvt ) override; + + sal_uInt16 getCurRegionId () const { return mnCurRegionId;} + + void setOpenRegionHdl(const Link<void*,void> &rLink); + + void setCreateContextMenuHdl(const Link<ThumbnailViewItem*,void> &rLink); + + void setOpenTemplateHdl(const Link<ThumbnailViewItem*,void> &rLink); + + void setEditTemplateHdl(const Link<ThumbnailViewItem*,void> &rLink); + + void setDeleteTemplateHdl(const Link<ThumbnailViewItem*,void> &rLink); + + void setDefaultTemplateHdl(const Link<ThumbnailViewItem*,void> &rLink); + + void updateThumbnailDimensions(long itemMaxSize); + + void RemoveDefaultTemplateIcon( const OUString& rPath); + + static BitmapEx scaleImg (const BitmapEx &rImg, long width, long height); + + static BitmapEx getDefaultThumbnail( const OUString& rPath ); + + static BitmapEx fetchThumbnail (const OUString &msURL, long width, long height); + + static bool IsDefaultTemplate(const OUString& rPath); + +protected: + virtual void OnItemDblClicked(ThumbnailViewItem *pItem) override; + +protected: + sal_uInt16 mnCurRegionId; + + TemplateViewItem *maSelectedItem; + + long mnThumbnailWidth; + long mnThumbnailHeight; + + Point maPosition; //store the point of click event + + Link<void*,void> maOpenRegionHdl; + Link<ThumbnailViewItem*,void> maCreateContextMenuHdl; + Link<ThumbnailViewItem*,void> maOpenTemplateHdl; + Link<ThumbnailViewItem*,void> maEditTemplateHdl; + Link<ThumbnailViewItem*,void> maDeleteTemplateHdl; + Link<ThumbnailViewItem*,void> maDefaultTemplateHdl; + + std::unique_ptr<SfxDocumentTemplates> mpDocTemplates; + std::vector<std::unique_ptr<TemplateContainerItem> > maRegions; + std::vector<TemplateItemProperties > maAllTemplates; +}; + + #endif // INCLUDED_SFX2_TEMPLATELOCALVIEW_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/templateviewitem.hxx b/include/sfx2/templateviewitem.hxx index e64b82ec23a2..21433157f796 100644 --- a/include/sfx2/templateviewitem.hxx +++ b/include/sfx2/templateviewitem.hxx @@ -16,7 +16,7 @@ class TemplateViewItem : public ThumbnailViewItem { public: - TemplateViewItem (ThumbnailView &rView, sal_uInt16 nId); + TemplateViewItem (ThumbnailViewBase &rView, sal_uInt16 nId); virtual ~TemplateViewItem () override; diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx index 238004cdc67b..d1807f454583 100644 --- a/include/sfx2/thumbnailview.hxx +++ b/include/sfx2/thumbnailview.hxx @@ -18,6 +18,7 @@ #include <sfx2/thumbnailviewitem.hxx> #include <vcl/ctrl.hxx> +#include <vcl/customweld.hxx> #include <vcl/timer.hxx> #include <vcl/pngread.hxx> @@ -174,7 +175,26 @@ public: * **/ -class SFX2_DLLPUBLIC ThumbnailView : public Control +class SFX2_DLLPUBLIC ThumbnailViewBase +{ + friend class ThumbnailViewAcc; + friend class ThumbnailViewItemAcc; + + SFX2_DLLPRIVATE virtual sal_uInt16 ImplGetVisibleItemCount() const = 0; + SFX2_DLLPRIVATE virtual ThumbnailViewItem* ImplGetVisibleItem(sal_uInt16 nVisiblePos) = 0; + + virtual css::uno::Reference<css::accessibility::XAccessible> getAccessible() = 0; + +public: + /// Updates information in the view; used only in RecentDocsView ATM. + virtual void Reload() {} + + virtual bool renameItem(ThumbnailViewItem* pItem, const OUString& sNewTitle); + + virtual ~ThumbnailViewBase(); +}; + +class SFX2_DLLPUBLIC ThumbnailView : public Control, public ThumbnailViewBase { public: @@ -191,9 +211,6 @@ public: virtual void Clear(); - /// Updates information in the view; used only in RecentDocsView ATM. - virtual void Reload() {} - // Change current thumbnail item list with new one (invalidates all pointers to a thumbnail item) void updateItems(std::vector<std::unique_ptr<ThumbnailViewItem>> items); @@ -232,8 +249,6 @@ public: virtual void Resize() override; - virtual bool renameItem(ThumbnailViewItem* pItem, const OUString& sNewTitle); - static BitmapEx readThumbnail(const OUString &msURL); protected: @@ -256,6 +271,8 @@ protected: 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. @@ -280,8 +297,8 @@ protected: SFX2_DLLPRIVATE void ImplDeleteItems(); SFX2_DLLPRIVATE size_t ImplGetItem( const Point& rPoint ) const; SFX2_DLLPRIVATE ThumbnailViewItem* ImplGetItem( size_t nPos ); - SFX2_DLLPRIVATE sal_uInt16 ImplGetVisibleItemCount() const; - SFX2_DLLPRIVATE ThumbnailViewItem* ImplGetVisibleItem( sal_uInt16 nVisiblePos ); + 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 ); @@ -320,6 +337,157 @@ protected: std::function<bool (const ThumbnailViewItem*)> maFilterFunc; }; +class SFX2_DLLPUBLIC SfxThumbnailView : public weld::CustomWidgetController, public ThumbnailViewBase +{ +public: + SfxThumbnailView(std::unique_ptr<weld::ScrolledWindow> xWindow, std::unique_ptr<weld::Menu> xMenu); + + virtual ~SfxThumbnailView() override; + + virtual bool MouseMove(const MouseEvent& rMEvt) override; + + void AppendItem(std::unique_ptr<ThumbnailViewItem> pItem); + + void RemoveItem(sal_uInt16 nItemId); + + 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; + + sal_uInt16 getNextItemId () const; + + void setItemMaxTextLength (sal_uInt32 nLength); + + void setItemDimensions (long ItemWidth, long ThumbnailHeight, + 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 SetMultiSelectionEnabled( bool bIsMultiSelectionEnabled ); + + void filterItems (const std::function<bool (const ThumbnailViewItem*) > &func); + + void setItemStateHdl (const Link<const ThumbnailViewItem*,void> &aLink) { maItemStateHdl = aLink; } + + virtual void Resize() override; + + static BitmapEx readThumbnail(const OUString &msURL); + + virtual void Show() override + { + mxScrolledWindow->show(); + CustomWidgetController::Show(); + } + + virtual void Hide() override + { + mxScrolledWindow->hide(); + CustomWidgetController::Hide(); + } + + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; + +protected: + + 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; + + 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 SfxThumbnailViewAcc; + friend class ThumbnailViewItemAcc; + + void CalculateItemPositions (bool bScrollBarUsed = false); + void MakeItemVisible( sal_uInt16 nId ); + + SFX2_DLLPRIVATE void ImplInit(); + + 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, weld::ScrolledWindow&, void ); + +protected: + + std::vector< std::unique_ptr<ThumbnailViewItem> > mItemList; + css::uno::Reference<css::accessibility::XAccessible> mxAccessible; + ThumbnailValueItemList mFilteredItemList; ///< Cache to store the filtered items + ThumbnailValueItemList::iterator mpStartSelRange; + long mnItemWidth; + long mnItemHeight; + long mnItemPadding; + long mnThumbnailHeight; // Maximum height of the thumbnail + long mnDisplayHeight; // Height of the data display box (name, etc) + long mnVisLines; + long mnLines; + + sal_uInt16 mnCols; + sal_uInt16 mnFirstLine; + bool mbScroll : 1; + bool mbHasVisibleItems : 1; + bool mbShowTooltips : 1; + bool mbIsMultiSelectionEnabled: 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. + + Link<const ThumbnailViewItem*, void> maItemStateHdl; + std::unique_ptr<ThumbnailItemAttributes> mpItemAttrs; + std::unique_ptr<weld::ScrolledWindow> mxScrolledWindow; + std::unique_ptr<weld::Menu> mxContextMenu; + + std::function<bool (const ThumbnailViewItem*)> maFilterFunc; +}; + + #endif // INCLUDED_SFX2_THUMBNAILVIEW_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx index 3568da70d31b..26cb96966967 100644 --- a/include/sfx2/thumbnailviewitem.hxx +++ b/include/sfx2/thumbnailviewitem.hxx @@ -32,7 +32,7 @@ const int THUMBNAILVIEW_ITEM_CORNER = 5; -class ThumbnailView; +class ThumbnailViewBase; class MouseEvent; namespace basegfx { @@ -67,7 +67,7 @@ class SFX2_DLLPUBLIC ThumbnailViewItem { public: - ThumbnailView &mrParent; + ThumbnailViewBase &mrParent; sal_uInt16 const mnId; bool mbVisible; bool mbSelected; @@ -77,7 +77,7 @@ public: OUString maHelpText; css::uno::Reference< css::accessibility::XAccessible > mxAcc; - ThumbnailViewItem (ThumbnailView &rView, sal_uInt16 nId); + ThumbnailViewItem (ThumbnailViewBase &rView, sal_uInt16 nId); virtual ~ThumbnailViewItem (); |