xref: /aoo41x/main/padmin/source/cmddlg.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _PAD_COMMANDDLG_HXX_
29 #define _PAD_COMMANDDLG_HXX_
30 
31 #include <vcl/dialog.hxx>
32 #include <tools/config.hxx>
33 #ifndef _SV_BUTTON_HXX
34 #include <vcl/button.hxx>
35 #endif
36 #include <vcl/fixed.hxx>
37 #include <vcl/group.hxx>
38 #include <vcl/combobox.hxx>
39 #include <vcl/lstbox.hxx>
40 #include <vcl/field.hxx>
41 #include <vcl/tabpage.hxx>
42 
43 #include <list>
44 
45 namespace padmin {
46 
47 class RTSDialog;
48 
49 class CommandStore
50 {
51 	static void getStoredCommands( const char* pGroup, ::std::list< String >& rCommands );
52 	static void getSystemPrintCommands( ::std::list< String >& rCommands );
53 	static void getSystemPdfCommands( ::std::list< String >& rCommands );
54 	static void setCommands( const char* pGroup, const ::std::list< String >& rCommands, const ::std::list< String >& rSysCommands );
55 
56 public:
57 	static void getPrintCommands( ::std::list< String >& rCommands );
58 	static void getFaxCommands( ::std::list< String >& rCommands );
59 	static void getPdfCommands( ::std::list< String >& rCommands );
60 
61 	static void setPrintCommands( const ::std::list< String >& rCommands );
62 	static void setFaxCommands( const ::std::list< String >& rCommands );
63 	static void setPdfCommands( const ::std::list< String >& rCommands );
64 };
65 
66 class RTSCommandPage : public TabPage
67 {
68 private:
69 	RTSDialog*						m_pParent;
70 
71 	ComboBox     					m_aCommandsCB;
72     CheckBox                        m_aExternalCB;
73     FixedText                       m_aQuickFT;
74     ComboBox                        m_aQuickCB;
75 	FixedLine     					m_aCommandTitle;
76 	FixedText    					m_aPrinterName;
77 	FixedText    					m_aConnectedTo;
78 	FixedLine     					m_aPrinterFL;
79 
80 	FixedText						m_aConfigureText;
81 	ListBox							m_aConfigureBox;
82 	sal_uInt16							m_nPrinterEntry;
83 	sal_uInt16							m_nFaxEntry;
84 	sal_uInt16							m_nPdfEntry;
85 	FixedText						m_aPdfDirectoryText;
86 	PushButton						m_aPdfDirectoryButton;
87 	Edit							m_aPdfDirectoryEdit;
88 	CheckBox						m_aFaxSwallowBox;
89 
90 	PushButton						m_aHelpButton;
91 	PushButton						m_aRemovePB;
92 
93 	::std::list< String >			m_aPrinterCommands;
94 	::std::list< String >			m_aFaxCommands;
95 	::std::list< String >			m_aPdfCommands;
96 
97 	String							m_aFaxHelp;
98 	String							m_aPrinterHelp;
99 	String							m_aPdfHelp;
100 
101 	bool							m_bWasFax;
102 	bool							m_bWasPdf;
103     bool                            m_bWasExternalDialog;
104 
105 	DECL_LINK( DoubleClickHdl, ComboBox* );
106 	DECL_LINK( ClickBtnHdl, Button* );
107 	DECL_LINK( SelectHdl, Control* );
108 	DECL_LINK( ModifyHdl, Edit* );
109 
110 	void ConnectCommand();
111 	void UpdateCommands();
112 
113 public:
114 	RTSCommandPage( RTSDialog* );
115 	~RTSCommandPage();
116 
117 	void save();
118 };
119 
120 } // namespace
121 
122 #endif
123