Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PRINTING_PAGE_SETUP_H_ | 5 #ifndef PRINTING_PAGE_SETUP_H_ |
| 6 #define PRINTING_PAGE_SETUP_H_ | 6 #define PRINTING_PAGE_SETUP_H_ |
| 7 | 7 |
| 8 #include "printing/printing_export.h" | 8 #include "printing/printing_export.h" |
| 9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
| 10 | 10 |
| 11 namespace printing { | 11 namespace printing { |
| 12 | 12 |
| 13 // Margins for a page setup. | 13 // Margins for a page setup. |
| 14 class PRINTING_EXPORT PageMargins { | 14 class PRINTING_EXPORT PageMargins { |
| 15 public: | 15 public: |
| 16 PageMargins(); | 16 PageMargins(); |
| 17 | 17 |
| 18 // Set |rotate_margins| to true to rotate the margins anti-clockwise or | |
| 19 // set |rotate_margins| to false to use the specified margins. | |
| 20 PageMargins(const PageMargins& page_margins, bool rotate_margins); | |
|
vandebo (ex-Chrome)
2011/11/02 20:26:03
How about a rotate method instead of a modified co
kmadhusu
2011/11/02 23:15:03
Done.
| |
| 21 | |
| 18 void Clear(); | 22 void Clear(); |
| 19 | 23 |
| 20 // Equality operator. | 24 // Equality operator. |
| 21 bool Equals(const PageMargins& rhs) const; | 25 bool Equals(const PageMargins& rhs) const; |
| 22 | 26 |
| 23 // Vertical space for the overlay from the top of the sheet. | 27 // Vertical space for the overlay from the top of the sheet. |
| 24 int header; | 28 int header; |
| 25 // Vertical space for the overlay from the bottom of the sheet. | 29 // Vertical space for the overlay from the bottom of the sheet. |
| 26 int footer; | 30 int footer; |
| 27 // Margin on each side of the sheet. | 31 // Margin on each side of the sheet. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 | 84 |
| 81 // The printable area as selected by the user's margins. | 85 // The printable area as selected by the user's margins. |
| 82 gfx::Rect content_area_; | 86 gfx::Rect content_area_; |
| 83 | 87 |
| 84 // Effective margins. | 88 // Effective margins. |
| 85 PageMargins effective_margins_; | 89 PageMargins effective_margins_; |
| 86 | 90 |
| 87 // Requested margins. | 91 // Requested margins. |
| 88 PageMargins requested_margins_; | 92 PageMargins requested_margins_; |
| 89 | 93 |
| 94 // Store whether the |requested_margins_| were set forcefully. | |
|
vandebo (ex-Chrome)
2011/11/02 20:26:03
nit: were set forcefully -> respect printable_area
kmadhusu
2011/11/02 23:15:03
Done.
| |
| 95 bool has_forced_margins_value; | |
|
vandebo (ex-Chrome)
2011/11/02 20:26:03
nit: forced_margins_;
kmadhusu
2011/11/02 23:15:03
Done.
| |
| 96 | |
| 90 // Space that must be kept free for the overlays. | 97 // Space that must be kept free for the overlays. |
| 91 int text_height_; | 98 int text_height_; |
| 92 }; | 99 }; |
| 93 | 100 |
| 94 } // namespace printing | 101 } // namespace printing |
| 95 | 102 |
| 96 #endif // PRINTING_PAGE_SETUP_H_ | 103 #endif // PRINTING_PAGE_SETUP_H_ |
| OLD | NEW |