xref: /AOO42X/main/chart2/source/controller/dialogs/tp_Scale.hxx (revision 9bce9b0d387299c68bd81d539e1478357a103de5)
1*de7b3f82SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*de7b3f82SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*de7b3f82SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*de7b3f82SAndrew Rist  * distributed with this work for additional information
6*de7b3f82SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*de7b3f82SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*de7b3f82SAndrew Rist  * "License"); you may not use this file except in compliance
9*de7b3f82SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*de7b3f82SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*de7b3f82SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*de7b3f82SAndrew Rist  * software distributed under the License is distributed on an
15*de7b3f82SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*de7b3f82SAndrew Rist  * KIND, either express or implied.  See the License for the
17*de7b3f82SAndrew Rist  * specific language governing permissions and limitations
18*de7b3f82SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*de7b3f82SAndrew Rist  *************************************************************/
21*de7b3f82SAndrew Rist 
22*de7b3f82SAndrew Rist 
23cdf0e10cSrcweir #ifndef _CHART2_TP_SCALES_HXX
24cdf0e10cSrcweir #define _CHART2_TP_SCALES_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // header for SfxTabPage
27cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
28cdf0e10cSrcweir // header for class FormattedField
29cdf0e10cSrcweir #include <svtools/fmtfield.hxx>
30cdf0e10cSrcweir // header for FixedText
31cdf0e10cSrcweir #include <vcl/fixed.hxx>
32cdf0e10cSrcweir // header for CheckBox
33cdf0e10cSrcweir #include <vcl/button.hxx>
34cdf0e10cSrcweir // header for MetricField
35cdf0e10cSrcweir #include <vcl/field.hxx>
36cdf0e10cSrcweir // header for class ListBox
37cdf0e10cSrcweir #include <vcl/lstbox.hxx>
38cdf0e10cSrcweir 
39cdf0e10cSrcweir //.............................................................................
40cdf0e10cSrcweir namespace chart
41cdf0e10cSrcweir {
42cdf0e10cSrcweir //.............................................................................
43cdf0e10cSrcweir 
44cdf0e10cSrcweir class ScaleTabPage : public SfxTabPage
45cdf0e10cSrcweir {
46cdf0e10cSrcweir public:
47cdf0e10cSrcweir     ScaleTabPage( Window* pParent, const SfxItemSet& rInAttrs );
48cdf0e10cSrcweir 
49cdf0e10cSrcweir     static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs );
50cdf0e10cSrcweir     virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs );
51cdf0e10cSrcweir     virtual void Reset( const SfxItemSet& rInAttrs );
52cdf0e10cSrcweir     using TabPage::DeactivatePage;
53cdf0e10cSrcweir     virtual int DeactivatePage( SfxItemSet* pItemSet = NULL );
54cdf0e10cSrcweir 
55cdf0e10cSrcweir     void SetNumFormatter( SvNumberFormatter* pFormatter );
56cdf0e10cSrcweir     void SetNumFormat();
57cdf0e10cSrcweir 
58cdf0e10cSrcweir     void ShowAxisOrigin( bool bShowOrigin );
59cdf0e10cSrcweir 
60cdf0e10cSrcweir     virtual void StateChanged( StateChangedType nType );
61cdf0e10cSrcweir 
62cdf0e10cSrcweir private:
63cdf0e10cSrcweir     FixedLine           aFlScale;
64cdf0e10cSrcweir 
65cdf0e10cSrcweir     CheckBox            aCbxReverse;
66cdf0e10cSrcweir 
67cdf0e10cSrcweir     CheckBox            aCbxLogarithm;
68cdf0e10cSrcweir 
69cdf0e10cSrcweir     FixedText           m_aTxt_AxisType;
70cdf0e10cSrcweir     ListBox             m_aLB_AxisType;
71cdf0e10cSrcweir 
72cdf0e10cSrcweir     FixedText           aTxtMin;
73cdf0e10cSrcweir     FormattedField      aFmtFldMin;
74cdf0e10cSrcweir     CheckBox            aCbxAutoMin;
75cdf0e10cSrcweir 
76cdf0e10cSrcweir     FixedText           aTxtMax;
77cdf0e10cSrcweir     FormattedField      aFmtFldMax;
78cdf0e10cSrcweir     CheckBox            aCbxAutoMax;
79cdf0e10cSrcweir 
80cdf0e10cSrcweir     FixedText           m_aTxt_TimeResolution;
81cdf0e10cSrcweir     ListBox             m_aLB_TimeResolution;
82cdf0e10cSrcweir     CheckBox            m_aCbx_AutoTimeResolution;
83cdf0e10cSrcweir 
84cdf0e10cSrcweir     FixedText           aTxtMain;
85cdf0e10cSrcweir     FormattedField      aFmtFldStepMain;
86cdf0e10cSrcweir     MetricField         m_aMt_MainDateStep;
87cdf0e10cSrcweir     ListBox             m_aLB_MainTimeUnit;
88cdf0e10cSrcweir     CheckBox            aCbxAutoStepMain;
89cdf0e10cSrcweir 
90cdf0e10cSrcweir     FixedText           aTxtHelpCount;
91cdf0e10cSrcweir     FixedText           aTxtHelp;
92cdf0e10cSrcweir     MetricField         aMtStepHelp;
93cdf0e10cSrcweir     ListBox             m_aLB_HelpTimeUnit;
94cdf0e10cSrcweir     CheckBox            aCbxAutoStepHelp;
95cdf0e10cSrcweir 
96cdf0e10cSrcweir     FixedText           aTxtOrigin;
97cdf0e10cSrcweir     FormattedField      aFmtFldOrigin;
98cdf0e10cSrcweir     CheckBox            aCbxAutoOrigin;
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     double              fMin;
101cdf0e10cSrcweir     double              fMax;
102cdf0e10cSrcweir     double              fStepMain;
103cdf0e10cSrcweir     sal_Int32           nStepHelp;
104cdf0e10cSrcweir     double              fOrigin;
105cdf0e10cSrcweir     sal_Int32           m_nTimeResolution;
106cdf0e10cSrcweir     sal_Int32           m_nMainTimeUnit;
107cdf0e10cSrcweir     sal_Int32           m_nHelpTimeUnit;
108cdf0e10cSrcweir     int                 m_nAxisType;
109cdf0e10cSrcweir     bool                m_bAllowDateAxis;
110cdf0e10cSrcweir     SvNumberFormatter*  pNumFormatter;
111cdf0e10cSrcweir 
112cdf0e10cSrcweir     bool                m_bShowAxisOrigin;
113cdf0e10cSrcweir 
114cdf0e10cSrcweir     void AdjustControlPositions();
115cdf0e10cSrcweir     void EnableControls();
116cdf0e10cSrcweir     void PlaceIntervalControlsAccordingToAxisType();
117cdf0e10cSrcweir 
118cdf0e10cSrcweir     DECL_LINK( SelectAxisTypeHdl, void* );
119cdf0e10cSrcweir     DECL_LINK( EnableValueHdl, CheckBox* );
120cdf0e10cSrcweir     DECL_LINK( FmtFieldModifiedHdl, FormattedField* );
121cdf0e10cSrcweir 
122cdf0e10cSrcweir     /** shows a warning window due to an invalid input.
123cdf0e10cSrcweir 
124cdf0e10cSrcweir         @param nResIdMessage
125cdf0e10cSrcweir             The resource identifier that represents the localized warning text.
126cdf0e10cSrcweir             If this is 0, no warning is shown and false is returned.
127cdf0e10cSrcweir 
128cdf0e10cSrcweir         @param pControl
129cdf0e10cSrcweir             If non-NULL, contains a pointer to the control in which the
130cdf0e10cSrcweir             errornous value was in.  This method gives this control the focus
131cdf0e10cSrcweir             and selects its content.
132cdf0e10cSrcweir 
133cdf0e10cSrcweir         @return false, if nResIdMessage was 0, true otherwise
134cdf0e10cSrcweir      */
135cdf0e10cSrcweir     bool ShowWarning( sal_uInt16 nResIdMessage, Control* pControl = NULL );
136cdf0e10cSrcweir };
137cdf0e10cSrcweir 
138cdf0e10cSrcweir //.............................................................................
139cdf0e10cSrcweir } //namespace chart
140cdf0e10cSrcweir //.............................................................................
141cdf0e10cSrcweir 
142cdf0e10cSrcweir #endif
143