summaryrefslogtreecommitdiffstats
path: root/include/orcus/spreadsheet/import_interface_view.hpp
blob: 8e6b53e6e04c88b21bc762c3fdb8f8997bbe3881 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
/* -*- 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 IMPORT_ORCUS_SPREADSHEET_IMPORT_INTERFACE_VIEW_HPP
#define IMPORT_ORCUS_SPREADSHEET_IMPORT_INTERFACE_VIEW_HPP

#include <cstdlib>

#include "view_types.hpp"
#include "../types.hpp"
#include "../env.hpp"

namespace orcus { namespace spreadsheet { namespace iface {

/**
 * Interface for importing view properties.  This interface may be obtained
 * from the import_sheet interface.
 */
class ORCUS_DLLPUBLIC import_sheet_view
{
public:
    virtual ~import_sheet_view();

    /**
     * Set the current sheet as the active sheet.
     */
    virtual void set_sheet_active() = 0;

    /**
     * Set the information about split view in the current sheet.
     *
     * @param hor_split horizontal position of the split in 1/20th of a point,
     *                  or 0 if none.  "Horizontal" in this case indicates the
     *                  column direction.
     * @param ver_split vertical position of the split in 1/20th of a point,
     *                  or 0 if none.  "Vertical" in this case indicates the
     *                  row direction.
     * @param top_left_cell the top left visible cell in the bottom right
     *                      pane.
     * @param active_pane active pane in this sheet.
     */
    virtual void set_split_pane(
        double hor_split, double ver_split, const address_t& top_left_cell,
        sheet_pane_t active_pane) = 0;

    /**
     * Set the state of frozen view in the current sheet.
     *
     * @param visible_columns number of visible columns in the left pane.
     * @param visible_rows number of visible rows in the top pane.
     * @param top_left_cell the top left visible cell in the bottom right
     *                      pane.
     * @param active_pane active pane in this sheet.
     */
    virtual void set_frozen_pane(
        col_t visible_columns, row_t visible_rows, const address_t& top_left_cell,
        sheet_pane_t active_pane) = 0;

    /**
     * Set the selected cursor range in a specified sheet pane.
     *
     * @param pane sheet pane associated with the selection.  The top-left
     *             pane is used for a non-split sheet view.
     * @param range selected cursor range.  The range will be 1 column by 1
     *              row when the cursor is on a single cell only.
     */
    virtual void set_selected_range(sheet_pane_t pane, range_t range) = 0;
};

}}}

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */