Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / cui / source / options / optchart.hxx
blob9d70ac411f42879caec69af64fa97cfdd3bb5180
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 .
20 #ifndef _SVX_OPTCHART_HXX
21 #define _SVX_OPTCHART_HXX
23 // header for SfxTabPage
24 #include <sfx2/tabdlg.hxx>
25 #include <vcl/fixed.hxx>
26 // header for ValueSet
27 #include <svtools/valueset.hxx>
28 // header for ColorLB
29 #include <svx/dlgctrl.hxx>
30 // header for PushButton
31 #include <vcl/button.hxx>
32 // header for XColorList
33 #include <svx/xtable.hxx>
35 #include "cfgchart.hxx"
37 class ChartColorLB : public ColorLB
39 public:
40 ChartColorLB( Window* pParent, ResId Id ) : ColorLB( pParent, Id ) {}
41 ChartColorLB( Window* pParent, WinBits aWB ) : ColorLB( pParent, aWB ) {}
43 void FillBox( const SvxChartColorTable & rTab );
47 class SvxDefaultColorOptPage : public SfxTabPage
50 private:
51 FixedLine aGbChartColors;
52 ChartColorLB aLbChartColors;
53 FixedLine aGbColorBox;
54 ValueSet aValSetColorBox;
55 PushButton aPBDefault;
56 PushButton aPBAdd;
57 PushButton aPBRemove;
59 SvxChartOptions* pChartOptions;
60 SvxChartColorTableItem* pColorConfig;
61 XColorListRef pColorList;
63 DECL_LINK( ResetToDefaults, void * );
64 DECL_LINK( AddChartColor, void * );
65 DECL_LINK( RemoveChartColor, PushButton * );
66 DECL_LINK( ListClickedHdl, ChartColorLB * );
67 DECL_LINK(BoxClickedHdl, void *);
69 void FillColorBox();
70 long GetColorIndex( const Color& rCol );
72 public:
73 SvxDefaultColorOptPage( Window* pParent, const SfxItemSet& rInAttrs );
74 virtual ~SvxDefaultColorOptPage();
76 void Construct();
78 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs );
79 virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs );
80 virtual void Reset( const SfxItemSet& rInAttrs );
83 #endif // _SVX_OPTCHART_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */