1*01aa44aaSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*01aa44aaSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*01aa44aaSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*01aa44aaSAndrew Rist * distributed with this work for additional information 6*01aa44aaSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*01aa44aaSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*01aa44aaSAndrew Rist * "License"); you may not use this file except in compliance 9*01aa44aaSAndrew Rist * with the License. You may obtain a copy of the License at 10*01aa44aaSAndrew Rist * 11*01aa44aaSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*01aa44aaSAndrew Rist * 13*01aa44aaSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*01aa44aaSAndrew Rist * software distributed under the License is distributed on an 15*01aa44aaSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*01aa44aaSAndrew Rist * KIND, either express or implied. See the License for the 17*01aa44aaSAndrew Rist * specific language governing permissions and limitations 18*01aa44aaSAndrew Rist * under the License. 19*01aa44aaSAndrew Rist * 20*01aa44aaSAndrew Rist *************************************************************/ 21*01aa44aaSAndrew Rist 22*01aa44aaSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _SV_PRNSETUP_HXX_ 25cdf0e10cSrcweir #define _SV_PRNSETUP_HXX_ 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "svtools/svtdllapi.h" 28cdf0e10cSrcweir 29cdf0e10cSrcweir #ifndef _VCL_DIALOG_HXX 30cdf0e10cSrcweir #include <vcl/dialog.hxx> 31cdf0e10cSrcweir #endif 32cdf0e10cSrcweir #ifndef _VCL_FIXED_HXX 33cdf0e10cSrcweir #include <vcl/fixed.hxx> 34cdf0e10cSrcweir #endif 35cdf0e10cSrcweir #ifndef _VCL_BUTTON_HXX 36cdf0e10cSrcweir #include <vcl/button.hxx> 37cdf0e10cSrcweir #endif 38cdf0e10cSrcweir #ifndef _VCL_GROUP_HXX 39cdf0e10cSrcweir #include <vcl/group.hxx> 40cdf0e10cSrcweir #endif 41cdf0e10cSrcweir #ifndef _VCL_LSTBOX_HXX 42cdf0e10cSrcweir #include <vcl/lstbox.hxx> 43cdf0e10cSrcweir #endif 44cdf0e10cSrcweir #ifndef _VCL_TIMER_HXX 45cdf0e10cSrcweir #include <vcl/timer.hxx> 46cdf0e10cSrcweir #endif 47cdf0e10cSrcweir #include <svtools/stdctrl.hxx> 48cdf0e10cSrcweir 49cdf0e10cSrcweir class Printer; 50cdf0e10cSrcweir class QueueInfo; 51cdf0e10cSrcweir 52cdf0e10cSrcweir // ---------------------- 53cdf0e10cSrcweir // - PrinterSetupDialog - 54cdf0e10cSrcweir // ---------------------- 55cdf0e10cSrcweir 56cdf0e10cSrcweir class SVT_DLLPUBLIC PrinterSetupDialog : public ModalDialog 57cdf0e10cSrcweir { 58cdf0e10cSrcweir private: 59cdf0e10cSrcweir FixedLine maFlPrinter; 60cdf0e10cSrcweir FixedText maFtName; 61cdf0e10cSrcweir ListBox maLbName; 62cdf0e10cSrcweir PushButton maBtnProperties; 63cdf0e10cSrcweir PushButton maBtnOptions; 64cdf0e10cSrcweir FixedText maFtStatus; 65cdf0e10cSrcweir FixedInfo maFiStatus; 66cdf0e10cSrcweir FixedText maFtType; 67cdf0e10cSrcweir FixedInfo maFiType; 68cdf0e10cSrcweir FixedText maFtLocation; 69cdf0e10cSrcweir FixedInfo maFiLocation; 70cdf0e10cSrcweir FixedText maFtComment; 71cdf0e10cSrcweir FixedInfo maFiComment; 72cdf0e10cSrcweir FixedLine maFlSepButton; 73cdf0e10cSrcweir OKButton maBtnOK; 74cdf0e10cSrcweir CancelButton maBtnCancel; 75cdf0e10cSrcweir HelpButton maBtnHelp; 76cdf0e10cSrcweir AutoTimer maStatusTimer; 77cdf0e10cSrcweir Printer* mpPrinter; 78cdf0e10cSrcweir Printer* mpTempPrinter; 79cdf0e10cSrcweir 80cdf0e10cSrcweir SVT_DLLPRIVATE void ImplSetInfo(); 81cdf0e10cSrcweir 82cdf0e10cSrcweir DECL_DLLPRIVATE_LINK( ImplPropertiesHdl, void* ); 83cdf0e10cSrcweir DECL_DLLPRIVATE_LINK( ImplOptionsHdl, void* ); 84cdf0e10cSrcweir DECL_DLLPRIVATE_LINK( ImplChangePrinterHdl, void* ); 85cdf0e10cSrcweir DECL_DLLPRIVATE_LINK( ImplStatusHdl, Timer* ); 86cdf0e10cSrcweir 87cdf0e10cSrcweir public: 88cdf0e10cSrcweir PrinterSetupDialog( Window* pWindow ); 89cdf0e10cSrcweir ~PrinterSetupDialog(); 90cdf0e10cSrcweir SetPrinter(Printer * pNewPrinter)91cdf0e10cSrcweir void SetPrinter( Printer* pNewPrinter ) { mpPrinter = pNewPrinter; } GetPrinter() const92cdf0e10cSrcweir Printer* GetPrinter() const { return mpPrinter; } 93cdf0e10cSrcweir 94cdf0e10cSrcweir virtual void DataChanged( const DataChangedEvent& rDCEvt ); 95cdf0e10cSrcweir virtual long Notify( NotifyEvent& rNEvt ); 96cdf0e10cSrcweir 97cdf0e10cSrcweir virtual short Execute(); 98cdf0e10cSrcweir 99cdf0e10cSrcweir void SetOptionsHdl( const Link& rLink ); 100cdf0e10cSrcweir const Link& GetOptionsHdl() const; 101cdf0e10cSrcweir }; 102cdf0e10cSrcweir 103cdf0e10cSrcweir // -------------------------------------- 104cdf0e10cSrcweir // - Hilfsfunktionen fuer Print-Dialoge - 105cdf0e10cSrcweir // -------------------------------------- 106cdf0e10cSrcweir 107cdf0e10cSrcweir #define IMPL_PRINTDLG_STATUS_UPDATE 15000 108cdf0e10cSrcweir 109cdf0e10cSrcweir void ImplFillPrnDlgListBox( const Printer* pPrinter, 110cdf0e10cSrcweir ListBox* pBox, PushButton* pPropBtn ); 111cdf0e10cSrcweir void ImplFreePrnDlgListBox( ListBox* pBox, sal_Bool bClear = sal_True ); 112cdf0e10cSrcweir Printer* ImplPrnDlgListBoxSelect( ListBox* pBox, PushButton* pPropBtn, 113cdf0e10cSrcweir Printer* pPrinter, Printer* pTempPrinter ); 114cdf0e10cSrcweir Printer* ImplPrnDlgUpdatePrinter( Printer* pPrinter, Printer* pTempPrinter ); 115cdf0e10cSrcweir void ImplPrnDlgUpdateQueueInfo( ListBox* pBox, QueueInfo& rInfo ); 116cdf0e10cSrcweir XubString ImplPrnDlgGetStatusText( const QueueInfo& rInfo ); 117cdf0e10cSrcweir 118cdf0e10cSrcweir #endif // _SV_PRNSETUP_HXX_ 119