wxMaxima
Loading...
Searching...
No Matches
wxMaximaArtProvider.h
Go to the documentation of this file.
1// -*- mode: c++; c-file-style: "linux"; c-basic-offset: 2; indent-tabs-mode:
2// nil -*-
3//
4// Copyright (C) 2026 Wolfgang Dautermann
5//
6// This program is free software; you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation; either version 2 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16//
17// You should have received a copy of the GNU General Public License
18// along with this program; if not, write to the Free Software
19// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20//
21// SPDX-License-Identifier: GPL-2.0+
22
28// only use that for recent wxWidgets versions
29#include <wx/version.h>
30#if wxCHECK_VERSION(3, 1, 6)
31
32#include <wx/artprov.h>
33
34// from art:
35#define wxmaximaART_MEDIA_PLAYBACK_START wxART_MAKE_ART_ID(wxmaximaART_MEDIA_PLAYBACK_START)
36#define wxmaximaART_MEDIA_PLAYBACK_REVERSE wxART_MAKE_ART_ID(wxmaximaART_MEDIA_PLAYBACK_REVERSE)
37
38// from art/toolbar:
39#define wxmaximaART_ARROW_UP_SQUARE wxART_MAKE_ART_ID(wxmaximaART_ARROW_UP_SQUARE)
40#define wxmaximaART_DIALOG_INFORMATION wxART_MAKE_ART_ID(wxmaximaART_DIALOG_INFORMATION)
41#define wxmaximaART_EYE_SLASH wxART_MAKE_ART_ID(wxmaximaART_EYE_SLASH)
42#define wxmaximaART_GO_BOTTOM wxART_MAKE_ART_ID(wxmaximaART_GO_BOTTOM)
43#define wxmaximaART_GO_JUMP wxART_MAKE_ART_ID(wxmaximaART_GO_JUMP)
44#define wxmaximaART_GO_LAST wxART_MAKE_ART_ID(wxmaximaART_GO_LAST)
45#define wxmaximaART_GO_NEXT wxART_MAKE_ART_ID(wxmaximaART_GO_NEXT)
46#define wxmaximaART_GTK_PREFERENCES wxART_MAKE_ART_ID(wxmaximaART_GTK_PREFERENCES)
47#define wxmaximaART_GTK_SELECT_ALL wxART_MAKE_ART_ID(wxmaximaART_GTK_SELECT_ALL)
48#define wxmaximaART_GTK_STOP wxART_MAKE_ART_ID(wxmaximaART_GTK_STOP)
49#define wxmaximaART_INPUT wxART_MAKE_ART_ID(wxmaximaART_INPUT)
50#define wxmaximaART_MEDIA_PLAYBACK_STOP wxART_MAKE_ART_ID(wxmaximaART_MEDIA_PLAYBACK_STOP)
51#define wxmaximaART_SOFTWARE_UPDATE_URGENT wxART_MAKE_ART_ID(wxmaximaART_SOFTWARE_UPDATE_URGENT)
52#define wxmaximaART_TEXT wxART_MAKE_ART_ID(wxmaximaART_TEXT)
53#define wxmaximaART_VIEW_REFRESH1 wxART_MAKE_ART_ID(wxmaximaART_VIEW_REFRESH1)
54
55
56
57class wxMaximaArtProvider : public wxArtProvider
58{
59protected:
60 // Override this method to return a bundle containing the required
61 // bitmap in all available sizes.
62 wxBitmapBundle CreateBitmapBundle(const wxArtID& id,
63 const wxArtClient& client,
64 const wxSize& size) override;
65
66private:
67 // gunzip the (gzip compressed) SVG in Memory
68 wxString gunzip(unsigned char * svg_gz, size_t svg_gz_size);
69};
70#endif