Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _SV_PRNSETUP_HXX_
30 : : #define _SV_PRNSETUP_HXX_
31 : :
32 : : #include "svtools/svtdllapi.h"
33 : :
34 : : #include <vcl/dialog.hxx>
35 : : #include <vcl/fixed.hxx>
36 : : #include <vcl/button.hxx>
37 : : #include <vcl/group.hxx>
38 : : #include <vcl/lstbox.hxx>
39 : : #include <vcl/timer.hxx>
40 : : #include <svtools/stdctrl.hxx>
41 : :
42 : : class Printer;
43 : : class QueueInfo;
44 : :
45 : : // ----------------------
46 : : // - PrinterSetupDialog -
47 : : // ----------------------
48 : :
49 : : class SVT_DLLPUBLIC PrinterSetupDialog : public ModalDialog
50 : : {
51 : : private:
52 : : FixedLine maFlPrinter;
53 : : FixedText maFtName;
54 : : ListBox maLbName;
55 : : PushButton maBtnProperties;
56 : : PushButton maBtnOptions;
57 : : FixedText maFtStatus;
58 : : FixedInfo maFiStatus;
59 : : FixedText maFtType;
60 : : FixedInfo maFiType;
61 : : FixedText maFtLocation;
62 : : FixedInfo maFiLocation;
63 : : FixedText maFtComment;
64 : : FixedInfo maFiComment;
65 : : FixedLine maFlSepButton;
66 : : OKButton maBtnOK;
67 : : CancelButton maBtnCancel;
68 : : HelpButton maBtnHelp;
69 : : AutoTimer maStatusTimer;
70 : : Printer* mpPrinter;
71 : : Printer* mpTempPrinter;
72 : :
73 : : SVT_DLLPRIVATE void ImplSetInfo();
74 : :
75 : : DECL_DLLPRIVATE_LINK( ImplPropertiesHdl, void* );
76 : : DECL_DLLPRIVATE_LINK( ImplOptionsHdl, void* );
77 : : DECL_DLLPRIVATE_LINK( ImplChangePrinterHdl, void* );
78 : : DECL_DLLPRIVATE_LINK( ImplStatusHdl, void* );
79 : :
80 : : public:
81 : : PrinterSetupDialog( Window* pWindow );
82 : : ~PrinterSetupDialog();
83 : :
84 : 0 : void SetPrinter( Printer* pNewPrinter ) { mpPrinter = pNewPrinter; }
85 : 0 : Printer* GetPrinter() const { return mpPrinter; }
86 : :
87 : : virtual void DataChanged( const DataChangedEvent& rDCEvt );
88 : : virtual long Notify( NotifyEvent& rNEvt );
89 : :
90 : : virtual short Execute();
91 : :
92 : : void SetOptionsHdl( const Link& rLink );
93 : : };
94 : :
95 : : // --------------------------------------
96 : : // - Hilfsfunktionen fuer Print-Dialoge -
97 : : // --------------------------------------
98 : :
99 : : #define IMPL_PRINTDLG_STATUS_UPDATE 15000
100 : :
101 : : void ImplFillPrnDlgListBox( const Printer* pPrinter,
102 : : ListBox* pBox, PushButton* pPropBtn );
103 : : void ImplFreePrnDlgListBox( ListBox* pBox, sal_Bool bClear = sal_True );
104 : : Printer* ImplPrnDlgListBoxSelect( ListBox* pBox, PushButton* pPropBtn,
105 : : Printer* pPrinter, Printer* pTempPrinter );
106 : : Printer* ImplPrnDlgUpdatePrinter( Printer* pPrinter, Printer* pTempPrinter );
107 : : void ImplPrnDlgUpdateQueueInfo( ListBox* pBox, QueueInfo& rInfo );
108 : : XubString ImplPrnDlgGetStatusText( const QueueInfo& rInfo );
109 : :
110 : : #endif // _SV_PRNSETUP_HXX_
111 : :
112 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|