1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: stock wxArtProvider instance with default wxWin art
4 // Author: Vaclav Slavik
8 // Copyright: (c) Vaclav Slavik
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ---------------------------------------------------------------------------
14 // ---------------------------------------------------------------------------
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
19 #if defined(__BORLANDC__)
23 #include "wx/artprov.h"
24 #include "wx/module.h"
26 // ----------------------------------------------------------------------------
27 // wxDefaultArtProvider
28 // ----------------------------------------------------------------------------
30 class wxDefaultArtProvider
: public wxArtProvider
33 virtual wxBitmap
CreateBitmap(const wxArtID
& id
, const wxArtClient
& client
,
37 #define ART(artId, xpmRc) \
38 if ( id == artId ) return wxBitmap(xpmRc##_xpm);
41 // ----------------------------------------------------------------------------
42 // wxDefaultArtProviderModule
43 // ----------------------------------------------------------------------------
45 class wxDefaultArtProviderModule
: public wxModule
50 wxArtProvider::PushProvider(new wxDefaultArtProvider
);
55 DECLARE_DYNAMIC_CLASS(wxDefaultArtProviderModule
)
58 IMPLEMENT_DYNAMIC_CLASS(wxDefaultArtProviderModule
, wxModule
)
61 // ----------------------------------------------------------------------------
63 // ----------------------------------------------------------------------------
65 // XPM hack: make the arrays const
66 #define static static const
69 #include "../../art/htmsidep.xpm"
70 #include "../../art/htmoptns.xpm"
71 #include "../../art/htmbook.xpm"
72 #include "../../art/htmfoldr.xpm"
73 #include "../../art/htmpage.xpm"
76 #include "../../art/addbookm.xpm"
77 #include "../../art/delbookm.xpm"
78 #include "../../art/back.xpm"
79 #include "../../art/forward.xpm"
80 #include "../../art/up.xpm"
81 #include "../../art/down.xpm"
82 #include "../../art/toparent.xpm"
83 #include "../../art/fileopen.xpm"
84 #include "../../art/print.xpm"
85 #include "../../art/helpicon.xpm"
86 #include "../../art/tipicon.xpm"
90 // ----------------------------------------------------------------------------
91 // CreateBitmap routine
92 // ----------------------------------------------------------------------------
94 wxBitmap
wxDefaultArtProvider::CreateBitmap(const wxArtID
& id
,
95 const wxArtClient
& client
,
99 ART(wxART_HELP_SIDE_PANEL
, htmsidep
)
100 ART(wxART_HELP_SETTINGS
, htmoptns
)
101 ART(wxART_HELP_BOOK
, htmbook
)
102 ART(wxART_HELP_FOLDER
, htmfoldr
)
103 ART(wxART_HELP_PAGE
, htmpage
)
105 ART(wxART_ADD_BOOKMARK
, addbookm
)
106 ART(wxART_DEL_BOOKMARK
, delbookm
)
107 ART(wxART_GO_BACK
, back
)
108 ART(wxART_GO_FORWARD
, forward
)
110 ART(wxART_GO_DOWN
, down
)
111 ART(wxART_GO_TO_PARENT
, toparent
)
112 ART(wxART_FILE_OPEN
, fileopen
)
113 ART(wxART_PRINT
, print
)
114 ART(wxART_HELP
, helpicon
)
115 ART(wxART_TIP
, tipicon
)