xref: /aoo41x/main/padmin/source/padialog.hxx (revision 23e9c6ca)
1*23e9c6caSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*23e9c6caSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*23e9c6caSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*23e9c6caSAndrew Rist  * distributed with this work for additional information
6*23e9c6caSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*23e9c6caSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*23e9c6caSAndrew Rist  * "License"); you may not use this file except in compliance
9*23e9c6caSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*23e9c6caSAndrew Rist  *
11*23e9c6caSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*23e9c6caSAndrew Rist  *
13*23e9c6caSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*23e9c6caSAndrew Rist  * software distributed under the License is distributed on an
15*23e9c6caSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*23e9c6caSAndrew Rist  * KIND, either express or implied.  See the License for the
17*23e9c6caSAndrew Rist  * specific language governing permissions and limitations
18*23e9c6caSAndrew Rist  * under the License.
19*23e9c6caSAndrew Rist  *
20*23e9c6caSAndrew Rist  *************************************************************/
21*23e9c6caSAndrew Rist 
22*23e9c6caSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _PAD_PADIALOG_HXX_
25cdf0e10cSrcweir #define _PAD_PADIALOG_HXX_
26cdf0e10cSrcweir #ifndef __SGI_STL_LIST
27cdf0e10cSrcweir #include <list>
28cdf0e10cSrcweir #endif
29cdf0e10cSrcweir #ifndef _RTL_USTRING
30cdf0e10cSrcweir #include <rtl/ustring.hxx>
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #include <vcl/dialog.hxx>
33cdf0e10cSrcweir #include <tools/config.hxx>
34cdf0e10cSrcweir #include <vcl/lstbox.hxx>
35cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX
36cdf0e10cSrcweir #include <vcl/button.hxx>
37cdf0e10cSrcweir #endif
38cdf0e10cSrcweir #include <vcl/fixed.hxx>
39cdf0e10cSrcweir #include <vcl/group.hxx>
40cdf0e10cSrcweir #include <vcl/edit.hxx>
41cdf0e10cSrcweir #include <helper.hxx>
42cdf0e10cSrcweir 
43cdf0e10cSrcweir // forward declaration
44cdf0e10cSrcweir namespace psp { class PrinterInfoManager; }
45cdf0e10cSrcweir class Printer;
46cdf0e10cSrcweir 
47cdf0e10cSrcweir namespace padmin {
48cdf0e10cSrcweir 
49cdf0e10cSrcweir 	class SPA_DLLPUBLIC PADialog : public ModalDialog
50cdf0e10cSrcweir 	{
51cdf0e10cSrcweir 	private:
52cdf0e10cSrcweir 		DelListBox       					m_aDevicesLB;
53cdf0e10cSrcweir 		PushButton    						m_aConfPB;
54cdf0e10cSrcweir 		PushButton    						m_aRenamePB;
55cdf0e10cSrcweir 		PushButton    						m_aStdPB;
56cdf0e10cSrcweir 		PushButton    						m_aRemPB;
57cdf0e10cSrcweir 		PushButton    						m_aTestPagePB;
58cdf0e10cSrcweir 		FixedLine      						m_aPrintersFL;
59cdf0e10cSrcweir 		FixedText							m_aDriverTxt;
60cdf0e10cSrcweir 		FixedText							m_aDriver;
61cdf0e10cSrcweir 		FixedText							m_aLocationTxt;
62cdf0e10cSrcweir 		FixedText							m_aLocation;
63cdf0e10cSrcweir 		FixedText							m_aCommandTxt;
64cdf0e10cSrcweir 		FixedText							m_aCommand;
65cdf0e10cSrcweir 		FixedText							m_aCommentTxt;
66cdf0e10cSrcweir 		FixedText							m_aComment;
67cdf0e10cSrcweir 
68cdf0e10cSrcweir         FixedLine                           m_aCUPSFL;
69cdf0e10cSrcweir         CheckBox                            m_aCUPSCB;
70cdf0e10cSrcweir 
71cdf0e10cSrcweir         FixedLine							m_aSepButtonFL;
72cdf0e10cSrcweir 		PushButton							m_aAddPB;
73cdf0e10cSrcweir 		PushButton							m_aFontsPB;
74cdf0e10cSrcweir 		CancelButton  						m_aCancelButton;
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 		String								m_aDefPrt;
77cdf0e10cSrcweir 		String								m_aRenameStr;
78cdf0e10cSrcweir 
79cdf0e10cSrcweir 		::psp::PrinterInfoManager&			m_rPIManager;
80cdf0e10cSrcweir 		::std::list< ::rtl::OUString >		m_aPrinters;
81cdf0e10cSrcweir 
82cdf0e10cSrcweir         Image								m_aPrinterImg;
83cdf0e10cSrcweir         Image								m_aFaxImg;
84cdf0e10cSrcweir         Image								m_aPdfImg;
85cdf0e10cSrcweir 
86cdf0e10cSrcweir 		DECL_LINK( ClickBtnHdl, PushButton* );
87cdf0e10cSrcweir 		DECL_LINK( DoubleClickHdl, ListBox* );
88cdf0e10cSrcweir 		DECL_LINK( SelectHdl, ListBox* );
89cdf0e10cSrcweir 		DECL_LINK( DelPressedHdl, ListBox* );
90cdf0e10cSrcweir 
91cdf0e10cSrcweir 		PADialog( Window*,  sal_Bool );
92cdf0e10cSrcweir 		void Init();
93cdf0e10cSrcweir 
94cdf0e10cSrcweir 		void UpdateDefPrt();
95cdf0e10cSrcweir 		void UpdateText();
96cdf0e10cSrcweir 		void UpdateDevice();
97cdf0e10cSrcweir 		void AddDevice();
98cdf0e10cSrcweir 		void RemDevice();
99cdf0e10cSrcweir 		void ConfigureDevice();
100cdf0e10cSrcweir 		void RenameDevice();
101cdf0e10cSrcweir 		void PrintTestPage();
102cdf0e10cSrcweir         void updateSettings();
103cdf0e10cSrcweir 
104cdf0e10cSrcweir         virtual long Notify( NotifyEvent& rEv );
105cdf0e10cSrcweir         virtual void DataChanged( const DataChangedEvent& rEv );
106cdf0e10cSrcweir 
107cdf0e10cSrcweir 		String getSelectedDevice();
108cdf0e10cSrcweir 	public:
109cdf0e10cSrcweir 		~PADialog();
110cdf0e10cSrcweir 
111cdf0e10cSrcweir 		static PADialog* Create( Window*,  sal_Bool );
112cdf0e10cSrcweir 	};
113cdf0e10cSrcweir 
114cdf0e10cSrcweir } // namespace
115cdf0e10cSrcweir 
116cdf0e10cSrcweir #endif
117