Use correct object
[LibreOffice.git] / cui / source / options / optcolor.hxx
blobd2d487bdc2fcf9b21ba112f7fc794d9294cda2d1
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #pragma once
21 #include <sfx2/tabdlg.hxx>
23 namespace svtools {class EditableColorConfig;class EditableExtendedColorConfig;}
24 class ColorConfigCtrl_Impl;
25 class AbstractSvxNameDialog;
26 struct ImplSVEvent;
28 class SvxColorOptionsTabPage : public SfxTabPage
30 bool bFillItemSetCalled;
31 bool m_bShowRestartDialog;
33 ImplSVEvent* m_nSizeAllocEventId;
35 std::unique_ptr<weld::ComboBox> m_xAutoColorLB;
36 std::unique_ptr<weld::Widget> m_xAutoColorImg;
37 std::unique_ptr<weld::ComboBox> m_xColorSchemeLB;
38 std::unique_ptr<weld::Widget> m_xColorSchemeImg;
39 std::unique_ptr<weld::Button> m_xSaveSchemePB;
40 std::unique_ptr<weld::Button> m_xDeleteSchemePB;
41 std::unique_ptr<ColorConfigCtrl_Impl> m_xColorConfigCT;
42 std::unique_ptr<weld::Widget> m_xTable;
43 std::unique_ptr<weld::Label> m_xOnFT;
44 std::unique_ptr<weld::Label> m_xColorFT;
46 weld::Widget& m_rWidget1;
47 weld::Widget& m_rWidget2;
49 std::unique_ptr<svtools::EditableColorConfig> pColorConfig;
50 std::unique_ptr<svtools::EditableExtendedColorConfig> pExtColorConfig;
52 DECL_LINK(SchemeChangedHdl_Impl, weld::ComboBox&, void);
53 DECL_LINK(onAutoColorChanged, weld::ComboBox&, void);
54 DECL_LINK(SaveDeleteHdl_Impl, weld::Button&, void);
55 DECL_LINK(CheckNameHdl_Impl, AbstractSvxNameDialog&, bool);
56 DECL_LINK(AdjustHeaderBar, const Size&, void);
57 DECL_LINK(PostAdjustHeaderBar, void *, void);
58 void UpdateColorConfig();
60 public:
61 SvxColorOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
62 virtual ~SvxColorOptionsTabPage() override;
64 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
66 virtual OUString GetAllStrings() override;
68 virtual bool FillItemSet( SfxItemSet* rSet ) override;
69 virtual void Reset( const SfxItemSet* rSet ) override;
71 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
72 virtual void FillUserData() override;
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */