LibreOffice Module vcl (master) 1
IconThemeScanner.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#ifndef INCLUDED_VCL_ICONTHEMESCANNER_HXX
11#define INCLUDED_VCL_ICONTHEMESCANNER_HXX
12
13#include <vcl/dllapi.h>
14
15#include <rtl/ustring.hxx>
16#include <vcl/IconThemeInfo.hxx>
17
18#include <memory>
19#include <vector>
20
21// forward declaration of unit test class. Required for friend relationship.
22class IconThemeScannerTest;
23
24namespace vcl
25{
29{
30public:
34 static std::shared_ptr<IconThemeScanner> Create(std::u16string_view path);
35
38 static OUString GetStandardIconThemePath();
39
40 const std::vector<IconThemeInfo>& GetFoundIconThemes() const { return mFoundIconThemes; }
41
46 const IconThemeInfo& GetIconThemeInfo(const OUString& themeId);
47
51 bool IconThemeIsInstalled(const OUString& themeId) const;
52
53private:
55
63 void ScanDirectoryForIconThemes(std::u16string_view path);
64
67 bool AddIconThemeByPath(const OUString& path);
68
72 static std::vector<OUString> ReadIconThemesFromPath(const OUString& dir);
73
75 static bool FileIsValidIconTheme(const OUString&);
76
77 std::vector<IconThemeInfo> mFoundIconThemes;
78
79 friend class ::IconThemeScannerTest;
80};
81
82} // end namespace vcl
83
84#endif // INCLUDED_VCL_ICONTHEMESCANNER_HXX
85
86/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class provides information about an icon theme.
This class scans a folder for icon themes and provides the results.
std::vector< IconThemeInfo > mFoundIconThemes
const std::vector< IconThemeInfo > & GetFoundIconThemes() const
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
void Create(SwFormatVertOrient &rItem, SvStream &rStrm, sal_uInt16 nVersionAbusedAsSize)