xref: /haiku/src/add-ons/print/drivers/preview/JobSetupWindow.h (revision 5d9e40fe9252c8f9c5e5e41594545bfa4419fcc7)
1 /*
2 
3 Preview printer driver.
4 
5 Copyright (c) 2003 OpenBeOS.
6 
7 Authors:
8 	Philippe Houdoin
9 	Simon Gauvin
10 	Michael Pfeiffer
11 
12 Permission is hereby granted, free of charge, to any person obtaining a copy of
13 this software and associated documentation files (the "Software"), to deal in
14 the Software without restriction, including without limitation the rights to
15 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
16 of the Software, and to permit persons to whom the Software is furnished to do
17 so, subject to the following conditions:
18 
19 The above copyright notice and this permission notice shall be included in all
20 copies or substantial portions of the Software.
21 
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28 THE SOFTWARE.
29 
30 */
31 
32 #ifndef JOBSETUPWINDOW_H
33 #define JOBSETUPWINDOW_H
34 
35 #include <InterfaceKit.h>
36 #include "InterfaceUtils.h"
37 #include "Utils.h"
38 
39 class JobSetupWindow : public BlockingWindow
40 {
41 public:
42 	// Constructors, destructors, operators...
43 
44 							JobSetupWindow(BMessage *msg, const char *printer_name = NULL);
45 
46 	typedef BlockingWindow 		inherited;
47 
48 	// public constantes
49 	enum	{
50 		NB_COPIES_MSG		= 'copy',
51 		ALL_PAGES_MGS		= 'all_',
52 		RANGE_SELECTION_MSG	= 'rnge',
53 		RANGE_FROM_MSG		= 'from',
54 		RANGE_TO_MSG		= 'to__',
55 		OK_MSG				= 'ok__',
56 		CANCEL_MSG			= 'cncl',
57 	};
58 
59 	// Virtual function overrides
60 public:
61 	virtual void 			MessageReceived(BMessage *msg);
62 
63 	// From here, it's none of your business! ;-)
64 private:
65 	BString                 fPrinterName;
66 	BMessage				*fSetupMsg;
67 	BRadioButton			*fAll;
68 	BRadioButton			*fRange;
69 	BTextControl			*fFrom;
70 	BTextControl			*fTo;
71 
72 	void UpdateJobMessage();
73 };
74 
75 #endif
76 
77