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 #ifndef INCLUDED_CUI_SOURCE_INC_MULTIPAT_HXX
20 #define INCLUDED_CUI_SOURCE_INC_MULTIPAT_HXX
21 
22 #include <vcl/weld.hxx>
23 
24 // define ----------------------------------------------------------------
25 
26 // different delimiter for Unix (:) and Windows (;)
27 
28 #ifdef UNX
29 #define CLASSPATH_DELIMITER ':'
30 #else
31 #define CLASSPATH_DELIMITER ';'
32 #endif
33 
35 {
36 private:
37  std::unique_ptr<weld::TreeView> m_xRadioLB;
38  std::unique_ptr<weld::Button> m_xAddBtn;
39  std::unique_ptr<weld::Button> m_xDelBtn;
40 
41  void AppendEntry(const OUString& rText, const OUString& rId);
42  void HandleEntryChecked(int nRow);
43 
44  DECL_LINK(AddHdl_Impl, weld::Button&, void);
45  DECL_LINK(DelHdl_Impl, weld::Button&, void);
46  DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
47  typedef std::pair<int, int> row_col;
48  DECL_LINK(CheckHdl_Impl, const row_col&, void);
49 
50 public:
52  virtual ~SvxMultiPathDialog() override;
53 
54  OUString GetPath() const;
55  void SetPath(const OUString& rPath);
56  void SetTitle(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
57 };
58 
60 {
61 private:
62  std::unique_ptr<weld::TreeView> m_xPathLB;
63  std::unique_ptr<weld::Button> m_xAddBtn;
64  std::unique_ptr<weld::Button> m_xDelBtn;
65 
66  DECL_LINK(AddHdl_Impl, weld::Button&, void);
67  DECL_LINK(DelHdl_Impl, weld::Button&, void);
68  DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
69 
70 public:
72 
73  OUString GetPath() const;
74  void SetPath( const OUString& rPath );
75  void SetTitle(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
76 };
77 
78 #endif // INCLUDED_CUI_SOURCE_INC_MULTIPAT_HXX
79 
80 /* 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:39
std::unique_ptr< weld::Button > m_xAddBtn
Definition: multipat.hxx:38
std::pair< int, int > row_col
Definition: multipat.hxx:47
OUString GetPath() const
Definition: multipat.cxx:256
void HandleEntryChecked(int nRow)
Definition: multipat.cxx:57
DECL_LINK(AddHdl_Impl, weld::Button &, void)
SvxPathSelectDialog(weld::Window *pParent)
Definition: multipat.cxx:212
void SetPath(const OUString &rPath)
Definition: multipat.cxx:270
void AppendEntry(const OUString &rText, const OUString &rId)
Definition: multipat.cxx:78
void SetTitle(const OUString &rTitle)
Definition: multipat.hxx:75
std::unique_ptr< weld::Button > m_xAddBtn
Definition: multipat.hxx:63
virtual ~SvxMultiPathDialog() override
Definition: multipat.cxx:228
std::unique_ptr< weld::TreeView > m_xRadioLB
Definition: multipat.hxx:37
SvxMultiPathDialog(weld::Window *pParent)
Definition: multipat.cxx:188
void SetTitle(const OUString &rTitle)
Definition: multipat.hxx:56
std::unique_ptr< weld::Button > m_xDelBtn
Definition: multipat.hxx:64
void SetPath(const OUString &rPath)
Definition: multipat.cxx:300
OUString GetPath() const
Definition: multipat.cxx:232
std::unique_ptr< weld::TreeView > m_xPathLB
Definition: multipat.hxx:62