LibreOffice Module framework (master) 1
CommandImageResolver.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#pragma once
11
12#include <vcl/image.hxx>
13#include <o3tl/enumarray.hxx>
14
15#include <com/sun/star/uno/Sequence.hxx>
16
17#include "ImageList.hxx"
18
19#include <memory>
20#include <unordered_map>
21#include <vector>
22
23namespace vcl
24{
26{
27private:
28 typedef std::unordered_map<OUString, OUString> CommandToImageNameMap;
29
31 std::vector<OUString> m_aImageCommandNameVector;
32 std::vector<OUString> m_aImageNameVector;
33
35 OUString m_sIconTheme;
36
37 ImageList* getImageList(ImageType nImageType);
38
39public:
42
43 void registerCommands(const css::uno::Sequence<OUString>& aCommandSequence);
44 Image getImageFromCommandURL(ImageType nImageType, const OUString& rCommandURL);
45
46 std::vector<OUString>& getCommandNames() { return m_aImageCommandNameVector; }
47
48 bool hasImage(const OUString& rCommandURL);
49};
50
51} // end namespace vcl
52
53/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool hasImage(const OUString &rCommandURL)
std::vector< OUString > m_aImageCommandNameVector
std::unordered_map< OUString, OUString > CommandToImageNameMap
Image getImageFromCommandURL(ImageType nImageType, const OUString &rCommandURL)
std::vector< OUString > m_aImageNameVector
CommandToImageNameMap m_aCommandToImageNameMap
ImageList * getImageList(ImageType nImageType)
o3tl::enumarray< ImageType, std::unique_ptr< ImageList > > m_pImageList
std::vector< OUString > & getCommandNames()
void registerCommands(const css::uno::Sequence< OUString > &aCommandSequence)