From 9b498e2b88ffae77717bab2f7a308b83d0a7ae80 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 1 Jun 2020 10:39:30 +0100 Subject: add separators to TreeView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5e49913dfac82c1243d16ed0a0267a3647f51311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95270 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- include/vcl/treelistentry.hxx | 4 +++- include/vcl/weld.hxx | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/vcl/treelistentry.hxx b/include/vcl/treelistentry.hxx index 8cc808bb09c1..093fa1751d8e 100644 --- a/include/vcl/treelistentry.hxx +++ b/include/vcl/treelistentry.hxx @@ -39,13 +39,15 @@ enum class SvTLEntryFlags DISABLE_DROP = 0x0002, // is set if RequestingChildren has not set any children NO_NODEBMP = 0x0004, + // is set if this is a separator line + IS_SEPARATOR = 0x0008, // entry had or has children HAD_CHILDREN = 0x0010, SEMITRANSPARENT = 0x8000, // draw semi-transparent entry bitmaps }; namespace o3tl { - template<> struct typed_flags : is_typed_flags {}; + template<> struct typed_flags : is_typed_flags {}; } class VCL_DLLPUBLIC SvTreeListEntry diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 9d01a0fc7022..d8d6b1a0492d 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -888,6 +888,9 @@ public: insert(nullptr, -1, &rStr, &rId, nullptr, &rImage, nullptr, false, nullptr); } + virtual void insert_separator(int pos, const OUString& rId) = 0; + void append_separator(const OUString& rId) { insert_separator(-1, rId); } + void connect_changed(const Link& rLink) { m_aChangeHdl = rLink; } /* A row is "activated" when the user double clicks a treeview row. It may -- cgit