xref: /haiku/src/add-ons/print/drivers/preview/PageSetupWindow.h (revision b671e9bbdbd10268a042b4f4cc4317ccd03d105e)
1 /*
2  * Copyright 2003-2008, Haiku. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Philippe Houdoin
7  *		Simon Gauvin
8  *		Michael Pfeiffer
9  *		Dr. Hartmut Reh
10  *		julun <host.haiku@gmx.de>
11  */
12 
13 #ifndef PAGESETUPWINDOW_H
14 #define PAGESETUPWINDOW_H
15 
16 
17 #include "BlockingWindow.h"
18 #include "PrintUtils.h"
19 
20 
21 #include <String.h>
22 
23 
24 class BMessage;
25 class BMenuField;
26 class BTextControl;
27 class MarginView;
28 
29 
30 class PageSetupWindow : public BlockingWindow
31 {
32 public:
33 					PageSetupWindow(BMessage *msg, const char *printerName = NULL);
34 	virtual void 	MessageReceived(BMessage *msg);
35 
36 	enum			{
37 						OK_MSG = 'ok__',
38 						CANCEL_MSG = 'cncl',
39 						PAGE_SIZE_CHANGED = 'pgsz',
40 						ORIENTATION_CHANGED = 'ornt'
41 					};
42 private:
43 	void			UpdateSetupMessage();
44 
45 private:
46 	BMessage *		fSetupMsg;
47 	BMenuField *	fPageSizeMenu;
48 	BMenuField *	fOrientationMenu;
49 	BTextControl *	fScaleControl;
50 	MarginView *	fMarginView;
51 	BString			fPrinterDirName;
52 	int32			fCurrentOrientation;
53 };
54 
55 #endif
56