Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef _SVX_OPTCHART_HXX
21 : #define _SVX_OPTCHART_HXX
22 :
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>
34 :
35 : #include "cfgchart.hxx"
36 :
37 0 : class ChartColorLB : public ColorLB
38 : {
39 : public:
40 0 : ChartColorLB( Window* pParent, ResId Id ) : ColorLB( pParent, Id ) {}
41 : ChartColorLB( Window* pParent, WinBits aWB ) : ColorLB( pParent, aWB ) {}
42 :
43 : void FillBox( const SvxChartColorTable & rTab );
44 : };
45 :
46 :
47 : class SvxDefaultColorOptPage : public SfxTabPage
48 : {
49 :
50 : private:
51 : FixedLine aGbChartColors;
52 : ChartColorLB aLbChartColors;
53 : FixedLine aGbColorBox;
54 : ValueSet aValSetColorBox;
55 : PushButton aPBDefault;
56 : PushButton aPBAdd;
57 : PushButton aPBRemove;
58 :
59 : SvxChartOptions* pChartOptions;
60 : SvxChartColorTableItem* pColorConfig;
61 : XColorListRef pColorList;
62 :
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 *);
68 :
69 : void FillColorBox();
70 : long GetColorIndex( const Color& rCol );
71 :
72 : public:
73 : SvxDefaultColorOptPage( Window* pParent, const SfxItemSet& rInAttrs );
74 : virtual ~SvxDefaultColorOptPage();
75 :
76 : void Construct();
77 :
78 : static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs );
79 : virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs );
80 : virtual void Reset( const SfxItemSet& rInAttrs );
81 : };
82 :
83 : #endif // _SVX_OPTCHART_HXX
84 :
85 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|