Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / cui / source / inc / linkdlg.hxx
blob1e54954ec5556783dd833b6d6c795aea85ebab1d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <vcl/idle.hxx>
23 #include <vcl/virdev.hxx>
24 #include <vcl/weld.hxx>
26 /********************** SvUpdateLinksDialog ******************************
27 *************************************************************************/
28 namespace sfx2
30 class LinkManager;
31 class SvBaseLink;
34 enum class SfxLinkUpdateMode;
36 class SvBaseLinksDlg : public weld::GenericDialogController
38 OUString aStrAutolink;
39 OUString aStrManuallink;
40 OUString aStrBrokenlink;
41 OUString aStrCloselinkmsg;
42 OUString aStrCloselinkmsgMulti;
43 OUString aStrWaitinglink;
44 sfx2::LinkManager* pLinkMgr;
45 Idle aUpdateIdle;
47 std::unique_ptr<weld::TreeView> m_xTbLinks;
48 std::unique_ptr<weld::LinkButton> m_xFtFullFileName;
49 std::unique_ptr<weld::Label> m_xFtFullSourceName;
50 std::unique_ptr<weld::Label> m_xFtFullTypeName;
51 std::unique_ptr<weld::RadioButton> m_xRbAutomatic;
52 std::unique_ptr<weld::RadioButton> m_xRbManual;
53 std::unique_ptr<weld::Button> m_xPbUpdateNow;
54 std::unique_ptr<weld::Button> m_xPbChangeSource;
55 std::unique_ptr<weld::Button> m_xPbBreakLink;
57 ScopedVclPtr<VirtualDevice> m_xVirDev;
59 DECL_LINK(LinksSelectHdl, weld::TreeView&, void);
60 DECL_LINK(LinksDoubleClickHdl, weld::TreeView&, bool);
61 DECL_LINK(ToggleHdl, weld::Toggleable&, void);
62 DECL_LINK(UpdateNowClickHdl, weld::Button&, void);
63 DECL_LINK(ChangeSourceClickHdl, weld::Button&, void);
64 DECL_LINK(BreakLinkClickHdl, weld::Button&, void);
65 DECL_LINK(UpdateWaitingHdl, Timer*, void);
66 DECL_LINK(EndEditHdl, sfx2::SvBaseLink&, void);
67 void LinksSelectHdl(weld::TreeView* pTreeView);
68 sfx2::SvBaseLink* GetSelEntry(int* pPos);
69 OUString ImplGetStateStr(const sfx2::SvBaseLink&);
70 void SetType(sfx2::SvBaseLink& rLink, int nPos, SfxLinkUpdateMode nType);
71 void InsertEntry(const sfx2::SvBaseLink& rLink, int nPos = -1, bool bSelect = false);
73 void SetManager(sfx2::LinkManager*);
75 public:
76 SvBaseLinksDlg(weld::Window* pParent, sfx2::LinkManager*, bool bHtml);
77 virtual ~SvBaseLinksDlg() override;
78 void SetActLink(sfx2::SvBaseLink const* pLink);
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */