1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
20 #ifndef INCLUDED_SFX2_PRINTOPT_HXX
21 #define INCLUDED_SFX2_PRINTOPT_HXX
23 #include <sal/config.h>
24 #include <sfx2/dllapi.h>
25 #include <sal/types.h>
26 #include <vcl/button.hxx>
27 #include <vcl/field.hxx>
28 #include <vcl/fixed.hxx>
29 #include <vcl/lstbox.hxx>
30 #include <vcl/print.hxx>
32 #include <sfx2/tabdlg.hxx>
35 // - SfxCommonPrintOptionsTabPage -
38 class SvtBasePrintOptions
;
40 class SFX2_DLLPUBLIC SfxCommonPrintOptionsTabPage
: public SfxTabPage
44 VclPtr
<RadioButton
> m_pPrinterOutputRB
;
45 VclPtr
<RadioButton
> m_pPrintFileOutputRB
;
47 VclPtr
<CheckBox
> m_pReduceTransparencyCB
;
48 VclPtr
<RadioButton
> m_pReduceTransparencyAutoRB
;
49 VclPtr
<RadioButton
> m_pReduceTransparencyNoneRB
;
51 VclPtr
<CheckBox
> m_pReduceGradientsCB
;
52 VclPtr
<RadioButton
> m_pReduceGradientsStripesRB
;
53 VclPtr
<RadioButton
> m_pReduceGradientsColorRB
;
54 VclPtr
<NumericField
> m_pReduceGradientsStepCountNF
;
56 VclPtr
<CheckBox
> m_pReduceBitmapsCB
;
57 VclPtr
<RadioButton
> m_pReduceBitmapsOptimalRB
;
58 VclPtr
<RadioButton
> m_pReduceBitmapsNormalRB
;
59 VclPtr
<RadioButton
> m_pReduceBitmapsResolutionRB
;
60 VclPtr
<ListBox
> m_pReduceBitmapsResolutionLB
;
61 VclPtr
<CheckBox
> m_pReduceBitmapsTransparencyCB
;
63 VclPtr
<CheckBox
> m_pConvertToGreyscalesCB
;
65 VclPtr
<CheckBox
> m_pPDFCB
;
67 VclPtr
<CheckBox
> m_pPaperSizeCB
;
68 VclPtr
<CheckBox
> m_pPaperOrientationCB
;
69 VclPtr
<CheckBox
> m_pTransparencyCB
;
73 PrinterOptions maPrinterOptions
;
74 PrinterOptions maPrintFileOptions
;
76 DECL_DLLPRIVATE_LINK( ToggleOutputPrinterRBHdl
, RadioButton
* pButton
);
77 DECL_DLLPRIVATE_LINK( ToggleOutputPrintFileRBHdl
, RadioButton
* pButton
);
79 DECL_DLLPRIVATE_LINK( ClickReduceTransparencyCBHdl
, CheckBox
* pBox
);
80 DECL_DLLPRIVATE_LINK( ClickReduceGradientsCBHdl
, CheckBox
* pBox
);
81 DECL_DLLPRIVATE_LINK( ClickReduceBitmapsCBHdl
, CheckBox
* pBox
);
83 DECL_DLLPRIVATE_LINK( ToggleReduceGradientsStripesRBHdl
, RadioButton
* pButton
);
84 DECL_DLLPRIVATE_LINK( ToggleReduceBitmapsResolutionRBHdl
, RadioButton
* pButton
);
86 SAL_DLLPRIVATE
void ImplUpdateControls( const PrinterOptions
* pCurrentOptions
);
87 SAL_DLLPRIVATE
void ImplSaveControls( PrinterOptions
* pCurrentOptions
);
91 using TabPage::DeactivatePage
;
92 virtual sfxpg
DeactivatePage( SfxItemSet
* pSet
= NULL
) SAL_OVERRIDE
;
96 SfxCommonPrintOptionsTabPage( vcl::Window
* pParent
, const SfxItemSet
& rSet
);
97 virtual ~SfxCommonPrintOptionsTabPage();
98 virtual void dispose() SAL_OVERRIDE
;
99 virtual bool FillItemSet( SfxItemSet
* rSet
) SAL_OVERRIDE
;
100 virtual void Reset( const SfxItemSet
* rSet
) SAL_OVERRIDE
;
101 virtual vcl::Window
* GetParentLabeledBy( const vcl::Window
* pLabel
) const SAL_OVERRIDE
;
102 virtual vcl::Window
* GetParentLabelFor( const vcl::Window
* pLabel
) const SAL_OVERRIDE
;
104 static VclPtr
<SfxTabPage
> Create( vcl::Window
* pParent
, const SfxItemSet
* );
107 #endif // INCLUDED_SFX2_PRINTOPT_HXX
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */