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"
87 #include "../../art/home.xpm"
88 #include "../../art/repview.xpm"
89 #include "../../art/listview.xpm"
90 #include "../../art/new_dir.xpm"
91 #include "../../art/folder.xpm"
92 #include "../../art/dir_up.xpm"
93 #include "../../art/exefile.xpm"
94 #include "../../art/deffile.xpm"
98 // ----------------------------------------------------------------------------
99 // CreateBitmap routine
100 // ----------------------------------------------------------------------------
102 wxBitmap
wxDefaultArtProvider::CreateBitmap(const wxArtID
& id
,
103 const wxArtClient
& client
,
107 ART(wxART_HELP_SIDE_PANEL
, htmsidep
)
108 ART(wxART_HELP_SETTINGS
, htmoptns
)
109 ART(wxART_HELP_BOOK
, htmbook
)
110 ART(wxART_HELP_FOLDER
, htmfoldr
)
111 ART(wxART_HELP_PAGE
, htmpage
)
113 ART(wxART_ADD_BOOKMARK
, addbookm
)
114 ART(wxART_DEL_BOOKMARK
, delbookm
)
115 ART(wxART_GO_BACK
, back
)
116 ART(wxART_GO_FORWARD
, forward
)
118 ART(wxART_GO_DOWN
, down
)
119 ART(wxART_GO_TO_PARENT
, toparent
)
120 ART(wxART_GO_HOME
, home
)
121 ART(wxART_FILE_OPEN
, fileopen
)
122 ART(wxART_PRINT
, print
)
123 ART(wxART_HELP
, helpicon
)
124 ART(wxART_TIP
, tipicon
)
125 ART(wxART_REPORT_VIEW
, repview
)
126 ART(wxART_LIST_VIEW
, listview
)
127 ART(wxART_NEW_DIR
, new_dir
)
128 ART(wxART_FOLDER
, folder
)
129 ART(wxART_GO_DIR_UP
, dir_up
)
130 ART(wxART_EXECUTABLE_FILE
, exefile
)
131 ART(wxART_NORMAL_FILE
, deffile
)