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/.
10 #ifndef INCLUDED_SC_SOURCE_UI_INC_CONDFORMATMGR_HXX
11 #define INCLUDED_SC_SOURCE_UI_INC_CONDFORMATMGR_HXX
15 #include <vcl/dialog.hxx>
16 #include <vcl/layout.hxx>
17 #include <svtools/svtabbx.hxx>
18 #include <vcl/button.hxx>
19 #include <vcl/fixed.hxx>
20 #include <svtools/simptabl.hxx>
22 #include "conditio.hxx"
28 class ScCondFormatManagerWindow
: public SvSimpleTable
32 OUString
createEntryString(const ScConditionalFormat
& rFormat
);
36 ScConditionalFormatList
* mpFormatList
;
37 std::map
<SvTreeListEntry
*, sal_Int32
> maMapLBoxEntryToCondIndex
;
40 ScCondFormatManagerWindow(SvSimpleTableContainer
& rParent
, ScDocument
* pDoc
, ScConditionalFormatList
* pFormatList
);
42 void DeleteSelection();
43 ScConditionalFormat
* GetSelection();
44 virtual void Resize() override
;
47 class ScCondFormatManagerDlg
: public ModalDialog
50 ScCondFormatManagerDlg(vcl::Window
* pParent
, ScDocument
* pDoc
, const ScConditionalFormatList
* pFormatList
);
51 virtual ~ScCondFormatManagerDlg();
52 virtual void dispose() override
;
54 ScConditionalFormatList
* GetConditionalFormatList();
56 bool CondFormatsChanged() const;
59 ScConditionalFormat
* GetCondFormatSelected();
62 VclPtr
<PushButton
> m_pBtnAdd
;
63 VclPtr
<PushButton
> m_pBtnRemove
;
64 VclPtr
<PushButton
> m_pBtnEdit
;
65 ScConditionalFormatList
* mpFormatList
;
66 VclPtr
<ScCondFormatManagerWindow
> m_pCtrlManager
;
70 DECL_LINK_TYPED(RemoveBtnHdl
, Button
*, void);
71 DECL_LINK_TYPED(EditBtnClickHdl
, Button
*, void);
72 DECL_LINK_TYPED(AddBtnHdl
, Button
*, void);
73 DECL_LINK_TYPED(EditBtnHdl
, SvTreeListBox
*, bool);
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */