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/.
12 #include <vcl/weld.hxx>
18 enum SvtBreadcrumbMode
20 ONLY_CURRENT_PATH
= 0,
26 BreadcrumbPath(weld::Container
* pParent
);
27 std::unique_ptr
<weld::Builder
> m_xBuilder
;
28 std::unique_ptr
<weld::Container
> m_xContainer
;
29 std::unique_ptr
<weld::LinkButton
> m_xLink
;
30 std::unique_ptr
<weld::Label
> m_xSeparator
;
36 weld::Container
* m_pParent
;
39 std::vector
<std::unique_ptr
<BreadcrumbPath
>> m_aSegments
;
40 std::map
<weld::LinkButton
*, OUString
> m_aUris
;
43 OUString m_sClickedURL
;
44 OUString m_aCurrentURL
;
46 SvtBreadcrumbMode m_eMode
;
48 Link
<Breadcrumb
*, bool> m_aClickHdl
;
51 bool showField(unsigned int nIndex
, unsigned int nWidthMax
);
53 DECL_LINK(SizeAllocHdl
, const Size
&, void);
54 DECL_LINK(ClickLinkHdl
, weld::LinkButton
&, bool);
57 Breadcrumb(weld::Container
* pParent
);
60 void EnableFields(bool bEnable
);
62 void connect_clicked(const Link
<Breadcrumb
*, bool>& rLink
);
63 const OUString
& GetHdlURL() const;
65 void SetRootName(const OUString
& rURL
);
66 void SetURL(const OUString
& rURL
);
67 void SetMode(SvtBreadcrumbMode eMode
);
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */