LibreOffice Module cui (master)  1
multipat.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 <vcl/weld.hxx>
22 
23 // define ----------------------------------------------------------------
24 
25 // different delimiter for Unix (:) and Windows (;)
26 
27 #ifdef UNX
28 #define CLASSPATH_DELIMITER ':'
29 #else
30 #define CLASSPATH_DELIMITER ';'
31 #endif
32 
34 {
35 private:
36  std::unique_ptr<weld::TreeView> m_xRadioLB;
37  std::unique_ptr<weld::Button> m_xAddBtn;
38  std::unique_ptr<weld::Button> m_xDelBtn;
39 
40  void AppendEntry(const OUString& rText, const OUString& rId);
41  void HandleEntryChecked(int nRow);
42 
43  DECL_LINK(AddHdl_Impl, weld::Button&, void);
44  DECL_LINK(DelHdl_Impl, weld::Button&, void);
45  DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
46  DECL_LINK(CheckHdl_Impl, const weld::TreeView::iter_col&, void);
47 
48 public:
50  virtual ~SvxMultiPathDialog() override;
51 
52  OUString GetPath() const;
53  void SetPath(const OUString& rPath);
54  void SetTitle(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
55 };
56 
58 {
59 private:
60  std::unique_ptr<weld::TreeView> m_xPathLB;
61  std::unique_ptr<weld::Button> m_xAddBtn;
62  std::unique_ptr<weld::Button> m_xDelBtn;
63 
64  DECL_LINK(AddHdl_Impl, weld::Button&, void);
65  DECL_LINK(DelHdl_Impl, weld::Button&, void);
66  DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
67 
68 public:
70 
71  OUString GetPath() const;
72  void SetPath( const OUString& rPath );
73  void SetTitle(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
74 };
75 
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::shared_ptr< weld::Dialog > m_xDialog
DECL_LINK(AddHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xDelBtn
Definition: multipat.hxx:38
std::pair< const TreeIter &, int > iter_col
std::unique_ptr< weld::Button > m_xAddBtn
Definition: multipat.hxx:37
OUString GetPath() const
Definition: multipat.cxx:251
void HandleEntryChecked(int nRow)
Definition: multipat.cxx:58
DECL_LINK(AddHdl_Impl, weld::Button &, void)
SvxPathSelectDialog(weld::Window *pParent)
Definition: multipat.cxx:207
void SetPath(const OUString &rPath)
Definition: multipat.cxx:265
void AppendEntry(const OUString &rText, const OUString &rId)
Definition: multipat.cxx:79
void SetTitle(const OUString &rTitle)
Definition: multipat.hxx:73
std::unique_ptr< weld::Button > m_xAddBtn
Definition: multipat.hxx:61
virtual ~SvxMultiPathDialog() override
Definition: multipat.cxx:223
std::unique_ptr< weld::TreeView > m_xRadioLB
Definition: multipat.hxx:36
SvxMultiPathDialog(weld::Window *pParent)
Definition: multipat.cxx:189
void SetTitle(const OUString &rTitle)
Definition: multipat.hxx:54
std::unique_ptr< weld::Button > m_xDelBtn
Definition: multipat.hxx:62
void SetPath(const OUString &rPath)
Definition: multipat.cxx:295
OUString GetPath() const
Definition: multipat.cxx:227
std::unique_ptr< weld::TreeView > m_xPathLB
Definition: multipat.hxx:60