Update ooo320-m1
[ooovba.git] / chart2 / source / controller / dialogs / tp_Scale.hxx
blob4d280b23bf944a8cad3491044b4f80fc11df2986
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tp_Scale.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _CHART2_TP_SCALES_HXX
31 #define _CHART2_TP_SCALES_HXX
33 // header for SfxTabPage
34 #include <sfx2/tabdlg.hxx>
35 // header for class FormattedField
36 #include <svtools/fmtfield.hxx>
37 // header for FixedText
38 #include <vcl/fixed.hxx>
39 // header for CheckBox
40 #include <vcl/button.hxx>
41 // header for MetricField
42 #include <vcl/field.hxx>
44 //.............................................................................
45 namespace chart
47 //.............................................................................
49 class ScaleTabPage : public SfxTabPage
51 public:
52 ScaleTabPage( Window* pParent, const SfxItemSet& rInAttrs );
54 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs );
55 virtual BOOL FillItemSet( SfxItemSet& rOutAttrs );
56 virtual void Reset( const SfxItemSet& rInAttrs );
57 using TabPage::DeactivatePage;
58 virtual int DeactivatePage( SfxItemSet* pItemSet = NULL );
60 void SetNumFormatter( SvNumberFormatter* pFormatter );
61 void SetNumFormat();
63 void ShowAxisOrigin( bool bShowOrigin );
65 virtual void StateChanged( StateChangedType nType );
67 private:
68 FixedLine aFlScale;
70 FixedText aTxtMin;
71 FormattedField aFmtFldMin;
72 CheckBox aCbxAutoMin;
74 FixedText aTxtMax;
75 FormattedField aFmtFldMax;
76 CheckBox aCbxAutoMax;
78 FixedText aTxtMain;
79 FormattedField aFmtFldStepMain;
80 CheckBox aCbxAutoStepMain;
82 FixedText aTxtHelp;
83 MetricField aMtStepHelp;
84 CheckBox aCbxAutoStepHelp;
86 FixedText aTxtOrigin;
87 FormattedField aFmtFldOrigin;
88 CheckBox aCbxAutoOrigin;
90 CheckBox aCbxLogarithm;
91 CheckBox aCbxReverse;
93 double fMin;
94 double fMax;
95 double fStepMain;
96 sal_Int32 nStepHelp;
97 double fOrigin;
98 int nAxisType;
99 SvNumberFormatter* pNumFormatter;
101 bool m_bShowAxisOrigin;
103 void AdjustControlPositions();
104 void EnableControls();
106 DECL_LINK( EnableValueHdl, CheckBox* );
108 /** shows a warning window due to an invalid input.
110 @param nResIdMessage
111 The resource identifier that represents the localized warning text.
112 If this is 0, no warning is shown and false is returned.
114 @param pControl
115 If non-NULL, contains a pointer to the control in which the
116 errornous value was in. This method gives this control the focus
117 and selects its content.
119 @return false, if nResIdMessage was 0, true otherwise
121 bool ShowWarning( USHORT nResIdMessage, Edit * pControl = NULL );
124 //.............................................................................
125 } //namespace chart
126 //.............................................................................
128 #endif