LibreOffice Module fpicker (master) 1
breadcrumb.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/weld.hxx>
13#include <map>
14#include <vector>
15
16#define SPACING 6
17
19{
21 ALL_VISITED = 1
22};
23
25{
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;
31};
32
34{
35private:
38
39 std::vector<std::unique_ptr<BreadcrumbPath>> m_aSegments;
40 std::map<weld::LinkButton*, OUString> m_aUris;
41
42 OUString m_sRootName;
43 OUString m_sClickedURL;
44 OUString m_aCurrentURL;
45
47
49
50 void appendField();
51 bool showField(unsigned int nIndex, unsigned int nWidthMax);
52
53 DECL_LINK(SizeAllocHdl, const Size&, void);
54 DECL_LINK(ClickLinkHdl, weld::LinkButton&, bool);
55
56public:
59
60 void EnableFields(bool bEnable);
61
63 const OUString& GetHdlURL() const;
64
65 void SetRootName(const OUString& rURL);
66 void SetURL(const OUString& rURL);
67 void SetMode(SvtBreadcrumbMode eMode);
68};
69
70/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvtBreadcrumbMode
Definition: breadcrumb.hxx:19
@ ALL_VISITED
Definition: breadcrumb.hxx:21
@ ONLY_CURRENT_PATH
Definition: breadcrumb.hxx:20
Breadcrumb(weld::Container *pParent)
Definition: breadcrumb.cxx:14
DECL_LINK(ClickLinkHdl, weld::LinkButton &, bool)
bool showField(unsigned int nIndex, unsigned int nWidthMax)
Definition: breadcrumb.cxx:209
void EnableFields(bool bEnable)
Definition: breadcrumb.cxx:33
int m_nMaxWidth
Definition: breadcrumb.hxx:37
weld::Container * m_pParent
Definition: breadcrumb.hxx:36
SvtBreadcrumbMode m_eMode
Definition: breadcrumb.hxx:46
void connect_clicked(const Link< Breadcrumb *, bool > &rLink)
Definition: breadcrumb.cxx:43
void SetMode(SvtBreadcrumbMode eMode)
Definition: breadcrumb.cxx:194
void SetRootName(const OUString &rURL)
Definition: breadcrumb.cxx:53
OUString m_aCurrentURL
Definition: breadcrumb.hxx:44
const OUString & GetHdlURL() const
Definition: breadcrumb.cxx:48
OUString m_sClickedURL
Definition: breadcrumb.hxx:43
std::map< weld::LinkButton *, OUString > m_aUris
Definition: breadcrumb.hxx:40
DECL_LINK(SizeAllocHdl, const Size &, void)
OUString m_sRootName
Definition: breadcrumb.hxx:42
std::vector< std::unique_ptr< BreadcrumbPath > > m_aSegments
Definition: breadcrumb.hxx:39
Link< Breadcrumb *, bool > m_aClickHdl
Definition: breadcrumb.hxx:48
void SetURL(const OUString &rURL)
Definition: breadcrumb.cxx:68
void appendField()
Definition: breadcrumb.cxx:199
std::unique_ptr< weld::Label > m_xSeparator
Definition: breadcrumb.hxx:30
std::unique_ptr< weld::Container > m_xContainer
Definition: breadcrumb.hxx:28
std::unique_ptr< weld::Builder > m_xBuilder
Definition: breadcrumb.hxx:27
std::unique_ptr< weld::LinkButton > m_xLink
Definition: breadcrumb.hxx:29
BreadcrumbPath(weld::Container *pParent)
Definition: breadcrumb.cxx:238