xref: /haiku/headers/libs/print/libprint/PageSetupDlg.h (revision 5a695bce105f327b826d66fb194d6564d6c3580a)
1 /*
2  * PageSetupDlg.h
3  * Copyright 1999-2000 Y.Takagi. All Rights Reserved.
4  */
5 
6 #ifndef __PAGESETUPDLG_H
7 #define __PAGESETUPDLG_H
8 
9 #include <View.h>
10 #include "DialogWindow.h"
11 #include "JobData.h"
12 
13 class BRadioButton;
14 class BPopUpMenu;
15 class JobData;
16 class PaperCap;
17 class PrinterData;
18 class PrinterCap;
19 class MarginView;
20 
21 class PageSetupView : public BView {
22 public:
23 	PageSetupView(JobData *job_data, PrinterData *printer_data,
24 		const PrinterCap *printer_cap);
25 	~PageSetupView();
26 	virtual void AttachedToWindow();
27 	bool UpdateJobData();
28 	void MessageReceived(BMessage *msg);
29 
30 private:
31 	void AddOrientationItem(const char *name, JobData::Orientation orientation);
32 	JobData::Orientation GetOrientation();
33 	PaperCap *GetPaperCap();
34 
35 	JobData          *fJobData;
36 	PrinterData      *fPrinterData;
37 	const PrinterCap *fPrinterCap;
38 	BPopUpMenu       *fPaper;
39 	BPopUpMenu       *fOrientation;
40 	BPopUpMenu       *fResolution;
41 	BTextControl     *fScaling;
42 	MarginView       *fMarginView;
43 };
44 
45 class PageSetupDlg : public DialogWindow {
46 public:
47 	PageSetupDlg(JobData *job_data, PrinterData *printer_data,
48 		const PrinterCap *printer_cap);
49 	virtual void MessageReceived(BMessage *message);
50 
51 private:
52 	BMessageFilter* fFilter;
53 	PageSetupView* fPageSetupView;
54 };
55 
56 #endif	/* __PAGESETUPDLG_H */
57