xref: /trunk/main/padmin/source/padialog.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _PAD_PADIALOG_HXX_
29 #define _PAD_PADIALOG_HXX_
30 #ifndef __SGI_STL_LIST
31 #include <list>
32 #endif
33 #ifndef _RTL_USTRING
34 #include <rtl/ustring.hxx>
35 #endif
36 #include <vcl/dialog.hxx>
37 #include <tools/config.hxx>
38 #include <vcl/lstbox.hxx>
39 #ifndef _SV_BUTTON_HXX
40 #include <vcl/button.hxx>
41 #endif
42 #include <vcl/fixed.hxx>
43 #include <vcl/group.hxx>
44 #include <vcl/edit.hxx>
45 #include <helper.hxx>
46 
47 // forward declaration
48 namespace psp { class PrinterInfoManager; }
49 class Printer;
50 
51 namespace padmin {
52 
53 	class SPA_DLLPUBLIC PADialog : public ModalDialog
54 	{
55 	private:
56 		DelListBox       					m_aDevicesLB;
57 		PushButton    						m_aConfPB;
58 		PushButton    						m_aRenamePB;
59 		PushButton    						m_aStdPB;
60 		PushButton    						m_aRemPB;
61 		PushButton    						m_aTestPagePB;
62 		FixedLine      						m_aPrintersFL;
63 		FixedText							m_aDriverTxt;
64 		FixedText							m_aDriver;
65 		FixedText							m_aLocationTxt;
66 		FixedText							m_aLocation;
67 		FixedText							m_aCommandTxt;
68 		FixedText							m_aCommand;
69 		FixedText							m_aCommentTxt;
70 		FixedText							m_aComment;
71 
72         FixedLine                           m_aCUPSFL;
73         CheckBox                            m_aCUPSCB;
74 
75         FixedLine							m_aSepButtonFL;
76 		PushButton							m_aAddPB;
77 		PushButton							m_aFontsPB;
78 		CancelButton  						m_aCancelButton;
79 
80 		String								m_aDefPrt;
81 		String								m_aRenameStr;
82 
83 		::psp::PrinterInfoManager&			m_rPIManager;
84 		::std::list< ::rtl::OUString >		m_aPrinters;
85 
86         Image								m_aPrinterImg;
87         Image								m_aFaxImg;
88         Image								m_aPdfImg;
89 
90 		DECL_LINK( ClickBtnHdl, PushButton* );
91 		DECL_LINK( DoubleClickHdl, ListBox* );
92 		DECL_LINK( SelectHdl, ListBox* );
93 		DECL_LINK( DelPressedHdl, ListBox* );
94 
95 		PADialog( Window*,  sal_Bool );
96 		void Init();
97 
98 		void UpdateDefPrt();
99 		void UpdateText();
100 		void UpdateDevice();
101 		void AddDevice();
102 		void RemDevice();
103 		void ConfigureDevice();
104 		void RenameDevice();
105 		void PrintTestPage();
106         void updateSettings();
107 
108         virtual long Notify( NotifyEvent& rEv );
109         virtual void DataChanged( const DataChangedEvent& rEv );
110 
111 		String getSelectedDevice();
112 	public:
113 		~PADialog();
114 
115 		static PADialog* Create( Window*,  sal_Bool );
116 	};
117 
118 } // namespace
119 
120 #endif
121