summaryrefslogtreecommitdiff
path: root/include/svtools
diff options
context:
space:
mode:
authorPalenik Mihály <palenik.mihaly@gmail.com>2014-09-27 21:16:01 +0200
committerSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2014-09-30 21:00:59 +0000
commit0ada00bd9b4f10861d37b8802564a2ace7385aa2 (patch)
treefe0320f39561af45c0ba7fa9dfd8094d31de0b81 /include/svtools
parent9bb04da4bb18342a107bb843d8054e178d97ae28 (diff)
Improve SvTreeListBox class
It is possible to set alternating rows. Expert Configuration dialog use it. Change-Id: Ie43a87ca05be73fdb345fa4866f31c2c36b7cdf1 Reviewed-on: https://gerrit.libreoffice.org/11663 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Diffstat (limited to 'include/svtools')
-rw-r--r--include/svtools/treelistbox.hxx4
-rw-r--r--include/svtools/treelistentry.hxx4
2 files changed, 8 insertions, 0 deletions
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index ac8a2812d569..f54f32439d5d 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -236,6 +236,7 @@ class SVT_DLLPUBLIC SvTreeListBox
sal_uInt16 nLastSelTab;
long mnCheckboxItemWidth;
bool mbContextBmpExpanded;
+ bool mbAlternatingRowColor;
SvTreeListEntry* pHdlEntry;
SvLBoxItem* pHdlItem;
@@ -778,6 +779,9 @@ public:
long getPreferredDimensions(std::vector<long> &rWidths) const;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
+
+ void SetAlternatingRow( const bool bEnable );
+ bool IsRowAlternating() const { return mbAlternatingRowColor; }
};
#define SV_LBOX_DD_FORMAT "SV_LBOX_DD_FORMAT"
diff --git a/include/svtools/treelistentry.hxx b/include/svtools/treelistentry.hxx
index 71ff072b3fef..2692becba87e 100644
--- a/include/svtools/treelistentry.hxx
+++ b/include/svtools/treelistentry.hxx
@@ -56,6 +56,7 @@ class SVT_DLLPUBLIC SvTreeListEntry
bool bIsMarked;
void* pUserData;
sal_uInt16 nEntryFlags;
+ Color maBackColor;
private:
void ClearChildren();
@@ -101,6 +102,9 @@ public:
bool GetIsMarked() const { return bIsMarked; }
void SetMarked( bool IsMarked ) { bIsMarked = IsMarked; }
+
+ void SetBackColor( const Color& aColor ) { maBackColor = aColor; }
+ Color GetBackColor() const { return maBackColor; }
};
#endif