void wxImage::InitStandardHandlers()
{
- AddHandler( new wxBMPHandler );
+ AddHandler(new wxBMPHandler);
+#if !defined(__WXGTK__) && !defined(__WXMOTIF__)
+ AddHandler(new wxXPMHandler);
+#endif
}
void wxImage::CleanUpHandlers()
}
case wxBITMAP_TYPE_XPM_DATA:
{
-#if (defined(__WXGTK__)) || (defined(__WXMSW__) && wxUSE_XPM_IN_MSW)
wxItemResource *item = table->FindResource(name);
if (!item)
{
return wxNullBitmap;
}
return wxBitmap(item->GetValue1());
-#else
- wxLogWarning(_("No XPM facility available!"));
-#endif
break;
}
default:
{
// *** XPM ICON NOT YET IMPLEMENTED IN WXWINDOWS ***
/*
-#if (defined(__WXGTK__)) || (defined(__WXMSW__) && wxUSE_XPM_IN_MSW)
wxItemResource *item = table->FindResource(name);
if (!item)
{
return NULL;
}
return wxIcon((char **)item->GetValue1());
-#else
- wxLogWarning(_("No XPM facility available!"));
-#endif
*/
wxLogWarning(_("No XPM icon facility available!"));
break;
}
case wxBITMAP_TYPE_XPM_DATA:
{
-#if (defined(__WXGTK__)) || (defined(__WXMSW__) && wxUSE_XPM_IN_MSW)
wxItemResource *item = table->FindResource(name);
if (!item)
{
return wxNullBitmap;
}
return wxBitmap((char **)item->GetValue1());
-#else
- wxLogWarning(_("No XPM facility available!"));
- break;
-#endif
}
default:
{
{
// *** XPM ICON NOT YET IMPLEMENTED IN WXWINDOWS ***
/*
- #if (defined(__WXGTK__)) || (defined(__WXMSW__) && wxUSE_XPM_IN_MSW)
wxItemResource *item = table->FindResource(name);
if (!item)
{
return NULL;
}
return wxIcon((char **)item->GetValue1());
- #else
- wxLogWarning(_("No XPM facility available!"));
- #endif
*/
wxLogWarning(_("No XPM icon facility available!"));
break;
#undef GetFirstChild
#endif
-#if !defined(__WXMSW__) || wxUSE_XPM_IN_MSW || wxUSE_XPM_IN_OS2
/* Closed folder */
static char * icon1_xpm[] = {
/* width height ncolors chars_per_pixel */
" ",
" ",
" "};
-#endif // !wxMSW
static const int ID_DIRCTRL = 1000;
static const int ID_TEXTCTRL = 1001;
m_filterListCtrl->FillFilterList(filter, defaultFilter);
m_imageList = new wxImageList(16, 16, TRUE);
-#if !defined(__WXMSW__) || wxUSE_XPM_IN_MSW
m_imageList->Add(wxIcon(icon1_xpm));
m_imageList->Add(wxIcon(icon2_xpm));
m_imageList->Add(wxIcon(icon3_xpm));
m_imageList->Add(wxIcon(icon6_xpm));
m_imageList->Add(wxIcon(icon7_xpm));
m_imageList->Add(wxIcon(icon8_xpm));
-#elif defined(__WXMSW__)
- m_imageList->Add(wxIcon(wxT("wxICON_SMALL_CLOSED_FOLDER"), wxBITMAP_TYPE_ICO_RESOURCE));
- m_imageList->Add(wxIcon(wxT("wxICON_SMALL_OPEN_FOLDER"), wxBITMAP_TYPE_ICO_RESOURCE));
- m_imageList->Add(wxIcon(wxT("wxICON_SMALL_FILE"), wxBITMAP_TYPE_ICO_RESOURCE));
- m_imageList->Add(wxIcon(wxT("wxICON_SMALL_COMPUTER"), wxBITMAP_TYPE_ICO_RESOURCE));
- m_imageList->Add(wxIcon(wxT("wxICON_SMALL_DRIVE"), wxBITMAP_TYPE_ICO_RESOURCE));
- m_imageList->Add(wxIcon(wxT("wxICON_SMALL_CDROM"), wxBITMAP_TYPE_ICO_RESOURCE));
- m_imageList->Add(wxIcon(wxT("wxICON_SMALL_FLOPPY"), wxBITMAP_TYPE_ICO_RESOURCE));
- m_imageList->Add(wxIcon(wxT("wxICON_SMALL_REMOVEABLE"), wxBITMAP_TYPE_ICO_RESOURCE));
-#else
-#error "Sorry, we don't have icons available for this platforms."
-#endif
m_treeCtrl->SetImageList(m_imageList);
m_showHidden = FALSE;
-# This file was automatically generated by tmake at 16:57, 2001/05/01
+# This file was automatically generated by tmake at 00:44, 2001/05/09
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
ALL_SOURCES = \
generic/busyinfo.cpp \
wxhtml.h \
wxprec.h \
xpmdecod.h \
- xpmhand.h \
zipstrm.h \
zstream.h \
gtk/accel.h \
-# This file was automatically generated by tmake at 16:57, 2001/05/01
+# This file was automatically generated by tmake at 00:44, 2001/05/09
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
ALL_SOURCES = \
generic/busyinfo.cpp \
wxhtml.h \
wxprec.h \
xpmdecod.h \
- xpmhand.h \
zipstrm.h \
zstream.h \
gtk/accel.h \
-# This file was automatically generated by tmake at 01:27, 2001/04/29
+# This file was automatically generated by tmake at 00:44, 2001/05/09
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T!
ALL_SOURCES = \
generic/busyinfo.cpp \
wxhtml.h \
wxprec.h \
xpmdecod.h \
- xpmhand.h \
zipstrm.h \
zstream.h \
motif/accel.h \
#include "wx/msw/dib.h"
#include "wx/image.h"
+#include "wx/xpmdecod.h"
// missing from mingw32 header
#ifndef CLR_INVALID
// Create from XPM data
bool wxBitmap::CreateFromXpm(const char **data)
{
+#if wxUSE_IMAGE && wxUSE_XPM
Init();
- return Create((void *)data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
+ wxCHECK_MSG( data != NULL, FALSE, wxT("invalid bitmap data") )
+
+ wxXPMDecoder decoder;
+ wxImage img = decoder.ReadData(data);
+ wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid bitmap data") )
+
+ *this = wxBitmap(img);
+
+ if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this);
+
+ return TRUE;
+#else
+ return FALSE;
+#endif
}
wxBitmap::wxBitmap(int w, int h, int d)
#include "wx/msw/gdiimage.h"
#include "wx/bitmap.h"
-#if 0 // wxUSE_XPM_IN_MSW
-# include "wx/xpmhand.h"
-#endif // wxUSE_XPM_IN_MSW
-
#ifdef __WIN16__
# include "wx/msw/curico.h"
#endif // __WIN16__
{
AddHandler(new wxBMPResourceHandler);
AddHandler(new wxBMPFileHandler);
-
- // GRG: Add these handlers by default if XPM support is enabled
-
-#if 0 // wxUSE_XPM_IN_MSW
- AddHandler(new wxXPMFileHandler);
- AddHandler(new wxXPMDataHandler);
-#endif // wxUSE_XPM_IN_MSW
-
AddHandler(new wxICOResourceHandler);
AddHandler(new wxICOFileHandler);
}
-# This file was automatically generated by tmake at 01:26, 2001/04/29
+# This file was automatically generated by tmake at 00:44, 2001/05/09
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
#
$(MSWDIR)\window.obj: $(MSWDIR)\window.$(SRCSUFF)
-$(MSWDIR)\xpmhand.obj: $(MSWDIR)\xpmhand.$(SRCSUFF)
-
########################################################
-# This file was automatically generated by tmake at 01:26, 2001/04/29
+# This file was automatically generated by tmake at 00:44, 2001/05/09
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
#
$(MSWDIR)\window.obj: $(MSWDIR)\window.$(SRCSUFF)
-$(MSWDIR)\xpmhand.obj: $(MSWDIR)\xpmhand.$(SRCSUFF)
-
########################################################
-# This file was automatically generated by tmake at 01:26, 2001/04/29
+# This file was automatically generated by tmake at 00:44, 2001/05/09
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
#
$(MSWDIR)\utils.obj \
$(MSWDIR)\utilsexc.obj \
$(MSWDIR)\wave.obj \
- $(MSWDIR)\window.obj \
- $(MSWDIR)\xpmhand.obj
+ $(MSWDIR)\window.obj
# TODO: Implement XPM and PNG targets in this makefile!
# $(OLEDIR)\xpmhand \
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
-$(MSWDIR)/xpmhand.obj: $*.$(SRCSUFF)
- cl @<<
-$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
-<<
-
$(COMMDIR)/appcmn.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
-# This file was automatically generated by tmake at 01:26, 2001/04/29
+# This file was automatically generated by tmake at 00:44, 2001/05/09
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
#
-# This file was automatically generated by tmake at 01:26, 2001/04/29
+# This file was automatically generated by tmake at 00:44, 2001/05/09
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T!
# Symantec C++ makefile for the msw objects
$(MSWDIR)\utilsexc.obj \
$(MSWDIR)\ole\uuid.obj \
$(MSWDIR)\wave.obj \
- $(MSWDIR)\window.obj \
- $(MSWDIR)\xpmhand.obj
+ $(MSWDIR)\window.obj
XPMOBJECTS = $(XPMDIR)\crbuffri.obj\
$(XPMDIR)\crdatfri.obj\
-# This file was automatically generated by tmake at 01:26, 2001/04/29
+# This file was automatically generated by tmake at 00:44, 2001/05/09
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T!
# File: makefile.vc
$(link) @<<
$(LINKFLAGS)
-out:$(WXDIR)\lib\$(WXLIBNAME).dll
+<<<<<<< vc.t
+ $(DUMMYOBJ) $(OBJECTS) $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib odbc32.lib advapi32.lib winmm.lib $(GL_LIBS) $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib
+=======
$(DUMMYOBJ) $(OBJECTS) $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib odbc32.lib advapi32.lib winmm.lib $(GL_LIBS) $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib
+>>>>>>> 1.32
delayimp.lib
/delayload:ws2_32.dll /delayload:advapi32.dll /delayload:user32.dll /delayload:gdi32.dll
/delayload:comdlg32.dll /delayload:shell32.dll /delayload:comctl32.dll /delayload:ole32.dll
-rmdir ..\common\$(D)
-rmdir ..\html\$(D)
-
# Making documents
docs: allhlp allhtml allpdfrtf allhtb allhtmlhelp
alldocs: docs
#!/binb/wmake.exe
-# This file was automatically generated by tmake at 01:26, 2001/04/29
+# This file was automatically generated by tmake at 00:44, 2001/05/09
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
#
window.obj: $(MSWDIR)\window.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
-#xpmhand.obj: $(MSWDIR)\xpmhand.cpp
-# *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
-
########################################################
-# This file was automatically generated by tmake at 01:27, 2001/04/29
+# This file was automatically generated by tmake at 00:44, 2001/05/09
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE OS2.T!
ALL_SOURCES = \
generic/busyinfo.cpp \
wxhtml.h \
wxprec.h \
xpmdecod.h \
- xpmhand.h \
zipstrm.h \
zstream.h \
os2/accel.h \