1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tp_Scale.hxx,v $
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 //.............................................................................
47 //.............................................................................
49 class ScaleTabPage
: public SfxTabPage
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
);
63 void ShowAxisOrigin( bool bShowOrigin
);
65 virtual void StateChanged( StateChangedType nType
);
71 FormattedField aFmtFldMin
;
75 FormattedField aFmtFldMax
;
79 FormattedField aFmtFldStepMain
;
80 CheckBox aCbxAutoStepMain
;
83 MetricField aMtStepHelp
;
84 CheckBox aCbxAutoStepHelp
;
87 FormattedField aFmtFldOrigin
;
88 CheckBox aCbxAutoOrigin
;
90 CheckBox aCbxLogarithm
;
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.
111 The resource identifier that represents the localized warning text.
112 If this is 0, no warning is shown and false is returned.
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 //.............................................................................
126 //.............................................................................