// Copyright (c) 2014-2021 Thomas Fussell // // 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 #include #include namespace xlnt { /// /// A workbook can be opened in multiple windows with different views. /// This class represents a particular view used by one window. /// class XLNT_API workbook_view { public: /// /// If true, dates will be grouped when presenting the user with filtering options. /// bool auto_filter_date_grouping = true; /// /// If true, the view will be minimized. /// bool minimized = false; /// /// If true, the horizontal scroll bar will be displayed. /// bool show_horizontal_scroll = true; /// /// If true, the sheet tabs will be displayed. /// bool show_sheet_tabs = true; /// /// If true, the vertical scroll bar will be displayed. /// bool show_vertical_scroll = true; /// /// If true, the workbook window will be visible. /// bool visible = true; /// /// The optional index to the active sheet in this view. /// optional active_tab; /// /// The optional index to the first sheet in this view. /// optional first_sheet; /// /// The optional ratio between the tabs bar and the horizontal scroll bar. /// optional tab_ratio; /// /// The width of the workbook window in twips. /// optional window_width; /// /// The height of the workbook window in twips. /// optional window_height; /// /// The distance of the workbook window from the left side of the screen in twips. /// optional x_window; /// /// The distance of the workbook window from the top of the screen in twips. /// optional y_window; }; inline bool operator==(const workbook_view &lhs, const workbook_view &rhs) { return lhs.active_tab == rhs.active_tab && lhs.auto_filter_date_grouping == rhs.auto_filter_date_grouping && lhs.first_sheet == rhs.first_sheet && lhs.minimized == rhs.minimized && lhs.show_horizontal_scroll == rhs.show_horizontal_scroll && lhs.show_sheet_tabs == rhs.show_sheet_tabs && lhs.show_vertical_scroll == rhs.show_vertical_scroll && lhs.tab_ratio == rhs.tab_ratio && lhs.visible == rhs.visible; } } // namespace xlnt