bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svtools / breadcrumb.hxx
blob1889d923441cada6950699e80c613b3ac6318459
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/.
8 */
10 #ifndef INCLUDED_SVTOOLS_BREADCRUMB_HXX
11 #define INCLUDED_SVTOOLS_BREADCRUMB_HXX
13 #include <svtools/svtdllapi.h>
15 #include <vcl/layout.hxx>
17 #include <vector>
19 class FixedHyperlink;
21 #define SPACING 6
23 enum SvtBreadcrumbMode
25 ONLY_CURRENT_PATH = 0,
26 ALL_VISITED = 1
29 class CustomLink;
31 class SVT_DLLPUBLIC Breadcrumb : public VclHBox
33 private:
34 std::vector< VclPtr< CustomLink > > m_aLinks;
35 std::vector< VclPtr< FixedText > > m_aSeparators;
37 OUString m_sRootName;
38 OUString m_sClickedURL;
39 OUString m_aCurrentURL;
41 SvtBreadcrumbMode m_eMode;
43 Link<Breadcrumb*,void> m_aClickHdl;
45 void appendField();
46 bool showField( unsigned int nIndex, unsigned int nWidthMax );
48 DECL_LINK( ClickLinkHdl, FixedHyperlink&, void );
50 public:
51 Breadcrumb( vcl::Window* pParent );
52 virtual ~Breadcrumb() override;
54 void dispose() override;
55 void EnableFields( bool bEnable );
57 void SetClickHdl( const Link<Breadcrumb*,void>& rLink );
58 const OUString& GetHdlURL();
60 void SetRootName( const OUString& rURL );
61 void SetURL( const OUString& rURL );
62 void SetMode( SvtBreadcrumbMode eMode );
65 #endif
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */