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 // ---------------------------------------------------------------------------
17 #pragma implementation "artprov.h"
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
23 #if defined(__BORLANDC__)
27 #include "wx/artprov.h"
28 #include "wx/module.h"
30 // ----------------------------------------------------------------------------
31 // wxDefaultArtProvider
32 // ----------------------------------------------------------------------------
34 class wxDefaultArtProvider
: public wxArtProvider
37 virtual wxBitmap
CreateBitmap(const wxArtID
& id
, const wxArtClient
& client
,
41 #define ART(artId, xpmRc) \
42 if ( id == artId ) return wxBitmap(xpmRc##_xpm);
45 // ----------------------------------------------------------------------------
46 // wxDefaultArtProviderModule
47 // ----------------------------------------------------------------------------
49 class wxDefaultArtProviderModule
: public wxModule
54 wxArtProvider::PushProvider(new wxDefaultArtProvider
);
59 DECLARE_DYNAMIC_CLASS(wxDefaultArtProviderModule
)
62 IMPLEMENT_DYNAMIC_CLASS(wxDefaultArtProviderModule
, wxModule
)
65 // ----------------------------------------------------------------------------
67 // ----------------------------------------------------------------------------
69 // XPM hack: make the arrays const
70 #define static static const
73 #include "../../art/htmsidep.xpm"
74 #include "../../art/htmoptns.xpm"
75 #include "../../art/htmbook.xpm"
76 #include "../../art/htmfoldr.xpm"
77 #include "../../art/htmpage.xpm"
80 #include "../../art/addbookm.xpm"
81 #include "../../art/delbookm.xpm"
82 #include "../../art/back.xpm"
83 #include "../../art/forward.xpm"
84 #include "../../art/up.xpm"
85 #include "../../art/down.xpm"
86 #include "../../art/toparent.xpm"
87 #include "../../art/fileopen.xpm"
88 #include "../../art/print.xpm"
89 #include "../../art/helpicon.xpm"
90 #include "../../art/tipicon.xpm"
94 // ----------------------------------------------------------------------------
95 // CreateBitmap routine
96 // ----------------------------------------------------------------------------
98 wxBitmap
wxDefaultArtProvider::CreateBitmap(const wxArtID
& id
,
99 const wxArtClient
& client
,
103 ART(wxART_HELP_SIDE_PANEL
, htmsidep
)
104 ART(wxART_HELP_SETTINGS
, htmoptns
)
105 ART(wxART_HELP_BOOK
, htmbook
)
106 ART(wxART_HELP_FOLDER
, htmfoldr
)
107 ART(wxART_HELP_PAGE
, htmpage
)
109 ART(wxART_ADD_BOOKMARK
, addbookm
)
110 ART(wxART_DEL_BOOKMARK
, delbookm
)
111 ART(wxART_GO_BACK
, back
)
112 ART(wxART_GO_FORWARD
, forward
)
114 ART(wxART_GO_DOWN
, down
)
115 ART(wxART_GO_TO_PARENT
, toparent
)
116 ART(wxART_FILE_OPEN
, fileopen
)
117 ART(wxART_PRINT
, print
)
118 ART(wxART_HELP
, helpicon
)
119 ART(wxART_TIP
, tipicon
)