KiCad PCB EDA Suite
Loading...
Searching...
No Matches
bitmap_info.h
Go to the documentation of this file.
1
2
/*
3
* This program source code file is part of KiCad, a free EDA CAD application.
4
*
5
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6
*
7
* This program is free software: you can redistribute it and/or modify it
8
* under the terms of the GNU General Public License as published by the
9
* Free Software Foundation, either version 3 of the License, or (at your
10
* option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License along
18
* with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef KICAD_BITMAP_INFO_H
22
#define KICAD_BITMAP_INFO_H
23
24
#include <
kicommon.h
>
25
#include <vector>
26
#include <unordered_map>
27
#include <
bitmaps/bitmaps_list.h
>
28
29
#include <wx/string.h>
30
#include <cstdint>
31
32
33
struct
KICOMMON_API
BITMAP_INFO
34
{
35
enum class
THEME
: uint16_t
36
{
37
LIGHT
,
38
DARK
,
39
NO_THEME
40
};
41
42
BITMAPS
id
;
43
int16_t
height
;
44
THEME
theme
;
45
std::string
filename
;
46
47
BITMAP_INFO
(
BITMAPS
aId,
const
wxString& aFilename, int16_t aHeight,
const
wxString& aTheme ) :
48
id
( aId ),
49
height
( aHeight ),
50
theme
( aTheme == wxS(
"light"
) ?
THEME
::
LIGHT
: ( aTheme == wxS(
"dark"
) ?
THEME
::
DARK
:
THEME
::
NO_THEME
) ),
51
filename
( aFilename.utf8_string() )
52
{};
53
54
};
55
56
57
extern
KICOMMON_API
void
BuildBitmapInfo
( std::unordered_map<
BITMAPS
,
58
std::vector<BITMAP_INFO>>& aBitmapInfoCache );
59
60
#endif
// KICAD_BITMAP_INFO_H
BuildBitmapInfo
KICOMMON_API void BuildBitmapInfo(std::unordered_map< BITMAPS, std::vector< BITMAP_INFO > > &aBitmapInfoCache)
Definition
bitmap_info.cpp:28
bitmaps_list.h
BITMAPS
BITMAPS
A list of all bitmap identifiers.
Definition
bitmaps_list.h:33
kicommon.h
KICOMMON_API
#define KICOMMON_API
Definition
kicommon.h:28
BITMAP_INFO::THEME
THEME
Definition
bitmap_info.h:36
BITMAP_INFO::THEME::NO_THEME
@ NO_THEME
Definition
bitmap_info.h:39
BITMAP_INFO::THEME::DARK
@ DARK
Definition
bitmap_info.h:38
BITMAP_INFO::THEME::LIGHT
@ LIGHT
Definition
bitmap_info.h:37
BITMAP_INFO::BITMAP_INFO
BITMAP_INFO(BITMAPS aId, const wxString &aFilename, int16_t aHeight, const wxString &aTheme)
Definition
bitmap_info.h:47
BITMAP_INFO::theme
THEME theme
Definition
bitmap_info.h:44
BITMAP_INFO::id
BITMAPS id
Definition
bitmap_info.h:42
BITMAP_INFO::height
int16_t height
Definition
bitmap_info.h:43
BITMAP_INFO::filename
std::string filename
Definition
bitmap_info.h:45
src
include
bitmaps
bitmap_info.h
Generated on Sun Feb 1 2026 00:08:27 for KiCad PCB EDA Suite by
1.13.2