diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-12-08 15:09:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-12-08 17:37:54 +0100 |
commit | f68ee0c6fca2d0d1be0c9409ae89e46736190d9c (patch) | |
tree | f618bd9a4e4f919710960e758ecbb9054ffe5428 /include | |
parent | c92c0776829aaa04b924bf970396a312994af8d0 (diff) |
only autopopup on mouse hover, not keyboard traversal
Change-Id: I4ec5c5c1d5a450a0d8531907da85216000cd6c4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126547
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/toolkit/treelistbox.hxx | 4 | ||||
-rw-r--r-- | include/vcl/weld.hxx | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx index 999f3a52c6b6..69c07b422094 100644 --- a/include/vcl/toolkit/treelistbox.hxx +++ b/include/vcl/toolkit/treelistbox.hxx @@ -220,6 +220,7 @@ class VCL_DLLPUBLIC SvTreeListBox bool mbQuickSearch; // Enables type-ahead search in the check list box. bool mbActivateOnSingleClick; // Make single click "activate" a row like a double-click normally does bool mbHoverSelection; // Make mouse over a row "select" a row like a single-click normally does + bool mbSelectingByHover; // true during "Select" if it was due to hover sal_Int8 mnClicksToToggle; // 0 == Click on a row not toggle its checkbox. // 1 == Every click on row toggle its checkbox. // 2 == First click select, second click toggle. @@ -677,6 +678,9 @@ public: void SetHoverSelection(bool bEnable) { mbHoverSelection = bEnable; } bool GetHoverSelection() const { return mbHoverSelection; } + // only true during Select if the Select is due to a Hover + bool IsSelectDueToHover() const { return mbSelectingByHover; } + // Set when clicks toggle the checkbox of the row. void SetClicksToToggle(sal_Int8 nCount) { mnClicksToToggle = nCount; } diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 561baaaa256b..d296f1bbdd4a 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -1277,6 +1277,10 @@ public: // remove the selected nodes virtual void remove_selection() = 0; + // only meaningful is call this from a "changed" callback, true if the change + // was due to mouse hovering over the entry + virtual bool changed_by_hover() const = 0; + virtual void vadjustment_set_value(int value) = 0; virtual int vadjustment_get_value() const = 0; |