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 // For the purposes of forcing this module to link
27 char g_ArtProviderModule
= 0;
29 // ----------------------------------------------------------------------------
30 // wxDefaultArtProvider
31 // ----------------------------------------------------------------------------
33 class wxDefaultArtProvider
: public wxArtProvider
36 virtual wxBitmap
CreateBitmap(const wxArtID
& id
, const wxArtClient
& client
,
40 #define ART(artId, xpmRc) \
41 if ( id == artId ) return wxBitmap(xpmRc##_xpm);
44 // ----------------------------------------------------------------------------
45 // wxDefaultArtProviderModule
46 // ----------------------------------------------------------------------------
48 class wxDefaultArtProviderModule
: public wxModule
53 wxArtProvider::PushProvider(new wxDefaultArtProvider
);
58 DECLARE_DYNAMIC_CLASS(wxDefaultArtProviderModule
)
61 IMPLEMENT_DYNAMIC_CLASS(wxDefaultArtProviderModule
, wxModule
)
64 // ----------------------------------------------------------------------------
66 // ----------------------------------------------------------------------------
68 // XPM hack: make the arrays const
69 #define static static const
72 #include "../../art/htmsidep.xpm"
73 #include "../../art/htmoptns.xpm"
74 #include "../../art/htmbook.xpm"
75 #include "../../art/htmfoldr.xpm"
76 #include "../../art/htmpage.xpm"
79 #include "../../art/addbookm.xpm"
80 #include "../../art/delbookm.xpm"
81 #include "../../art/back.xpm"
82 #include "../../art/forward.xpm"
83 #include "../../art/up.xpm"
84 #include "../../art/down.xpm"
85 #include "../../art/toparent.xpm"
86 #include "../../art/fileopen.xpm"
87 #include "../../art/print.xpm"
88 #include "../../art/helpicon.xpm"
89 #include "../../art/tipicon.xpm"
90 #include "../../art/home.xpm"
91 #include "../../art/repview.xpm"
92 #include "../../art/listview.xpm"
93 #include "../../art/new_dir.xpm"
94 #include "../../art/folder.xpm"
95 #include "../../art/dir_up.xpm"
96 #include "../../art/exefile.xpm"
97 #include "../../art/deffile.xpm"
98 #include "../../art/tick.xpm"
99 #include "../../art/cross.xpm"
103 // ----------------------------------------------------------------------------
104 // CreateBitmap routine
105 // ----------------------------------------------------------------------------
107 wxBitmap
wxDefaultArtProvider::CreateBitmap(const wxArtID
& id
,
108 const wxArtClient
& client
,
112 ART(wxART_HELP_SIDE_PANEL
, htmsidep
)
113 ART(wxART_HELP_SETTINGS
, htmoptns
)
114 ART(wxART_HELP_BOOK
, htmbook
)
115 ART(wxART_HELP_FOLDER
, htmfoldr
)
116 ART(wxART_HELP_PAGE
, htmpage
)
118 ART(wxART_ADD_BOOKMARK
, addbookm
)
119 ART(wxART_DEL_BOOKMARK
, delbookm
)
120 ART(wxART_GO_BACK
, back
)
121 ART(wxART_GO_FORWARD
, forward
)
123 ART(wxART_GO_DOWN
, down
)
124 ART(wxART_GO_TO_PARENT
, toparent
)
125 ART(wxART_GO_HOME
, home
)
126 ART(wxART_FILE_OPEN
, fileopen
)
127 ART(wxART_PRINT
, print
)
128 ART(wxART_HELP
, helpicon
)
129 ART(wxART_TIP
, tipicon
)
130 ART(wxART_REPORT_VIEW
, repview
)
131 ART(wxART_LIST_VIEW
, listview
)
132 ART(wxART_NEW_DIR
, new_dir
)
133 ART(wxART_FOLDER
, folder
)
134 ART(wxART_GO_DIR_UP
, dir_up
)
135 ART(wxART_EXECUTABLE_FILE
, exefile
)
136 ART(wxART_NORMAL_FILE
, deffile
)
137 ART(wxART_TICK_MARK
, tick
)
138 ART(wxART_CROSS_MARK
, cross
)