2 * Copyright 2008 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Julun, <host.haiku@gmx.de
8 #ifndef _JOB_SETUP_PANEL_H_
9 #define _JOB_SETUP_PANEL_H_
12 #include <PrintPanel.h>
40 const uint32 B_NO_OPTIONS
= 0x00000000;
41 const uint32 B_PRINT_TO_FILE
= 0x00000001;
42 const uint32 B_PRINT_SELECTION
= 0x00000002;
43 const uint32 B_PRINT_PAGE_RANGE
= 0x00000004;
44 const uint32 B_PRINT_COLLATE_COPIES
= 0x00000008;
48 class BJobSetupPanel
: public BPrintPanel
{
50 BJobSetupPanel(BPrinter
* printer
);
51 BJobSetupPanel(BPrinter
* printer
, uint32 flags
);
52 virtual ~BJobSetupPanel();
54 BJobSetupPanel(BMessage
* data
);
55 static BArchivable
* Instantiate(BMessage
* data
);
56 virtual status_t
Archive(BMessage
* data
, bool deep
= true) const;
57 virtual void MessageReceived(BMessage
* message
);
59 virtual status_t
Go();
61 BPrinter
* Printer() const;
62 void SetPrinter(BPrinter
* printer
, bool keepSettings
);
64 print_range
PrintRange() const;
65 void SetPrintRange(print_range range
);
67 int32
FirstPage() const;
68 int32
LastPage() const;
69 void SetPageRange(int32 firstPage
, int32 lastPage
);
71 uint32
OptionFlags() const;
72 void SetOptionFlags(uint32 flags
);
76 void _SetupInterface();
77 void _DisallowChar(BTextView
* textView
);
81 BPrinterRoster
* fPrinterRoster
;
83 print_range fPrintRange
;
84 uint32 fJobPanelFlags
;
86 BPopUpMenu
* fPrinterPopUp
;
87 BMenuField
* fPrinterMenuField
;
89 BStringView
* fPrinterInfo
;
90 BCheckBox
* fPrintToFile
;
91 BRadioButton
* fPrintAll
;
92 BRadioButton
* fPagesFrom
;
93 BTextControl
* fFirstPage
;
94 BTextControl
* fLastPage
;
95 BRadioButton
* fSelection
;
96 BTextControl
* fNumberOfCopies
;
105 } // namespace BPrivate
108 #endif // _JOB_SETUP_PANEL_H_