36 lines
1.3 KiB
C
36 lines
1.3 KiB
C
#pragma once
|
|
|
|
#include <wx/animate.h>
|
|
#include <wx/bitmap.h>
|
|
#include <wx/image.h>
|
|
#include <wx/mstream.h>
|
|
|
|
//--------------------------------------------------------------
|
|
//--- icons_24x24 ----------------------------------------------
|
|
//--------------------------------------------------------------
|
|
extern const wxBitmap &icon_floppy_disk_24x24();
|
|
extern const wxBitmap &icon_minus_24x24();
|
|
extern const wxBitmap &icon_plus_24x24();
|
|
extern const wxBitmap &icon_rotate_left_24x24();
|
|
extern const wxBitmap &icon_xmark_24x24();
|
|
|
|
//--------------------------------------------------------------
|
|
|
|
//--------------------------------------------------------------
|
|
#define wxGetBitmapFromMemory(name) _wxGetBitmapFromMemory(name, sizeof(name))
|
|
inline wxBitmap _wxGetBitmapFromMemory(const unsigned char *data, int length)
|
|
{
|
|
wxMemoryInputStream is(data, length);
|
|
return { wxImage(is, wxBITMAP_TYPE_ANY, -1), -1 };
|
|
}
|
|
//--------------------------------------------------------------
|
|
#define wxGetAnimationFromMemory(name) _wxGetAnimationFromMemory(name, sizeof(name))
|
|
inline wxAnimation _wxGetAnimationFromMemory(const unsigned char *data, int length)
|
|
{
|
|
wxAnimation animate;
|
|
wxMemoryInputStream is(data, length);
|
|
animate.Load(is);
|
|
return animate;
|
|
}
|
|
//--------------------------------------------------------------
|