/src/libreoffice/include/vcl/weld/Assistant.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/Dialog.hxx> |
14 | | |
15 | | namespace weld |
16 | | { |
17 | | class VCL_DLLPUBLIC Assistant : virtual public Dialog |
18 | | { |
19 | | Link<const OUString&, bool> m_aJumpPageHdl; |
20 | | |
21 | | protected: |
22 | | bool signal_jump_page(const OUString& rIdent) |
23 | 0 | { |
24 | 0 | if (notify_events_disabled()) |
25 | 0 | return true; |
26 | 0 | return m_aJumpPageHdl.Call(rIdent); |
27 | 0 | } |
28 | | |
29 | | virtual void do_set_current_page(int nPage) = 0; |
30 | | virtual void do_set_current_page(const OUString& rIdent) = 0; |
31 | | virtual void do_set_page_index(const OUString& rIdent, int nIndex) = 0; |
32 | | virtual void do_set_page_title(const OUString& rIdent, const OUString& rTitle) = 0; |
33 | | virtual void do_set_page_sensitive(const OUString& rIdent, bool bSensitive) = 0; |
34 | | |
35 | | public: |
36 | | virtual int get_current_page() const = 0; |
37 | | virtual int get_n_pages() const = 0; |
38 | | virtual OUString get_page_ident(int nPage) const = 0; |
39 | | virtual OUString get_current_page_ident() const = 0; |
40 | | |
41 | | void set_current_page(int nPage); |
42 | | |
43 | | void set_current_page(const OUString& rIdent); |
44 | | |
45 | | // move the page rIdent to position nIndex |
46 | | void set_page_index(const OUString& rIdent, int nIndex); |
47 | | |
48 | | void set_page_title(const OUString& rIdent, const OUString& rTitle); |
49 | | |
50 | | virtual OUString get_page_title(const OUString& rIdent) const = 0; |
51 | | |
52 | | void set_page_sensitive(const OUString& rIdent, bool bSensitive); |
53 | | |
54 | | virtual weld::Container* append_page(const OUString& rIdent) = 0; |
55 | | |
56 | | virtual void set_page_side_help_id(const OUString& rHelpId) = 0; |
57 | | |
58 | | virtual void set_page_side_image(const OUString& rImage) = 0; |
59 | | |
60 | 0 | void connect_jump_page(const Link<const OUString&, bool>& rLink) { m_aJumpPageHdl = rLink; } |
61 | | }; |
62 | | } |
63 | | |
64 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |