xref: /aoo41x/main/sfx2/inc/sfx2/printopt.hxx (revision 353d8f4d)
1*353d8f4dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*353d8f4dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*353d8f4dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*353d8f4dSAndrew Rist  * distributed with this work for additional information
6*353d8f4dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*353d8f4dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*353d8f4dSAndrew Rist  * "License"); you may not use this file except in compliance
9*353d8f4dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*353d8f4dSAndrew Rist  *
11*353d8f4dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*353d8f4dSAndrew Rist  *
13*353d8f4dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*353d8f4dSAndrew Rist  * software distributed under the License is distributed on an
15*353d8f4dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*353d8f4dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*353d8f4dSAndrew Rist  * specific language governing permissions and limitations
18*353d8f4dSAndrew Rist  * under the License.
19*353d8f4dSAndrew Rist  *
20*353d8f4dSAndrew Rist  *************************************************************/
21*353d8f4dSAndrew Rist 
22*353d8f4dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SFX_PRINTOPT_HXX
25cdf0e10cSrcweir #define _SFX_PRINTOPT_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "sal/config.h"
28cdf0e10cSrcweir #include "sfx2/dllapi.h"
29cdf0e10cSrcweir #include "sal/types.h"
30cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX
31cdf0e10cSrcweir #include <vcl/button.hxx>
32cdf0e10cSrcweir #endif
33cdf0e10cSrcweir #include <vcl/field.hxx>
34cdf0e10cSrcweir #include <vcl/fixed.hxx>
35cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX //autogen wg. FixedText
36cdf0e10cSrcweir #include <vcl/button.hxx>
37cdf0e10cSrcweir #endif
38cdf0e10cSrcweir #include <vcl/lstbox.hxx>
39cdf0e10cSrcweir #include <vcl/print.hxx>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
42cdf0e10cSrcweir 
43cdf0e10cSrcweir // --------------------------------
44cdf0e10cSrcweir // - SfxCommonPrintOptionsTabPage -
45cdf0e10cSrcweir // --------------------------------
46cdf0e10cSrcweir 
47cdf0e10cSrcweir class SvtBasePrintOptions;
48cdf0e10cSrcweir 
49cdf0e10cSrcweir class SFX2_DLLPUBLIC SfxCommonPrintOptionsTabPage : public SfxTabPage
50cdf0e10cSrcweir {
51cdf0e10cSrcweir private:
52cdf0e10cSrcweir 
53cdf0e10cSrcweir     FixedLine           aReduceGB;
54cdf0e10cSrcweir 
55cdf0e10cSrcweir     FixedText           aOutputTypeFT;
56cdf0e10cSrcweir     RadioButton         aPrinterOutputRB;
57cdf0e10cSrcweir     RadioButton         aPrintFileOutputRB;
58cdf0e10cSrcweir 
59cdf0e10cSrcweir     FixedLine           aOutputGB;
60cdf0e10cSrcweir 
61cdf0e10cSrcweir     CheckBox            aReduceTransparencyCB;
62cdf0e10cSrcweir     RadioButton         aReduceTransparencyAutoRB;
63cdf0e10cSrcweir     RadioButton         aReduceTransparencyNoneRB;
64cdf0e10cSrcweir 
65cdf0e10cSrcweir     CheckBox            aReduceGradientsCB;
66cdf0e10cSrcweir     RadioButton         aReduceGradientsStripesRB;
67cdf0e10cSrcweir     RadioButton         aReduceGradientsColorRB;
68cdf0e10cSrcweir     NumericField        aReduceGradientsStepCountNF;
69cdf0e10cSrcweir 
70cdf0e10cSrcweir     CheckBox            aReduceBitmapsCB;
71cdf0e10cSrcweir     RadioButton         aReduceBitmapsOptimalRB;
72cdf0e10cSrcweir     RadioButton         aReduceBitmapsNormalRB;
73cdf0e10cSrcweir     RadioButton         aReduceBitmapsResolutionRB;
74cdf0e10cSrcweir     ListBox             aReduceBitmapsResolutionLB;
75cdf0e10cSrcweir     CheckBox            aReduceBitmapsTransparencyCB;
76cdf0e10cSrcweir 
77cdf0e10cSrcweir     CheckBox            aConvertToGreyscalesCB;
78cdf0e10cSrcweir 
79cdf0e10cSrcweir     FixedLine           aWarnGB;
80cdf0e10cSrcweir 
81cdf0e10cSrcweir     CheckBox            aPaperSizeCB;
82cdf0e10cSrcweir     CheckBox            aPaperOrientationCB;
83cdf0e10cSrcweir     CheckBox            aTransparencyCB;
84cdf0e10cSrcweir 
85cdf0e10cSrcweir private:
86cdf0e10cSrcweir 
87cdf0e10cSrcweir     PrinterOptions      maPrinterOptions;
88cdf0e10cSrcweir     PrinterOptions      maPrintFileOptions;
89cdf0e10cSrcweir 
90cdf0e10cSrcweir                         DECL_DLLPRIVATE_LINK( ToggleOutputPrinterRBHdl, RadioButton* pButton );
91cdf0e10cSrcweir                         DECL_DLLPRIVATE_LINK( ToggleOutputPrintFileRBHdl, RadioButton* pButton );
92cdf0e10cSrcweir 
93cdf0e10cSrcweir                         DECL_DLLPRIVATE_LINK( ClickReduceTransparencyCBHdl, CheckBox* pBox );
94cdf0e10cSrcweir                         DECL_DLLPRIVATE_LINK( ClickReduceGradientsCBHdl, CheckBox* pBox );
95cdf0e10cSrcweir                         DECL_DLLPRIVATE_LINK( ClickReduceBitmapsCBHdl, CheckBox* pBox );
96cdf0e10cSrcweir 
97cdf0e10cSrcweir                         DECL_DLLPRIVATE_LINK( ToggleReduceGradientsStripesRBHdl, RadioButton* pButton );
98cdf0e10cSrcweir                         DECL_DLLPRIVATE_LINK( ToggleReduceBitmapsResolutionRBHdl, RadioButton* pButton );
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     SAL_DLLPRIVATE void ImplUpdateControls( const PrinterOptions* pCurrentOptions );
101cdf0e10cSrcweir     SAL_DLLPRIVATE void ImplSaveControls( PrinterOptions* pCurrentOptions );
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     // --> OD 2008-06-25 #i63982#
104cdf0e10cSrcweir     SAL_DLLPRIVATE void ImplSetAccessibleNames();
105cdf0e10cSrcweir     // <--
106cdf0e10cSrcweir 
107cdf0e10cSrcweir protected:
108cdf0e10cSrcweir 
109cdf0e10cSrcweir     using TabPage::DeactivatePage;
110cdf0e10cSrcweir     virtual int         DeactivatePage( SfxItemSet* pSet = NULL );
111cdf0e10cSrcweir 
112cdf0e10cSrcweir public:
113cdf0e10cSrcweir 
114cdf0e10cSrcweir                         SfxCommonPrintOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
115cdf0e10cSrcweir 	                    ~SfxCommonPrintOptionsTabPage();
116cdf0e10cSrcweir 
117cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
118cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
119cdf0e10cSrcweir 	virtual Window*		GetParentLabeledBy( const Window* pLabel ) const;
120cdf0e10cSrcweir 	virtual Window*		GetParentLabelFor( const Window* pLabel ) const;
121cdf0e10cSrcweir 
122cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rAttrSet );
123cdf0e10cSrcweir };
124cdf0e10cSrcweir 
125cdf0e10cSrcweir // -------------------------------
126cdf0e10cSrcweir // - TransparencyPrintWarningBox -
127cdf0e10cSrcweir // -------------------------------
128cdf0e10cSrcweir 
129cdf0e10cSrcweir class TransparencyPrintWarningBox : public ModalDialog
130cdf0e10cSrcweir {
131cdf0e10cSrcweir private:
132cdf0e10cSrcweir 
133cdf0e10cSrcweir 	FixedImage		aWarnFI;
134cdf0e10cSrcweir 	FixedText		aWarnFT;
135cdf0e10cSrcweir 	OKButton		aYesBtn;
136cdf0e10cSrcweir 	PushButton	    aNoBtn;
137cdf0e10cSrcweir     CancelButton    aCancelBtn;
138cdf0e10cSrcweir 	CheckBox		aNoWarnCB;
139cdf0e10cSrcweir 
140cdf0e10cSrcweir                     DECL_LINK( ClickNoBtn, PushButton* );
141cdf0e10cSrcweir 
142cdf0e10cSrcweir public:
143cdf0e10cSrcweir 
144cdf0e10cSrcweir 					TransparencyPrintWarningBox( Window* pParent );
145cdf0e10cSrcweir 					~TransparencyPrintWarningBox();
146cdf0e10cSrcweir 
IsNoWarningChecked() const147cdf0e10cSrcweir 	sal_Bool			IsNoWarningChecked() const { return aNoWarnCB.IsChecked(); }
148cdf0e10cSrcweir };
149cdf0e10cSrcweir 
150cdf0e10cSrcweir #endif // #ifndef _SFX_PRINTOPT_HXX
151cdf0e10cSrcweir 
152