//wxDEFAULT_MDIPARENTFRAME ICON "wx/msw/mdi.ico"
//wxDEFAULT_MDICHILDFRAME ICON "wx/msw/child.ico"
-// Standard large icons
-/* we don't use these files any more, use Windows standard icons instead
-wxICON_QUESTION ICON "wx/msw/question.ico"
-wxICON_WARNING ICON "wx/msw/warning.ico"
-wxICON_ERROR ICON "wx/msw/error.ico"
-wxICON_INFO ICON "wx/msw/info.ico"
-*/
-
// Standard small icons
wxICON_SMALL_CLOSED_FOLDER ICON "wx/msw/folder1.ico"
wxICON_SMALL_OPEN_FOLDER ICON "wx/msw/folder2.ico"
#endif
-// For src/generic/proplist.cpp
-tick_bmp BITMAP "wx/msw/tick.bmp"
-cross_bmp BITMAP "wx/msw/cross.bmp"
-
// For wxContextHelpButton
csquery BITMAP "wx/msw/csquery.bmp"
#include "../../art/dir_up.xpm"
#include "../../art/exefile.xpm"
#include "../../art/deffile.xpm"
+#include "../../art/tick.xpm"
+#include "../../art/cross.xpm"
#undef static
ART(wxART_GO_DIR_UP, dir_up)
ART(wxART_EXECUTABLE_FILE, exefile)
ART(wxART_NORMAL_FILE, deffile)
+ ART(wxART_TICK_MARK, tick)
+ ART(wxART_CROSS_MARK, cross)
return wxNullBitmap;
}
#include "wx/sizer.h"
#include "wx/module.h"
#include "wx/intl.h"
+#include "wx/artprov.h"
#include "wx/colordlg.h"
#include "wx/proplist.h"
#include <math.h>
#include <string.h>
-// ----------------------------------------------------------------------------
-// XPMs
-// ----------------------------------------------------------------------------
-
-// XPM hack: make the arrays const
-#define static static const
-
-#ifndef __WXMSW__
- #include "wx/generic/cross.xpm"
- #include "wx/generic/tick.xpm"
-#endif
-
-#undef static
-
-// ----------------------------------------------------------------------------
-// accessor functions for the bitmaps (may return NULL, check for it!)
-// ----------------------------------------------------------------------------
-
-static wxBitmap *GetTickBitmap();
-static wxBitmap *GetCrossBitmap();
-
// ----------------------------------------------------------------------------
// Property text edit control
// ----------------------------------------------------------------------------
if (m_buttonFlags & wxPROP_BUTTON_CHECK_CROSS)
{
- wxBitmap *tickBitmap = GetTickBitmap();
- wxBitmap *crossBitmap = GetCrossBitmap();
+ wxBitmap tickBitmap = wxArtProvider::GetBitmap(wxART_TICK_MARK);
+ wxBitmap crossBitmap = wxArtProvider::GetBitmap(wxART_CROSS_MARK);
- if ( tickBitmap && crossBitmap )
+ if ( tickBitmap.Ok() && crossBitmap.Ok() )
{
- m_confirmButton = new wxBitmapButton(panel, wxID_PROP_CHECK, *tickBitmap, wxPoint(-1, -1), smallButtonSize );
- m_cancelButton = new wxBitmapButton(panel, wxID_PROP_CROSS, *crossBitmap, wxPoint(-1, -1), smallButtonSize );
+ m_confirmButton = new wxBitmapButton(panel, wxID_PROP_CHECK, tickBitmap, wxPoint(-1, -1), smallButtonSize );
+ m_cancelButton = new wxBitmapButton(panel, wxID_PROP_CROSS, crossBitmap, wxPoint(-1, -1), smallButtonSize );
}
else
{
m_stringText->Enable(TRUE);
}
-// ----------------------------------------------------------------------------
-// global functions
-// ----------------------------------------------------------------------------
-
-// FIXME MT-UNSAFE
-static wxBitmap *GetTickBitmap()
-{
- static wxBitmap* s_tickBitmap = (wxBitmap *) NULL;
- static bool s_loaded = FALSE;
-
- if ( !s_loaded )
- {
- s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
-
- #if defined(__WXMSW__) || defined(__WXPM__)
- s_tickBitmap = new wxBitmap(_T("tick_bmp"), wxBITMAP_TYPE_RESOURCE);
- #else
- s_tickBitmap = new wxBitmap( tick_xpm );
- #endif
- }
-
- return s_tickBitmap;
-}
-
-static wxBitmap *GetCrossBitmap()
-{
- static wxBitmap* s_crossBitmap = (wxBitmap *) NULL;
- static bool s_loaded = FALSE;
-
- if ( !s_loaded )
- {
- s_loaded = TRUE; // set it to TRUE anyhow, we won't try again
-
- #if defined(__WXMSW__) || defined(__WXPM__)
- s_crossBitmap = new wxBitmap(_T("cross_bmp"), wxBITMAP_TYPE_RESOURCE);
- #else // XPMs
- s_crossBitmap = new wxBitmap( cross_xpm );
- #endif // BMPs/XPMs
- }
-
- return s_crossBitmap;
-}
#endif // wxUSE_PROPSHEET