diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-12-10 11:32:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-12-12 13:01:28 +0100 |
commit | 6236051a3496278fe2768b40ebf1f4e82a44bb44 (patch) | |
tree | e2d83af4598ad8b13e4bda6f269acc4b7554c54f /include/vcl | |
parent | 3911bf8364dae4c855ad37237c114f9007f70657 (diff) |
weld SwAddStylesDlg
Change-Id: I1dfdf0cea69585991bc0fa8dc38ebdf78abe97bf
Reviewed-on: https://gerrit.libreoffice.org/64976
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/svlbitm.hxx | 3 | ||||
-rw-r--r-- | include/vcl/weld.hxx | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/include/vcl/svlbitm.hxx b/include/vcl/svlbitm.hxx index 854c4666d50e..cd8001614195 100644 --- a/include/vcl/svlbitm.hxx +++ b/include/vcl/svlbitm.hxx @@ -84,10 +84,11 @@ public: // as buttons are not derived from LinkHdl void CallLink(); - void StoreButtonState( SvTreeListEntry* pEntry ); + void StoreButtonState(SvTreeListEntry* pActEntry, SvLBoxButton* pActBox); static SvButtonState ConvertToButtonState( SvItemStateFlags nItemFlags ); SvTreeListEntry* GetActEntry() const; + SvLBoxButton* GetActBox() const; void SetImage(SvBmp nIndex, const Image& aImage) { aBmps[static_cast<int>(nIndex)] = aImage; } Image& GetImage(SvBmp nIndex) { return aBmps[static_cast<int>(nIndex)]; } diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 028419f117ab..7edfba8b7496 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -403,12 +403,20 @@ class VCL_DLLPUBLIC TreeView : virtual public Container protected: Link<TreeView&, void> m_aChangeHdl; Link<TreeView&, void> m_aRowActivatedHdl; + Link<const std::pair<int, int>&, void> m_aRadioToggleHdl; // if handler returns false, the expansion of the row is refused Link<TreeIter&, bool> m_aExpandingHdl; + std::vector<int> m_aRadioIndexes; + void signal_changed() { m_aChangeHdl.Call(*this); } void signal_row_activated() { m_aRowActivatedHdl.Call(*this); } bool signal_expanding(TreeIter& rIter) { return m_aExpandingHdl.Call(rIter); } + // arg is pair<row,col> + void signal_radio_toggled(const std::pair<int, int>& rRowCol) + { + m_aRadioToggleHdl.Call(rRowCol); + } public: virtual void insert(weld::TreeIter* pParent, int pos, const OUString* pStr, const OUString* pId, @@ -451,6 +459,10 @@ public: void connect_changed(const Link<TreeView&, void>& rLink) { m_aChangeHdl = rLink; } void connect_row_activated(const Link<TreeView&, void>& rLink) { m_aRowActivatedHdl = rLink; } + void connect_radio_toggled(const Link<const std::pair<int, int>&, void>& rLink) + { + m_aRadioToggleHdl = rLink; + } //by index virtual int get_selected_index() const = 0; @@ -531,9 +543,12 @@ public: virtual void set_column_fixed_widths(const std::vector<int>& rWidths) = 0; virtual OUString get_column_title(int nColumn) const = 0; + virtual void set_column_title(int nColumn, const OUString& rTitle) = 0; virtual void set_selection_mode(SelectionMode eMode) = 0; virtual int count_selected_rows() const = 0; + + void set_toggle_columns_as_radio(const std::vector<int>& rCols) { m_aRadioIndexes = rCols; } }; class VCL_DLLPUBLIC Button : virtual public Container |