fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / sc / source / ui / inc / condformatmgr.hxx
blob45bd6998c00c8215fab29892eccf7698ab9b604f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #include "sc.hrc"
12 #include <vcl/dialog.hxx>
13 #include <svtools/svtabbx.hxx>
14 #include <vcl/button.hxx>
15 #include <vcl/fixed.hxx>
16 #include <svtools/headbar.hxx>
18 #include "conditio.hxx"
20 #include <map>
22 class ScDocument;
24 class ScCondFormatManagerWindow : public SvTabListBox
26 private:
27 void Init();
28 String createEntryString(const ScConditionalFormat& rFormat);
30 HeaderBar maHeaderBar;
31 ScDocument* mpDoc;
32 ScConditionalFormatList* mpFormatList;
33 std::map<SvTreeListEntry*, sal_Int32> maMapLBoxEntryToCondIndex;
35 DECL_LINK( HeaderEndDragHdl, void* );
37 public:
38 ScCondFormatManagerWindow( Window* pParent, ScDocument* pDoc, ScConditionalFormatList* pFormatList );
40 void DeleteSelection();
41 ScConditionalFormat* GetSelection();
42 void Update();
45 class ScCondFormatManagerCtrl : Control
47 public:
48 ScCondFormatManagerCtrl(Window* pParent, ScDocument* pDoc, ScConditionalFormatList* pFormatList);
50 ScConditionalFormat* GetSelection();
51 void DeleteSelection();
52 void Update();
53 ScCondFormatManagerWindow &GetListControl() { return maWdManager; }
55 private:
56 ScCondFormatManagerWindow maWdManager;
59 class ScCondFormatManagerDlg : public ModalDialog
61 public:
62 ScCondFormatManagerDlg(Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList, const ScAddress& rPos);
63 ~ScCondFormatManagerDlg();
65 ScConditionalFormatList* GetConditionalFormatList();
67 bool CondFormatsChanged();
69 virtual bool IsInRefMode() const;
71 private:
72 PushButton maBtnAdd;
73 PushButton maBtnRemove;
74 PushButton maBtnEdit;
76 OKButton maBtnOk;
77 CancelButton maBtnCancel;
79 FixedLine maFlLine;
81 ScConditionalFormatList* mpFormatList;
83 ScCondFormatManagerCtrl maCtrlManager;
85 ScDocument* mpDoc;
86 ScAddress maPos;
88 DECL_LINK(RemoveBtnHdl, void*);
89 DECL_LINK(EditBtnHdl, void*);
90 DECL_LINK(AddBtnHdl, void*);
92 bool mbModified;
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */