Coverage Report

Created: 2026-05-16 09:25

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/vcl/weld/Notebook.hxx
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2
/*
3
 * This file is part of the LibreOffice project.
4
 *
5
 * This Source Code Form is subject to the terms of the Mozilla Public
6
 * License, v. 2.0. If a copy of the MPL was not distributed with this
7
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
 */
9
10
#pragma once
11
12
#include <vcl/dllapi.h>
13
#include <vcl/weld/weld.hxx>
14
15
namespace weld
16
{
17
class VCL_DLLPUBLIC Notebook : virtual public Widget
18
{
19
    friend class ::LOKTrigger;
20
21
protected:
22
    Link<const OUString&, bool> m_aLeavePageHdl;
23
    Link<const OUString&, void> m_aEnterPageHdl;
24
25
public:
26
    virtual int get_current_page() const = 0;
27
    virtual int get_page_index(const OUString& rIdent) const = 0;
28
    virtual OUString get_page_ident(int nPage) const = 0;
29
    virtual OUString get_current_page_ident() const = 0;
30
    virtual void set_current_page(int nPage) = 0;
31
    virtual void set_current_page(const OUString& rIdent) = 0;
32
    virtual void remove_page(const OUString& rIdent) = 0;
33
    virtual void insert_page(const OUString& rIdent, const OUString& rLabel, int nPos,
34
                             const OUString* pIconName = nullptr)
35
        = 0;
36
    void append_page(const OUString& rIdent, const OUString& rLabel,
37
                     const OUString* pIconName = nullptr)
38
0
    {
39
0
        insert_page(rIdent, rLabel, -1, pIconName);
40
0
    }
41
    virtual void set_tab_label_text(const OUString& rIdent, const OUString& rLabel) = 0;
42
    virtual OUString get_tab_label_text(const OUString& rIdent) const = 0;
43
    virtual void set_show_tabs(bool bShow) = 0;
44
    virtual int get_n_pages() const = 0;
45
    virtual weld::Container* get_page(const OUString& rIdent) const = 0;
46
47
0
    void connect_leave_page(const Link<const OUString&, bool>& rLink) { m_aLeavePageHdl = rLink; }
48
0
    void connect_enter_page(const Link<const OUString&, void>& rLink) { m_aEnterPageHdl = rLink; }
49
};
50
}
51
52
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */