1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
21 #define INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
23 #include <vcl/idle.hxx>
24 #include <vcl/virdev.hxx>
25 #include <vcl/weld.hxx>
27 /********************** SvUpdateLinksDialog ******************************
28 *************************************************************************/
35 enum class SfxLinkUpdateMode
;
37 class SvBaseLinksDlg
: public weld::GenericDialogController
39 OUString aStrAutolink
;
40 OUString aStrManuallink
;
41 OUString aStrBrokenlink
;
42 OUString aStrCloselinkmsg
;
43 OUString aStrCloselinkmsgMulti
;
44 OUString aStrWaitinglink
;
45 sfx2::LinkManager
* pLinkMgr
;
48 std::unique_ptr
<weld::TreeView
> m_xTbLinks
;
49 std::unique_ptr
<weld::LinkButton
> m_xFtFullFileName
;
50 std::unique_ptr
<weld::Label
> m_xFtFullSourceName
;
51 std::unique_ptr
<weld::Label
> m_xFtFullTypeName
;
52 std::unique_ptr
<weld::RadioButton
> m_xRbAutomatic
;
53 std::unique_ptr
<weld::RadioButton
> m_xRbManual
;
54 std::unique_ptr
<weld::Button
> m_xPbUpdateNow
;
55 std::unique_ptr
<weld::Button
> m_xPbChangeSource
;
56 std::unique_ptr
<weld::Button
> m_xPbBreakLink
;
58 ScopedVclPtr
<VirtualDevice
> m_xVirDev
;
60 DECL_LINK( LinksSelectHdl
, weld::TreeView
&, void );
61 DECL_LINK( LinksDoubleClickHdl
, weld::TreeView
&, bool );
62 DECL_LINK( AutomaticClickHdl
, weld::Button
&, void );
63 DECL_LINK( ManualClickHdl
, weld::Button
&, void );
64 DECL_LINK( UpdateNowClickHdl
, weld::Button
&, void);
65 DECL_LINK( ChangeSourceClickHdl
, weld::Button
&, void );
66 DECL_LINK( BreakLinkClickHdl
, weld::Button
&, void );
67 DECL_LINK( UpdateWaitingHdl
, Timer
*, void );
68 DECL_LINK( EndEditHdl
, sfx2::SvBaseLink
&, void );
69 void LinksSelectHdl(weld::TreeView
* pTreeView
);
70 sfx2::SvBaseLink
* GetSelEntry(int* pPos
);
71 OUString
ImplGetStateStr( const sfx2::SvBaseLink
& );
72 void SetType(sfx2::SvBaseLink
& rLink
, int nPos
, SfxLinkUpdateMode nType
);
73 void InsertEntry(const sfx2::SvBaseLink
& rLink
, int nPos
= -1, bool bSelect
= false);
75 void SetManager( sfx2::LinkManager
* );
78 SvBaseLinksDlg(weld::Window
* pParent
, sfx2::LinkManager
*, bool bHtml
);
79 virtual ~SvBaseLinksDlg() override
;
80 void SetActLink( sfx2::SvBaseLink
const * pLink
);
83 #endif // INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */