blob: 7b5552f870053469c67490adac56a7b4b780dee6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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: */
|