// Copyright (c) 2014-2021 Thomas Fussell // Copyright (c) 2010-2015 openpyxl // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE // // @license: http://www.opensource.org/licenses/mit-license.php // @author: see AUTHORS file #pragma once #include namespace xlnt { /// /// Describes the margins around a worksheet for printing. /// class XLNT_API page_margins { public: /// /// Constructs a page margins objects with Excel-default margins. /// page_margins(); /// /// Returns the top margin /// double top() const; /// /// Sets the top margin to top /// void top(double top); /// /// Returns the left margin /// double left() const; /// /// Sets the left margin to left /// void left(double left); /// /// Returns the bottom margin /// double bottom() const; /// /// Sets the bottom margin to bottom /// void bottom(double bottom); /// /// Returns the right margin /// double right() const; /// /// Sets the right margin to right /// void right(double right); /// /// Returns the header margin /// double header() const; /// /// Sets the header margin to header /// void header(double header); /// /// Returns the footer margin /// double footer() const; /// /// Sets the footer margin to footer /// void footer(double footer); bool operator==(const page_margins &rhs) const; private: /// /// The top margin /// double top_ = 1; /// /// The left margin /// double left_ = 0.75; /// /// The bottom margin /// double bottom_ = 1; /// /// The right margin /// double right_ = 0.75; /// /// The header margin /// double header_ = 0.5; /// /// The footer margin /// double footer_ = 0.5; }; } // namespace xlnt