KiCad PCB EDA Suite
Loading...
Searching...
No Matches
bitmap_types.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2007-2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21
22#ifndef BITMAP_TYPES_H_
23#define BITMAP_TYPES_H_
24
25#include <kicommon.h>
26
27//FIXME: cannot include only this file in wxWidgets 2.9.3
28// test if it works under stable release
29// #include <wx/bitmap.h> // only to define wxBitmap
30class wxBitmap; // only to define wxBitmap
31class wxBitmapBundle;
32class wxWindow;
33class wxString;
34class BITMAP_STORE;
35
36enum class BITMAPS : unsigned int;
37
38enum class BITMAP_TYPE
39{
43};
44
46
53KICOMMON_API wxBitmap KiBitmap( BITMAPS aBitmap, int aHeightTag = -1 );
54
55KICOMMON_API wxBitmapBundle KiBitmapBundle( BITMAPS aBitmap, int aMinHeight = -1 );
56
64KICOMMON_API wxBitmapBundle KiBitmapBundleDef( BITMAPS aBitmap, int aDefHeight );
65
66KICOMMON_API wxBitmapBundle KiDisabledBitmapBundle( BITMAPS aBitmap, int aMinHeight = -1 );
67
68KICOMMON_API wxBitmapBundle KiDisabledBitmapBundleDef( BITMAPS aBitmap, int aDefHeight );
69
75
87KICOMMON_API wxBitmap KiScaledBitmap( BITMAPS aBitmap, wxWindow* aWindow, int aHeight = -1,
88 bool aQuantized = false );
89
96KICOMMON_API wxBitmap KiScaledBitmap( const wxBitmap& aBitmap, wxWindow* aWindow );
97
102KICOMMON_API int KiIconScale( wxWindow* aWindow );
103
110KICOMMON_API wxBitmap* KiBitmapNew( BITMAPS aBitmap );
111
112#endif // BITMAP_TYPES_H_
KICOMMON_API void ClearScaledBitmapCache()
Wipes out the scaled bitmap cache so that the icon theme can be changed.
Definition bitmap.cpp:180
KICOMMON_API wxBitmapBundle KiBitmapBundleDef(BITMAPS aBitmap, int aDefHeight)
Constructs and returns a bitmap bundle for the given icon ID, with the default bitmap size being aDef...
Definition bitmap.cpp:112
KICOMMON_API int KiIconScale(wxWindow *aWindow)
Return the automatic scale factor that would be used for a given window by KiScaledBitmap and KiScale...
Definition bitmap.cpp:130
KICOMMON_API BITMAP_STORE * GetBitmapStore()
Definition bitmap.cpp:88
BITMAP_TYPE
KICOMMON_API wxBitmap KiScaledBitmap(BITMAPS aBitmap, wxWindow *aWindow, int aHeight=-1, bool aQuantized=false)
Construct a wxBitmap from a memory record, scaling it if device DPI demands it.
Definition bitmap.cpp:155
KICOMMON_API wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight=-1)
Definition bitmap.cpp:106
KICOMMON_API wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag=-1)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition bitmap.cpp:100
KICOMMON_API wxBitmapBundle KiDisabledBitmapBundleDef(BITMAPS aBitmap, int aDefHeight)
Definition bitmap.cpp:124
KICOMMON_API wxBitmap * KiBitmapNew(BITMAPS aBitmap)
Allocate a wxBitmap on heap from a memory record, held in a BITMAPS.
Definition bitmap.cpp:206
KICOMMON_API wxBitmapBundle KiDisabledBitmapBundle(BITMAPS aBitmap, int aMinHeight=-1)
Definition bitmap.cpp:118
BITMAPS
A list of all bitmap identifiers.
Helper to retrieve bitmaps while handling icon themes and scaling.
#define KICOMMON_API
Definition kicommon.h:27