2 * Copyright 2009, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _PRINTSESSION_H
6 #define _PRINTSESSION_H
15 struct print_file_header
{
28 // Values returned by PrinterType()
35 BPrintJob(const char* name
);
43 status_t
ConfigPage();
48 virtual void DrawView(BView
* view
, BRect rect
,
51 BMessage
* Settings(); // TODO: const
52 void SetSettings(BMessage
* archive
);
53 bool IsSettingsMessageValid(
54 BMessage
* archive
) const;
57 BRect
PrintableRect();
58 void GetResolution(int32
* xDPI
, int32
* yDPI
);
60 int32
FirstPage(); // TODO: const
61 int32
LastPage(); // TODO: const
62 int32
PrinterType(void* type
= NULL
) const;
66 // FBC padding and forbidden methods
67 virtual void _ReservedPrintJob1();
68 virtual void _ReservedPrintJob2();
69 virtual void _ReservedPrintJob3();
70 virtual void _ReservedPrintJob4();
72 BPrintJob(const BPrintJob
& other
);
73 BPrintJob
& operator=(const BPrintJob
& other
);
76 void _RecurseView(BView
* view
, BPoint origin
,
77 BPicture
* picture
, BRect rect
);
78 void _GetMangledName(char* buffer
,
79 size_t bufferSize
) const;
80 void _HandlePageSetup(BMessage
* setup
);
81 bool _HandlePrintSetup(BMessage
* setup
);
87 void _AddPicture(BPicture
& picture
, BRect
& rect
,
90 char* _GetCurrentPrinterName() const;
91 void _LoadDefaultSettings();
99 print_file_header fSpoolFileHeader
;
103 char fSpoolFileName
[256];
104 BMessage
* fSetupMessage
;
105 BMessage
* fDefaultSetupMessage
;
111 _page_header_
* fCurrentPageHeader
;
112 off_t fCurrentPageHeaderOffset
;
117 #endif // _PRINTSESSION_H