20 #ifndef KICAD_BITMAP_STORE_H 21 #define KICAD_BITMAP_STORE_H 24 #include <unordered_map> 34 template<>
struct hash<
std::pair<BITMAPS, int>>
36 size_t operator()(
const std::pair<BITMAPS, int>& aPair )
const;
100 #endif // KICAD_BITMAP_STORE_H void buildBitmapInfoCache()
wxBitmap GetBitmapScaled(BITMAPS aBitmapId, int aScaleFactor, int aHeight=-1)
Retrieves a bitmap from the given bitmap id, scaled to a given factor.
An asset archive represents a file containing data assets that are loaded from disk and then cached i...
Helper to retrieve bitmaps while handling icon themes and scaling.
std::unordered_map< std::pair< BITMAPS, int >, wxString > m_bitmapNameCache
wxString computeBitmapName(BITMAPS aBitmapId, int aHeight=-1)
std::unordered_map< BITMAPS, std::vector< BITMAP_INFO > > m_bitmapInfoCache
wxImage getImage(BITMAPS aBitmapId, int aHeight=-1)
void ThemeChanged()
Notifies the store that the icon theme has been changed by the user, so caches must be invalidated.
BITMAPS
A list of all bitmap identifiers.
wxBitmap GetBitmap(BITMAPS aBitmapId, int aHeight=-1)
Retrieves a bitmap from the given bitmap id.
std::unique_ptr< ASSET_ARCHIVE > m_archive
const wxString & bitmapName(BITMAPS aBitmapId, int aHeight=-1)