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