diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-03-26 15:24:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-03-27 12:02:12 +0100 |
commit | 1a7489039e8acbd9499276fdb6e747e11d3ecffe (patch) | |
tree | 224cbaab534789ecd994452f39f32b0eae9028f3 /include | |
parent | fdb1dc8062f969f4dde038d116b631479ec796b6 (diff) |
add text alignment support to treeview entries
Change-Id: I3ebbaf7b722ad9b6f2b8fadb443053ea816d1643
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91147
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/svlbitm.hxx | 3 | ||||
-rw-r--r-- | include/vcl/vclenum.hxx | 7 | ||||
-rw-r--r-- | include/vcl/weld.hxx | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/include/vcl/svlbitm.hxx b/include/vcl/svlbitm.hxx index b5d00aa95f6b..dc8cde9bcb02 100644 --- a/include/vcl/svlbitm.hxx +++ b/include/vcl/svlbitm.hxx @@ -105,6 +105,7 @@ class VCL_DLLPUBLIC SvLBoxString : public SvLBoxItem { private: bool mbEmphasized; + double mfAlign; protected: OUString maText; @@ -120,6 +121,8 @@ public: virtual int CalcWidth(const SvTreeListBox* pView) const override; + void Align(double fAlign) { mfAlign = fAlign; } + void Emphasize(bool bEmphasize) { mbEmphasized = bEmphasize; } bool IsEmphasized() const { return mbEmphasized; } diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx index b5423b46e5de..4175c5f37c41 100644 --- a/include/vcl/vclenum.hxx +++ b/include/vcl/vclenum.hxx @@ -276,6 +276,13 @@ enum class VclPolicyType NEVER }; +enum class VclTextAlignment +{ + LEFT, + CENTER, + RIGHT +}; + enum class WizardButtonFlags : sal_Int16 { NONE = 0x0000, diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index b7bf769063c6..35e474ca4a3b 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -854,6 +854,7 @@ public: = 0; virtual void set_text_emphasis(int row, bool bOn, int col) = 0; virtual bool get_text_emphasis(int row, int col) const = 0; + virtual void set_text_align(int row, double fAlign, int col) = 0; virtual void swap(int pos1, int pos2) = 0; virtual std::vector<int> get_selected_rows() const = 0; virtual void set_font_color(int pos, const Color& rColor) = 0; @@ -939,6 +940,7 @@ public: virtual void set_sensitive(const TreeIter& rIter, bool bSensitive, int col = -1) = 0; virtual void set_text_emphasis(const TreeIter& rIter, bool bOn, int col) = 0; virtual bool get_text_emphasis(const TreeIter& rIter, int col) const = 0; + virtual void set_text_align(const TreeIter& rIter, double fAlign, int col) = 0; virtual void set_toggle(const TreeIter& rIter, TriState bOn, int col) = 0; virtual TriState get_toggle(const TreeIter& rIter, int col) const = 0; virtual OUString get_text(const TreeIter& rIter, int col = -1) const = 0; |