LibreOffice Module cui (master) 1
optpath.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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <memory>
22#include <sfx2/tabdlg.hxx>
23
24#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
27
28// forward ---------------------------------------------------------------
29struct OptPath_Impl;
30class SvxPathTabPage;
31
32// class SvxPathTabPage --------------------------------------------------
34{
35private:
36 std::unique_ptr<OptPath_Impl> pImpl;
37
39 css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker;
40
41 std::unique_ptr<weld::Button> m_xStandardBtn;
42 std::unique_ptr<weld::Button> m_xPathBtn;
43 std::unique_ptr<weld::TreeView> m_xPathBox;
44
45 void ChangeCurrentEntry( const OUString& _rFolder );
46
47 DECL_LINK(PathHdl_Impl, weld::Button&, void);
48 DECL_LINK(DoubleClickPathHdl_Impl, weld::TreeView&, bool);
49 DECL_LINK(StandardHdl_Impl, weld::Button&, void);
50
51 DECL_LINK(PathSelect_Impl, weld::TreeView&, void);
52 DECL_LINK(HeaderBarClick, int, void);
53
54 DECL_LINK(DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void);
55
56 void GetPathList( SvtPathOptions::Paths _nPathHandle, OUString& _rInternalPath,
57 OUString& _rUserPath, OUString& _rWritablePath, bool& _rReadOnly );
58 void SetPathList( SvtPathOptions::Paths _nPathHandle,
59 std::u16string_view _rUserPath, const OUString& _rWritablePath );
60
61public:
62 SvxPathTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
63 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
64 virtual ~SvxPathTabPage() override;
65
66 virtual bool FillItemSet( SfxItemSet* rSet ) override;
67 virtual void Reset( const SfxItemSet* rSet ) override;
68};
69
70/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DECL_LINK(PathHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::TreeView > m_xPathBox
Definition: optpath.hxx:43
void GetPathList(SvtPathOptions::Paths _nPathHandle, OUString &_rInternalPath, OUString &_rUserPath, OUString &_rWritablePath, bool &_rReadOnly)
Definition: optpath.cxx:596
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpath.cxx:224
DECL_LINK(DialogClosedHdl, css::ui::dialogs::DialogClosedEvent *, void)
DECL_LINK(HeaderBarClick, int, void)
void SetPathList(SvtPathOptions::Paths _nPathHandle, std::u16string_view _rUserPath, const OUString &_rWritablePath)
Definition: optpath.cxx:661
void ChangeCurrentEntry(const OUString &_rFolder)
Definition: optpath.cxx:414
DECL_LINK(DoubleClickPathHdl_Impl, weld::TreeView &, bool)
rtl::Reference< ::svt::DialogClosedListener > xDialogListener
Definition: optpath.hxx:38
std::unique_ptr< weld::Button > m_xStandardBtn
Definition: optpath.hxx:41
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: optpath.cxx:218
DECL_LINK(PathSelect_Impl, weld::TreeView &, void)
virtual ~SvxPathTabPage() override
Definition: optpath.cxx:212
css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker
Definition: optpath.hxx:39
std::unique_ptr< OptPath_Impl > pImpl
Definition: optpath.hxx:36
std::unique_ptr< weld::Button > m_xPathBtn
Definition: optpath.hxx:42
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpath.cxx:236
DECL_LINK(StandardHdl_Impl, weld::Button &, void)
SvxPathTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpath.cxx:183