update dev300-m58
[ooovba.git] / padmin / source / padialog.hxx
blob9132ffedbc3661dad5f0e6f4ae09c6732c8153e0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: padialog.hxx,v $
10 * $Revision: 1.12 $
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 ************************************************************************/
31 #ifndef _PAD_PADIALOG_HXX_
32 #define _PAD_PADIALOG_HXX_
33 #ifndef __SGI_STL_LIST
34 #include <list>
35 #endif
36 #ifndef _RTL_USTRING
37 #include <rtl/ustring.hxx>
38 #endif
39 #include <vcl/dialog.hxx>
40 #include <tools/config.hxx>
41 #include <vcl/lstbox.hxx>
42 #ifndef _SV_BUTTON_HXX
43 #include <vcl/button.hxx>
44 #endif
45 #include <vcl/fixed.hxx>
46 #include <vcl/group.hxx>
47 #include <vcl/edit.hxx>
48 #include <helper.hxx>
50 // forward declaration
51 namespace psp { class PrinterInfoManager; }
52 class Printer;
54 namespace padmin {
56 class PADialog : public ModalDialog
58 private:
59 DelListBox m_aDevicesLB;
60 PushButton m_aConfPB;
61 PushButton m_aRenamePB;
62 PushButton m_aStdPB;
63 PushButton m_aRemPB;
64 PushButton m_aTestPagePB;
65 FixedLine m_aPrintersFL;
66 FixedText m_aDriverTxt;
67 FixedText m_aDriver;
68 FixedText m_aLocationTxt;
69 FixedText m_aLocation;
70 FixedText m_aCommandTxt;
71 FixedText m_aCommand;
72 FixedText m_aCommentTxt;
73 FixedText m_aComment;
75 FixedLine m_aCUPSFL;
76 CheckBox m_aCUPSCB;
78 FixedLine m_aSepButtonFL;
79 PushButton m_aAddPB;
80 #ifndef FONTCONFIG_FONTS
81 PushButton m_aFontsPB;
82 #endif
83 CancelButton m_aCancelButton;
85 String m_aDefPrt;
86 String m_aRenameStr;
88 Printer* m_pPrinter;
89 ::psp::PrinterInfoManager& m_rPIManager;
90 ::std::list< ::rtl::OUString > m_aPrinters;
92 Image m_aPrinterImg;
93 Image m_aFaxImg;
94 Image m_aPdfImg;
96 DECL_LINK( ClickBtnHdl, PushButton* );
97 DECL_LINK( DoubleClickHdl, ListBox* );
98 DECL_LINK( SelectHdl, ListBox* );
99 DECL_LINK( EndPrintHdl, void* );
100 DECL_LINK( DelPressedHdl, ListBox* );
102 PADialog( Window*, BOOL );
103 void Init();
105 void UpdateDefPrt();
106 void UpdateText();
107 void UpdateDevice();
108 void AddDevice();
109 void RemDevice();
110 void ConfigureDevice();
111 void RenameDevice();
112 void PrintTestPage();
113 void updateSettings();
115 virtual long Notify( NotifyEvent& rEv );
116 virtual void DataChanged( const DataChangedEvent& rEv );
118 String getSelectedDevice();
119 public:
120 ~PADialog();
122 static PADialog* Create( Window*, BOOL );
125 } // namespace
127 #endif