1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 #include <vcl/weld.hxx>
15 class ScConditionalFormat
;
16 class ScConditionalFormatList
;
18 class ScCondFormatManagerWindow
24 weld::TreeView
& mrTreeView
;
26 ScConditionalFormatList
* mpFormatList
;
29 ScCondFormatManagerWindow(weld::TreeView
& rTreeView
, ScDocument
& rDoc
, ScConditionalFormatList
* pFormatList
);
31 void DeleteSelection();
32 ScConditionalFormat
* GetSelection();
35 class ScCondFormatManagerDlg
: public weld::GenericDialogController
38 ScCondFormatManagerDlg(weld::Window
* pParent
, ScDocument
& rDoc
, const ScConditionalFormatList
* pFormatList
);
39 virtual ~ScCondFormatManagerDlg() override
;
41 std::unique_ptr
<ScConditionalFormatList
> GetConditionalFormatList();
43 bool CondFormatsChanged() const;
46 ScConditionalFormat
* GetCondFormatSelected();
50 std::unique_ptr
<ScConditionalFormatList
> m_xFormatList
;
52 std::unique_ptr
<weld::Button
> m_xBtnAdd
;
53 std::unique_ptr
<weld::Button
> m_xBtnRemove
;
54 std::unique_ptr
<weld::Button
> m_xBtnEdit
;
55 std::unique_ptr
<weld::TreeView
> m_xTreeView
;
56 std::unique_ptr
<ScCondFormatManagerWindow
> m_xCtrlManager
;
58 void UpdateButtonSensitivity();
60 DECL_LINK(RemoveBtnHdl
, weld::Button
&, void);
61 DECL_LINK(EditBtnClickHdl
, weld::Button
&, void);
62 DECL_LINK(AddBtnHdl
, weld::Button
&, void);
63 DECL_LINK(EditBtnHdl
, weld::TreeView
&, bool);
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */