bump product version to 4.1.6.2
[LibreOffice.git] / padmin / source / prtsetup.hxx
blobefc217084c2cd4ab53a6b638fc59d7dc6306edad
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_
23 #include "helper.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"
38 namespace padmin {
40 class RTSPaperPage;
41 class RTSDevicePage;
42 class RTSOtherPage;
43 class RTSFontSubstPage;
44 class RTSCommandPage;
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;
55 String m_aPrinter;
57 // controls
58 TabControl* m_pTabControl;
59 OKButton* m_pOKButton;
60 CancelButton* m_pCancelButton;
62 // pages
63 RTSPaperPage* m_pPaperPage;
64 RTSDevicePage* m_pDevicePage;
65 RTSOtherPage* m_pOtherPage;
66 RTSFontSubstPage* m_pFontSubstPage;
67 RTSCommandPage* m_pCommandPage;
69 // some resources
70 OUString m_aInvalidString;
72 DECL_LINK( ActivatePage, TabControl* );
73 DECL_LINK( ClickButton, Button* );
75 // helper functions
76 void insertAllPPDValues( ListBox&, const psp::PPDParser*, const psp::PPDKey* );
77 public:
78 RTSDialog( const ::psp::PrinterInfo& rJobData, const String& rPrinter, bool bAllPages, Window* pParent = NULL );
79 ~RTSDialog();
81 const ::psp::PrinterInfo& getSetup() const { return m_aJobData; }
84 class RTSPaperPage : public TabPage
86 RTSDialog* m_pParent;
88 FixedText* m_pPaperText;
89 ListBox* m_pPaperBox;
91 ListBox* m_pOrientBox;
93 FixedText* m_pDuplexText;
94 ListBox* m_pDuplexBox;
96 FixedText* m_pSlotText;
97 ListBox* m_pSlotBox;
99 DECL_LINK( SelectHdl, ListBox* );
100 public:
101 RTSPaperPage( RTSDialog* );
102 ~RTSPaperPage();
104 void update();
106 sal_uInt16 getOrientation() { return m_pOrientBox->GetSelectEntryPos(); }
109 class RTSDevicePage : public TabPage
111 RTSDialog* m_pParent;
113 String m_aSpaceColor;
114 String m_aSpaceGray;
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* );
126 public:
127 RTSDevicePage( RTSDialog* );
128 ~RTSDevicePage();
130 void update();
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;
144 FixedText m_aTopTxt;
145 MetricField m_aTopLB;
146 FixedText m_aRightTxt;
147 MetricField m_aRightLB;
148 FixedText m_aBottomTxt;
149 MetricField m_aBottomLB;
150 FixedText m_aCommentTxt;
151 Edit m_aCommentEdt;
152 PushButton m_aDefaultBtn;
154 void initValues();
156 DECL_LINK( ClickBtnHdl, Button *);
158 public:
159 RTSOtherPage( RTSDialog* );
160 ~RTSOtherPage();
162 void save();
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* );
184 void update();
185 public:
186 RTSFontSubstPage( RTSDialog* );
187 ~RTSFontSubstPage();
190 } // namespace
192 #endif // _PAD_PRTSETUP_HXX
194 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */