summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-05-30 10:37:53 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-06-01 16:30:11 +0200
commitc2253f587b68f7277f30259160155f2bbf7adc78 (patch)
tree505d51b324b3c8464704c704313dc016949820a3 /include/vcl
parent1dbf0f53e2e690a3914512785cad1a2f0f46e45d (diff)
Introduce weld::IconView::insert_separator
Needed to eventual re-implementation of starmath's SmElementsControl using IconView. This required re-implementation of IconViewImpl, to layout entries by iteration, because now it's impossible to find an entry position just based on its index. This coincidentally fixed some visual glitches in non-gtk IconView implementation from commit 5813660e7bfe128ac076e592fe31de64a6863780 Author Szymon Kłos <eszkadev@gmail.com> Date Tue Feb 16 16:03:30 2016 +0100 icon view for RemoteFilesDialog where any selected element could become first in row when scrolling. SvTreeListBox::SetEntryHeight taking a SvTreeListEntry const* had to be renamed to CalcEntryHeight, to avoid both virtual and non-virtual overloads, additionally having different accessibility. A TODO is implement separators in GtkInstanceIconView. I couldn't find a GTK API for separators in IconView, so possibly a workaround would be needed with some non-selectable narrow elements. Change-Id: Ie8dc35d94049a1c48e4eb49697681ffbe93c17f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135112 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/toolkit/treelistbox.hxx2
-rw-r--r--include/vcl/weld.hxx4
2 files changed, 5 insertions, 1 deletions
diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx
index 685540b2d858..7e21dfda21e7 100644
--- a/include/vcl/toolkit/treelistbox.hxx
+++ b/include/vcl/toolkit/treelistbox.hxx
@@ -476,7 +476,7 @@ public:
protected:
- VCL_DLLPRIVATE void SetEntryHeight( SvTreeListEntry const * pEntry );
+ virtual void CalcEntryHeight(SvTreeListEntry const* pEntry);
void AdjustEntryHeight( const Image& rBmp );
VCL_DLLPRIVATE void AdjustEntryHeight();
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index dba513870818..528405643716 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1361,6 +1361,8 @@ public:
const VirtualDevice* pIcon, TreeIter* pRet)
= 0;
+ virtual void insert_separator(int pos, const OUString* pId) = 0;
+
void append(const OUString& rId, const OUString& rStr, const OUString& rImage)
{
insert(-1, &rStr, &rId, &rImage, nullptr);
@@ -1371,6 +1373,8 @@ public:
insert(-1, &rStr, &rId, pImage, nullptr);
}
+ void append_separator(const OUString& rId) { insert_separator(-1, &rId); }
+
void connect_selection_changed(const Link<IconView&, void>& rLink)
{
m_aSelectionChangeHdl = rLink;