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 _SV_PRNSETUP_HXX_ 25 #define _SV_PRNSETUP_HXX_ 26 27 #include "svtools/svtdllapi.h" 28 29 #ifndef _VCL_DIALOG_HXX 30 #include <vcl/dialog.hxx> 31 #endif 32 #ifndef _VCL_FIXED_HXX 33 #include <vcl/fixed.hxx> 34 #endif 35 #ifndef _VCL_BUTTON_HXX 36 #include <vcl/button.hxx> 37 #endif 38 #ifndef _VCL_GROUP_HXX 39 #include <vcl/group.hxx> 40 #endif 41 #ifndef _VCL_LSTBOX_HXX 42 #include <vcl/lstbox.hxx> 43 #endif 44 #ifndef _VCL_TIMER_HXX 45 #include <vcl/timer.hxx> 46 #endif 47 #include <svtools/stdctrl.hxx> 48 49 class Printer; 50 class QueueInfo; 51 52 // ---------------------- 53 // - PrinterSetupDialog - 54 // ---------------------- 55 56 class SVT_DLLPUBLIC PrinterSetupDialog : public ModalDialog 57 { 58 private: 59 FixedLine maFlPrinter; 60 FixedText maFtName; 61 ListBox maLbName; 62 PushButton maBtnProperties; 63 PushButton maBtnOptions; 64 FixedText maFtStatus; 65 FixedInfo maFiStatus; 66 FixedText maFtType; 67 FixedInfo maFiType; 68 FixedText maFtLocation; 69 FixedInfo maFiLocation; 70 FixedText maFtComment; 71 FixedInfo maFiComment; 72 FixedLine maFlSepButton; 73 OKButton maBtnOK; 74 CancelButton maBtnCancel; 75 HelpButton maBtnHelp; 76 AutoTimer maStatusTimer; 77 Printer* mpPrinter; 78 Printer* mpTempPrinter; 79 80 SVT_DLLPRIVATE void ImplSetInfo(); 81 82 DECL_DLLPRIVATE_LINK( ImplPropertiesHdl, void* ); 83 DECL_DLLPRIVATE_LINK( ImplOptionsHdl, void* ); 84 DECL_DLLPRIVATE_LINK( ImplChangePrinterHdl, void* ); 85 DECL_DLLPRIVATE_LINK( ImplStatusHdl, Timer* ); 86 87 public: 88 PrinterSetupDialog( Window* pWindow ); 89 ~PrinterSetupDialog(); 90 SetPrinter(Printer * pNewPrinter)91 void SetPrinter( Printer* pNewPrinter ) { mpPrinter = pNewPrinter; } GetPrinter() const92 Printer* GetPrinter() const { return mpPrinter; } 93 94 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 95 virtual long Notify( NotifyEvent& rNEvt ); 96 97 virtual short Execute(); 98 99 void SetOptionsHdl( const Link& rLink ); 100 const Link& GetOptionsHdl() const; 101 }; 102 103 // -------------------------------------- 104 // - Hilfsfunktionen fuer Print-Dialoge - 105 // -------------------------------------- 106 107 #define IMPL_PRINTDLG_STATUS_UPDATE 15000 108 109 void ImplFillPrnDlgListBox( const Printer* pPrinter, 110 ListBox* pBox, PushButton* pPropBtn ); 111 void ImplFreePrnDlgListBox( ListBox* pBox, sal_Bool bClear = sal_True ); 112 Printer* ImplPrnDlgListBoxSelect( ListBox* pBox, PushButton* pPropBtn, 113 Printer* pPrinter, Printer* pTempPrinter ); 114 Printer* ImplPrnDlgUpdatePrinter( Printer* pPrinter, Printer* pTempPrinter ); 115 void ImplPrnDlgUpdateQueueInfo( ListBox* pBox, QueueInfo& rInfo ); 116 XubString ImplPrnDlgGetStatusText( const QueueInfo& rInfo ); 117 118 #endif // _SV_PRNSETUP_HXX_ 119