1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SV_PRNSETUP_HXX_
21 #define _SV_PRNSETUP_HXX_
23 #include "svtools/svtdllapi.h"
25 #include <vcl/dialog.hxx>
26 #include <vcl/fixed.hxx>
27 #include <vcl/button.hxx>
28 #include <vcl/group.hxx>
29 #include <vcl/lstbox.hxx>
30 #include <vcl/timer.hxx>
31 #include <svtools/stdctrl.hxx>
36 // ----------------------
37 // - PrinterSetupDialog -
38 // ----------------------
40 class SVT_DLLPUBLIC PrinterSetupDialog
: public ModalDialog
44 PushButton
* m_pBtnProperties
;
45 PushButton
* m_pBtnOptions
;
46 FixedText
* m_pFiStatus
;
48 FixedText
* m_pFiLocation
;
49 FixedText
* m_pFiComment
;
50 AutoTimer maStatusTimer
;
52 Printer
* mpTempPrinter
;
54 SVT_DLLPRIVATE
void ImplSetInfo();
56 DECL_DLLPRIVATE_LINK( ImplPropertiesHdl
, void* );
57 DECL_DLLPRIVATE_LINK( ImplOptionsHdl
, void* );
58 DECL_DLLPRIVATE_LINK( ImplChangePrinterHdl
, void* );
59 DECL_DLLPRIVATE_LINK( ImplStatusHdl
, void* );
62 PrinterSetupDialog( Window
* pWindow
);
63 ~PrinterSetupDialog();
65 void SetPrinter( Printer
* pNewPrinter
) { mpPrinter
= pNewPrinter
; }
66 Printer
* GetPrinter() const { return mpPrinter
; }
68 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
69 virtual long Notify( NotifyEvent
& rNEvt
);
71 virtual short Execute();
73 void SetOptionsHdl( const Link
& rLink
);
76 // --------------------------------------
77 // - Hilfsfunktionen fuer Print-Dialoge -
78 // --------------------------------------
80 #define IMPL_PRINTDLG_STATUS_UPDATE 15000
82 void ImplFillPrnDlgListBox( const Printer
* pPrinter
,
83 ListBox
* pBox
, PushButton
* pPropBtn
);
84 void ImplFreePrnDlgListBox( ListBox
* pBox
, sal_Bool bClear
= sal_True
);
85 Printer
* ImplPrnDlgListBoxSelect( ListBox
* pBox
, PushButton
* pPropBtn
,
86 Printer
* pPrinter
, Printer
* pTempPrinter
);
87 Printer
* ImplPrnDlgUpdatePrinter( Printer
* pPrinter
, Printer
* pTempPrinter
);
88 void ImplPrnDlgUpdateQueueInfo( ListBox
* pBox
, QueueInfo
& rInfo
);
89 XubString
ImplPrnDlgGetStatusText( const QueueInfo
& rInfo
);
91 #endif // _SV_PRNSETUP_HXX_
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */