Coverage Report

Created: 2026-08-14 10:22

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/Widget.hxx>
14
15
namespace weld
16
{
17
class VCL_DLLPUBLIC Notebook : virtual public Widget
18
{
19
protected:
20
    Link<const OUString&, bool> m_aLeavePageHdl;
21
    Link<const OUString&, void> m_aEnterPageHdl;
22
23
public:
24
    virtual int get_current_page() const = 0;
25
    virtual int get_page_index(const OUString& rIdent) const = 0;
26
    virtual OUString get_page_ident(int nPage) const = 0;
27
    virtual OUString get_current_page_ident() const = 0;
28
    virtual void set_current_page(int nPage) = 0;
29
    virtual void set_current_page(const OUString& rIdent) = 0;
30
    virtual void remove_page(const OUString& rIdent) = 0;
31
    virtual void insert_page(const OUString& rIdent, const OUString& rLabel, int nPos,
32
                             const OUString* pIconName = nullptr)
33
        = 0;
34
    void append_page(const OUString& rIdent, const OUString& rLabel,
35
                     const OUString* pIconName = nullptr)
36
0
    {
37
0
        insert_page(rIdent, rLabel, -1, pIconName);
38
0
    }
39
    virtual void set_tab_label_text(const OUString& rIdent, const OUString& rLabel) = 0;
40
    virtual OUString get_tab_label_text(const OUString& rIdent) const = 0;
41
    virtual void set_show_tabs(bool bShow) = 0;
42
    virtual int get_n_pages() const = 0;
43
    virtual weld::Container* get_page(const OUString& rIdent) const = 0;
44
45
0
    void connect_leave_page(const Link<const OUString&, bool>& rLink) { m_aLeavePageHdl = rLink; }
46
0
    void connect_enter_page(const Link<const OUString&, void>& rLink) { m_aEnterPageHdl = rLink; }
47
};
48
}
49
50
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */