blob: 0edea06abe467d8203fd34ad4c3fcefd8239d0fe [file] [log] [blame]
[email protected]c48bee22011-03-29 02:36:261// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "printing/print_job_constants.h"
6
7namespace printing {
8
[email protected]718af822011-08-12 22:11:339// True if this is the first preview request.
10const char kIsFirstRequest[] = "isFirstRequest";
11
[email protected]a8851352011-07-13 20:16:2512// Unique ID sent along every preview request.
13const char kPreviewRequestID[] = "requestID";
14
[email protected]ff906742011-08-23 05:04:4615// Unique ID to identify a print preview UI.
16const char kPreviewUIAddr[] = "previewUIAddr";
17
[email protected]b579afd2011-07-13 00:01:2718// Print using cloud print: true if selected, false if not.
19const char kSettingCloudPrintId[] = "cloudPrintID";
20
[email protected]c97e5e82011-04-05 18:50:2321// Print job setting 'collate'.
22const char kSettingCollate[] = "collate";
23
[email protected]c48bee22011-03-29 02:36:2624// Print out color: true for color, false for grayscale.
25const char kSettingColor[] = "color";
26
[email protected]7a9b03e32011-08-23 19:56:1827// Key that specifies the height of the content area of the page.
28const char kSettingContentHeight[] = "contentHeight";
29
30// Key that specifies the width of the content area of the page.
31const char kSettingContentWidth[] = "contentWidth";
32
[email protected]c97e5e82011-04-05 18:50:2333// Number of copies.
34const char kSettingCopies[] = "copies";
35
[email protected]7a9b03e32011-08-23 19:56:1836// Key that specifies if the default margins have been selected or not.
37// True if selected, false if not.
38const char kSettingDefaultMarginsSelected[] = "defaultMarginsSelected";
39
[email protected]987e51f92011-05-04 21:10:1540// Device name: Unique printer identifier.
41const char kSettingDeviceName[] = "deviceName";
42
[email protected]826e63a162011-04-20 18:00:4543// Print job duplex mode.
44const char kSettingDuplexMode[] = "duplex";
45
[email protected]576f99642011-08-31 05:19:4146// True, when a new set of draft preview data is required.
47const char kSettingGenerateDraftData[] = "generateDraftData";
48
[email protected]55b23a02011-08-17 23:09:3649// Option to print headers and Footers: true if selected, false if not.
50const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
51
[email protected]151b4f242011-08-19 20:21:2852// Default character spacing for text while printing headers and footers.
53// (For CoreGraphics only).
54const int kSettingHeaderFooterCharacterSpacing = 0;
55
[email protected]55b23a02011-08-17 23:09:3656// Default font family name for printing the headers and footers.
57const char kSettingHeaderFooterFontFamilyName[] = "sans";
58
59// Default font name for printing the headers and footers.
60const char kSettingHeaderFooterFontName[] = "Helvetica";
61
62// Default font size for printing the headers and footers.
63const int kSettingHeaderFooterFontSize = 8;
64
65// Number of horizontal regions for headers and footers.
66const float kSettingHeaderFooterHorizontalRegions = 3;
67
68// Interstice or gap between different header footer components.
69// Hardcoded to 0.25cm = 1/10" = 7.2points.
70const float kSettingHeaderFooterInterstice = 7.2f;
71
72// Key that specifies the date of the page that will be printed in the headers
73// and footers.
74const char kSettingHeaderFooterDate[] = "date";
75
76// Key that specifies the title of the page that will be printed in the headers
77// and footers.
78const char kSettingHeaderFooterTitle[] = "title";
79
80// Key that specifies the URL of the page that will be printed in the headers
81// and footers.
82const char kSettingHeaderFooterURL[] = "url";
83
[email protected]c48bee22011-03-29 02:36:2684// Page orientation: true for landscape, false for portrait.
85const char kSettingLandscape[] = "landscape";
86
[email protected]7a9b03e32011-08-23 19:56:1887// Key that specifies the bottom margin of the page.
88const char kSettingMarginBottom[] = "marginBottom";
89
90// Key that specifies the left margin of the page.
91const char kSettingMarginLeft[] = "marginLeft";
92
93// Key that specifies the right margin of the page.
94const char kSettingMarginRight[] = "marginRight";
95
96// Key that specifies the top margin of the page.
97const char kSettingMarginTop[] = "marginTop";
98
99// Key that specifies the array of custom margins as set by the user.
100const char kSettingMargins[] = "margins";
101
[email protected]06cb23882011-04-23 01:58:22102// A page range.
103const char kSettingPageRange[] = "pageRange";
104
105// The first page of a page range. (1-based)
106const char kSettingPageRangeFrom[] = "from";
107
108// The last page of a page range. (1-based)
109const char kSettingPageRangeTo[] = "to";
110
[email protected]f803c932011-03-30 16:40:12111// Printer name.
112const char kSettingPrinterName[] = "printerName";
113
[email protected]b73bb80b2011-04-20 01:58:39114// Print to PDF option: true if selected, false if not.
115const char kSettingPrintToPDF[] = "printToPDF";
116
[email protected]ff906742011-08-23 05:04:46117// Indices used to represent first preview page and complete preview document.
[email protected]fd0b503402011-07-26 09:01:33118const int FIRST_PAGE_INDEX = 0;
119const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
[email protected]fd0b503402011-07-26 09:01:33120
[email protected]c48bee22011-03-29 02:36:26121} // namespace printing