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 wxArtDomain
& domain
,
38 const wxArtID
& id
, const wxSize
& size
);
41 #define BEGIN_DOMAIN(domainId) if ( domain == domainId ) {
42 #define END_DOMAIN() }
43 #define ART_ID(artId, xpmRc) 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/wxhtml/addbookm.xpm"
74 #include "../../art/wxhtml/delbookm.xpm"
75 #include "../../art/wxhtml/navig.xpm"
76 #include "../../art/wxhtml/settings.xpm"
77 #include "../../art/wxhtml/book.xpm"
78 #include "../../art/wxhtml/folder.xpm"
79 #include "../../art/wxhtml/page.xpm"
82 #include "../../art/browser/back.xpm"
83 #include "../../art/browser/forward.xpm"
84 #include "../../art/browser/up.xpm"
85 #include "../../art/browser/down.xpm"
86 #include "../../art/browser/toparent.xpm"
88 #include "../../art/toolbar/fileopen.xpm"
89 #include "../../art/toolbar/print.xpm"
91 #include "../../art/framicon/help.xpm"
95 // ----------------------------------------------------------------------------
96 // CreateBitmap routine
97 // ----------------------------------------------------------------------------
99 wxBitmap
wxDefaultArtProvider::CreateBitmap(const wxArtDomain
& domain
,
104 BEGIN_DOMAIN(wxART_WXHTML
)
105 ART_ID(wxART_ADD_BOOKMARK
, addbookm
)
106 ART_ID(wxART_DEL_BOOKMARK
, delbookm
)
107 ART_ID(wxART_NAVIG_PANEL
, navig
)
108 ART_ID(wxART_HELP_SETTINGS
, settings
)
109 ART_ID(wxART_HELP_BOOK
, book
)
110 ART_ID(wxART_HELP_FOLDER
, folder
)
111 ART_ID(wxART_HELP_PAGE
, page
)
115 BEGIN_DOMAIN(wxART_BROWSER_TOOLBAR
)
116 ART_ID(wxART_GO_BACK
, back
)
117 ART_ID(wxART_GO_FORWARD
, forward
)
118 ART_ID(wxART_GO_UP
, up
)
119 ART_ID(wxART_GO_DOWN
, down
)
120 ART_ID(wxART_GO_TO_PARENT
, toparent
)
123 BEGIN_DOMAIN(wxART_TOOLBAR
)
124 ART_ID(wxART_FILE_OPEN
, fileopen
)
125 ART_ID(wxART_PRINT
, print
)
128 BEGIN_DOMAIN(wxART_FRAME_ICON
)
129 ART_ID(wxART_HELP
, help
)