use wxART_BROKEN_IMAGE in wxHTML
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -72,6 +72,7 @@ constants in the \helpref{artprov}{sampleartprovider} sample):
|
|||||||
\item wxART\_QUESTION
|
\item wxART\_QUESTION
|
||||||
\item wxART\_WARNING
|
\item wxART\_WARNING
|
||||||
\item wxART\_INFORMATION
|
\item wxART\_INFORMATION
|
||||||
|
\item wxART\_MISSING\_IMAGE
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
\membersection{Clients}
|
\membersection{Clients}
|
||||||
|
@@ -133,6 +133,7 @@ protected:
|
|||||||
#include "../../art/htmbook.xpm"
|
#include "../../art/htmbook.xpm"
|
||||||
#include "../../art/htmfoldr.xpm"
|
#include "../../art/htmfoldr.xpm"
|
||||||
#include "../../art/htmpage.xpm"
|
#include "../../art/htmpage.xpm"
|
||||||
|
#include "../../art/missimg.xpm"
|
||||||
#endif // wxUSE_HTML
|
#endif // wxUSE_HTML
|
||||||
|
|
||||||
#include "../../art/addbookm.xpm"
|
#include "../../art/addbookm.xpm"
|
||||||
@@ -180,6 +181,7 @@ wxBitmap wxDefaultArtProvider::CreateBitmap(const wxArtID& id,
|
|||||||
ART(wxART_HELP_BOOK, htmbook)
|
ART(wxART_HELP_BOOK, htmbook)
|
||||||
ART(wxART_HELP_FOLDER, htmfoldr)
|
ART(wxART_HELP_FOLDER, htmfoldr)
|
||||||
ART(wxART_HELP_PAGE, htmpage)
|
ART(wxART_HELP_PAGE, htmpage)
|
||||||
|
ART(wxART_MISSING_IMAGE, missimg)
|
||||||
#endif // wxUSE_HTML
|
#endif // wxUSE_HTML
|
||||||
ART(wxART_ADD_BOOKMARK, addbookm)
|
ART(wxART_ADD_BOOKMARK, addbookm)
|
||||||
ART(wxART_DEL_BOOKMARK, delbookm)
|
ART(wxART_DEL_BOOKMARK, delbookm)
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
#include "wx/gifdecod.h"
|
#include "wx/gifdecod.h"
|
||||||
#include "wx/dynarray.h"
|
#include "wx/dynarray.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
#include "wx/artprov.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
@@ -325,51 +326,10 @@ class wxGIFTimer : public wxTimer
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// wxHtmlImageCell
|
// wxHtmlImageCell
|
||||||
//--------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
/* XPM */
|
|
||||||
static const char * broken_image_xpm[] = {
|
|
||||||
"29 31 7 1",
|
|
||||||
" c None",
|
|
||||||
". c #808080",
|
|
||||||
"+ c #FFFFFF",
|
|
||||||
"@ c #C0C0C0",
|
|
||||||
"# c #000000",
|
|
||||||
"$ c #333366",
|
|
||||||
"% c #B2B2B2",
|
|
||||||
"..................... ",
|
|
||||||
".+++++++++++++++++++.. ",
|
|
||||||
".+++++++++++++++++++.@. ",
|
|
||||||
".++@@@@@@@@@@@@@@@@@.+@. ",
|
|
||||||
".++@@@@@@@@@@@@@@@@@.++@. ",
|
|
||||||
".++@@@@@.@@@@.@@@@@@.+++@. ",
|
|
||||||
".++@@@@@@@@@@@@@@@@@.++++@. ",
|
|
||||||
".++@@@@@@@@@@@@@@@@@.+++++@. ",
|
|
||||||
".++@@.@@@@@@@@@@.@@@######## ",
|
|
||||||
".++@@@@@@@@@@@@@@@@@@$$$$$$#.",
|
|
||||||
".######@@@@@@@@@@@@@@@.....#.",
|
|
||||||
" ###@@@@@@@@@@@@@@@++#.",
|
|
||||||
" #####@@@@@@@@@@++#.",
|
|
||||||
" #@.@@@@@@@@++#.",
|
|
||||||
".. ###@@@@@@@++#.",
|
|
||||||
".+.... #@@@@@@++#.",
|
|
||||||
".++@@@... ####@@++#.",
|
|
||||||
".++@@@@@@.. #####.",
|
|
||||||
".++@@@@@@@@... ",
|
|
||||||
".++@@@@@@%%%%@. ",
|
|
||||||
".++@@@@@@%%%%@@.... ",
|
|
||||||
".++@@@@@@%%%%@@@@@@.... ",
|
|
||||||
".++@@@@@@%%%%@@@@@@@@@@.... ",
|
|
||||||
".++@@@@@@@@@@@@@@@@@@@@@@++#.",
|
|
||||||
".++@@@@@@@@@@@@@@@@@@@@@@++#.",
|
|
||||||
".++@@@@@@@@@@@@@@@@@@@@@@++#.",
|
|
||||||
".++@@@@@@@@@@@@@@@@@@@@@@++#.",
|
|
||||||
".++@@@@@@@@@@@@@@@@@@@@@@++#.",
|
|
||||||
".++++++++++++++++++++++++++#.",
|
|
||||||
".++++++++++++++++++++++++++#.",
|
|
||||||
"############################."};
|
|
||||||
|
|
||||||
wxHtmlImageCell::wxHtmlImageCell(wxWindow *window, wxFSFile *input,
|
wxHtmlImageCell::wxHtmlImageCell(wxWindow *window, wxFSFile *input,
|
||||||
int w, int h, double scale, int align,
|
int w, int h, double scale, int align,
|
||||||
@@ -451,7 +411,8 @@ wxHtmlImageCell::wxHtmlImageCell(wxWindow *window, wxFSFile *input,
|
|||||||
if ( m_bmpW == -1 ) m_bmpW = 31;
|
if ( m_bmpW == -1 ) m_bmpW = 31;
|
||||||
if ( m_bmpH == -1 ) m_bmpH = 33;
|
if ( m_bmpH == -1 ) m_bmpH = 33;
|
||||||
}
|
}
|
||||||
m_bitmap = new wxBitmap(broken_image_xpm);
|
m_bitmap =
|
||||||
|
new wxBitmap(wxArtProvider::GetBitmap(wxART_MISSING_IMAGE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//else: ignore the 0-sized images used sometimes on the Web pages
|
//else: ignore the 0-sized images used sometimes on the Web pages
|
||||||
|
Reference in New Issue
Block a user