fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / controller / inc / res_ErrorBar.hxx
blob85917809db4848901cb91ac54884c61be625926b
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 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_ERRORBAR_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_ERRORBAR_HXX
22 #include <vcl/button.hxx>
23 #include <sfx2/tabdlg.hxx>
24 #include <vcl/fixed.hxx>
25 #include <vcl/field.hxx>
26 #include <vcl/lstbox.hxx>
27 #include <svl/itemset.hxx>
28 #include <svx/chrtitem.hxx>
29 #include "chartview/ChartSfxItemIds.hxx"
30 #include "RangeSelectionListener.hxx"
32 #include <com/sun/star/chart2/XChartDocument.hpp>
34 class Dialog;
36 namespace chart
39 class RangeSelectionHelper;
41 class ErrorBarResources : public RangeSelectionListenerParent
43 public:
44 enum tErrorBarType
46 ERROR_BAR_X,
47 ERROR_BAR_Y
50 ErrorBarResources(
51 VclBuilderContainer* pParent, Dialog* pParentDialog, const SfxItemSet& rInAttrs, bool bNoneAvailable, chart::ErrorBarResources::tErrorBarType eType = ERROR_BAR_Y );
52 virtual ~ErrorBarResources();
54 void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
55 void SetErrorBarType( tErrorBarType eNewType );
56 void SetChartDocumentForRangeChoosing(
57 const ::com::sun::star::uno::Reference<
58 ::com::sun::star::chart2::XChartDocument > & xChartDocument );
59 void Reset(const SfxItemSet& rInAttrs);
60 bool FillItemSet(SfxItemSet& rOutAttrs) const;
62 void FillValueSets();
64 // ____ RangeSelectionListenerParent ____
65 virtual void listeningFinished( const OUString & rNewRange ) SAL_OVERRIDE;
66 virtual void disposingRangeSelection() SAL_OVERRIDE;
68 private:
69 // category
70 VclPtr<RadioButton> m_pRbNone;
71 VclPtr<RadioButton> m_pRbConst;
72 VclPtr<RadioButton> m_pRbPercent;
73 VclPtr<RadioButton> m_pRbFunction;
74 VclPtr<RadioButton> m_pRbRange;
75 VclPtr<ListBox> m_pLbFunction;
77 // parameters
78 VclPtr<VclFrame> m_pFlParameters;
79 VclPtr<VclBox> m_pBxPositive;
80 VclPtr<MetricField> m_pMfPositive;
81 VclPtr<Edit> m_pEdRangePositive;
82 VclPtr<PushButton> m_pIbRangePositive;
83 VclPtr<VclBox> m_pBxNegative;
84 VclPtr<MetricField> m_pMfNegative;
85 VclPtr<Edit> m_pEdRangeNegative;
86 VclPtr<PushButton> m_pIbRangeNegative;
87 VclPtr<CheckBox> m_pCbSyncPosNeg;
89 // indicator
90 VclPtr<RadioButton> m_pRbBoth;
91 VclPtr<RadioButton> m_pRbPositive;
92 VclPtr<RadioButton> m_pRbNegative;
93 VclPtr<FixedImage> m_pFiBoth;
94 VclPtr<FixedImage> m_pFiPositive;
95 VclPtr<FixedImage> m_pFiNegative;
97 VclPtr<FixedText> m_pUIStringPos;
98 VclPtr<FixedText> m_pUIStringNeg;
99 VclPtr<FixedText> m_pUIStringRbRange;
101 SvxChartKindError m_eErrorKind;
102 SvxChartIndicate m_eIndicate;
104 bool m_bErrorKindUnique;
105 bool m_bIndicatorUnique;
106 bool m_bPlusUnique;
107 bool m_bMinusUnique;
108 bool m_bRangePosUnique;
109 bool m_bRangeNegUnique;
111 bool m_bNoneAvailable;
113 tErrorBarType m_eErrorBarType;
114 sal_uInt16 m_nConstDecimalDigits;
115 sal_Int64 m_nConstSpinSize;
116 double m_fPlusValue;
117 double m_fMinusValue;
119 VclPtr<Dialog> m_pParentDialog;
120 boost::scoped_ptr< RangeSelectionHelper > m_apRangeSelectionHelper;
121 VclPtr<Edit> m_pCurrentRangeChoosingField;
122 bool m_bHasInternalDataProvider;
123 bool m_bEnableDataTableDialog;
125 DECL_LINK( CategoryChosen, void * );
126 DECL_LINK( SynchronizePosAndNeg, void * );
127 DECL_LINK( PosValueChanged, void * );
128 DECL_LINK( IndicatorChanged, void * );
129 DECL_LINK( ChooseRange, PushButton * );
130 DECL_LINK( RangeChanged, Edit * );
132 void UpdateControlStates();
133 bool isRangeFieldContentValid( Edit & rEdit );
136 } //namespace chart
138 #endif
140 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */