diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:48:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:48:59 +0000 |
commit | c484829272cd13a738e35412498e12f2c9a194ac (patch) | |
tree | a1f5ec09629ee895bd3963fa8820b45f2f4c574b /include/orcus/spreadsheet/view.hpp | |
parent | Initial commit. (diff) | |
download | liborcus-upstream.tar.xz liborcus-upstream.zip |
Adding upstream version 0.19.2.upstream/0.19.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/orcus/spreadsheet/view.hpp')
-rw-r--r-- | include/orcus/spreadsheet/view.hpp | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/include/orcus/spreadsheet/view.hpp b/include/orcus/spreadsheet/view.hpp new file mode 100644 index 0000000..7b5552f --- /dev/null +++ b/include/orcus/spreadsheet/view.hpp @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_ORCUS_SPREADSHEET_VIEW_HPP +#define INCLUDED_ORCUS_SPREADSHEET_VIEW_HPP + +#include "orcus/env.hpp" +#include "orcus/spreadsheet/types.hpp" +#include "orcus/spreadsheet/view_types.hpp" + +#include <memory> + +namespace orcus { namespace spreadsheet { + +class sheet_view; +class document; + +class ORCUS_SPM_DLLPUBLIC view +{ + struct impl; + std::unique_ptr<impl> mp_impl; +public: + view(document& doc); + ~view(); + + sheet_view* get_or_create_sheet_view(sheet_t sheet); + const sheet_view* get_sheet_view(sheet_t sheet) const; + + void set_active_sheet(sheet_t sheet); + sheet_t get_active_sheet() const; +}; + +class ORCUS_SPM_DLLPUBLIC sheet_view +{ + struct impl; + std::unique_ptr<impl> mp_impl; +public: + sheet_view(view& doc_view); + ~sheet_view(); + + const range_t& get_selection(sheet_pane_t pos) const; + + void set_selection(sheet_pane_t pos, const range_t& range); + + void set_active_pane(sheet_pane_t pos); + sheet_pane_t get_active_pane() const; + + void set_split_pane(double hor_split, double ver_split, const address_t& top_left_cell); + const split_pane_t& get_split_pane() const; + + void set_frozen_pane(col_t visible_cols, row_t visible_rows, const address_t& top_left_cell); + const frozen_pane_t& get_frozen_pane() const; + + view& get_document_view(); +}; + +}} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |