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 _PAD_PRTSETUP_HXX_
21 #define _PAD_PRTSETUP_HXX_
25 #include "tools/link.hxx"
27 #include "vcl/tabdlg.hxx"
28 #include "vcl/tabpage.hxx"
29 #include "vcl/tabctrl.hxx"
30 #include "vcl/button.hxx"
31 #include "vcl/fixed.hxx"
32 #include "vcl/lstbox.hxx"
33 #include "vcl/field.hxx"
34 #include "vcl/combobox.hxx"
35 #include "vcl/ppdparser.hxx"
36 #include "vcl/printerinfomanager.hxx"
43 class RTSFontSubstPage
;
46 class RTSDialog
: public TabDialog
48 friend class RTSPaperPage
;
49 friend class RTSDevicePage
;
50 friend class RTSOtherPage
;
51 friend class RTSFontSubstPage
;
52 friend class RTSCommandPage
;
54 ::psp::PrinterInfo m_aJobData
;
58 TabControl
* m_pTabControl
;
59 OKButton
* m_pOKButton
;
60 CancelButton
* m_pCancelButton
;
63 RTSPaperPage
* m_pPaperPage
;
64 RTSDevicePage
* m_pDevicePage
;
65 RTSOtherPage
* m_pOtherPage
;
66 RTSFontSubstPage
* m_pFontSubstPage
;
67 RTSCommandPage
* m_pCommandPage
;
70 OUString m_aInvalidString
;
72 DECL_LINK( ActivatePage
, TabControl
* );
73 DECL_LINK( ClickButton
, Button
* );
76 void insertAllPPDValues( ListBox
&, const psp::PPDParser
*, const psp::PPDKey
* );
78 RTSDialog( const ::psp::PrinterInfo
& rJobData
, const String
& rPrinter
, bool bAllPages
, Window
* pParent
= NULL
);
81 const ::psp::PrinterInfo
& getSetup() const { return m_aJobData
; }
84 class RTSPaperPage
: public TabPage
88 FixedText
* m_pPaperText
;
91 ListBox
* m_pOrientBox
;
93 FixedText
* m_pDuplexText
;
94 ListBox
* m_pDuplexBox
;
96 FixedText
* m_pSlotText
;
99 DECL_LINK( SelectHdl
, ListBox
* );
101 RTSPaperPage( RTSDialog
* );
106 sal_uInt16
getOrientation() { return m_pOrientBox
->GetSelectEntryPos(); }
109 class RTSDevicePage
: public TabPage
111 RTSDialog
* m_pParent
;
113 String m_aSpaceColor
;
116 ListBox
* m_pPPDKeyBox
;
117 ListBox
* m_pPPDValueBox
;
119 ListBox
* m_pLevelBox
;
120 ListBox
* m_pSpaceBox
;
121 ListBox
* m_pDepthBox
;
123 void FillValueBox( const ::psp::PPDKey
* );
125 DECL_LINK( SelectHdl
, ListBox
* );
127 RTSDevicePage( RTSDialog
* );
132 sal_uLong
getLevel();
133 sal_uLong
getPDFDevice();
134 sal_uLong
getDepth();
135 sal_uLong
getColorDevice();
138 class RTSOtherPage
: public TabPage
140 RTSDialog
* m_pParent
;
142 FixedText m_aLeftTxt
;
143 MetricField m_aLeftLB
;
145 MetricField m_aTopLB
;
146 FixedText m_aRightTxt
;
147 MetricField m_aRightLB
;
148 FixedText m_aBottomTxt
;
149 MetricField m_aBottomLB
;
150 FixedText m_aCommentTxt
;
152 PushButton m_aDefaultBtn
;
156 DECL_LINK( ClickBtnHdl
, Button
*);
159 RTSOtherPage( RTSDialog
* );
165 class RTSFontSubstPage
: public TabPage
167 RTSDialog
* m_pParent
;
169 FixedText m_aSubstitutionsText
;
170 DelMultiListBox m_aSubstitutionsBox
;
171 FixedText m_aFromFontText
;
172 ComboBox m_aFromFontBox
;
173 FixedText m_aToFontText
;
174 ListBox m_aToFontBox
;
176 PushButton m_aAddButton
;
177 PushButton m_aRemoveButton
;
178 CheckBox m_aEnableBox
;
180 DECL_LINK( ClickBtnHdl
, Button
* );
181 DECL_LINK( SelectHdl
, ListBox
* );
182 DECL_LINK( DelPressedHdl
, ListBox
* );
186 RTSFontSubstPage( RTSDialog
* );
192 #endif // _PAD_PRTSETUP_HXX
194 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */