]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed compilation for !wxUSE_IMAGE as well as !wxUSE_TOOLBAR.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Mon, 16 Feb 2004 23:27:54 +0000 (23:27 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Mon, 16 Feb 2004 23:27:54 +0000 (23:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/fs_mem.h
src/common/fs_mem.cpp
src/common/iconbndl.cpp
src/common/rgncmn.cpp
src/generic/dirctrlg.cpp
src/msw/bitmap.cpp
src/msw/mdi.cpp

index 9a46b264f40b78f6801a0c4ca96ab789d5f28fdc..a941c894f8aef0055fa51a93d8c629dabf0d8e89 100644 (file)
@@ -91,11 +91,12 @@ public:
 
 #if wxUSE_IMAGE
     static void AddFile(const wxString& filename, wxImage& image, long type);
-#endif // wxUSE_IMAGE
 
     static void AddFile(const wxString& filename,
                         const wxBitmap& bitmap,
                         long type);
+#endif // wxUSE_IMAGE
+
 };
 
 #else // !wxUSE_GUI
index 37a272bbdc8948d8903b05948c9bf79ced45d4d5..782b95d758e608c98088e5862ad048233db07c09 100644 (file)
@@ -231,7 +231,6 @@ wxMemoryFSHandler::AddFile(const wxString& filename, wxImage& image, long type)
         wxLogError(s);
     }
 }
-#endif // wxUSE_IMAGE
 
 /*static*/ void wxMemoryFSHandler::AddFile(const wxString& filename, const wxBitmap& bitmap, long type)
 {
@@ -239,7 +238,9 @@ wxMemoryFSHandler::AddFile(const wxString& filename, wxImage& image, long type)
     AddFile(filename, img, type);
 }
 
-#endif
+#endif // wxUSE_IMAGE
+
+#endif // wxUSE_GUI
 
 
 #endif // wxUSE_FILESYSTEM && wxUSE_FS_ZIP
index 0661a1e7db4bd231e68dd334a8680bd575cdc5d7..2fa83445344bcd6240a2375831d198d818ad6422 100644 (file)
@@ -54,7 +54,11 @@ void wxIconBundle::DeleteIcons()
     m_icons.Empty();
 }
 
+#if wxUSE_IMAGE
 void wxIconBundle::AddIcon( const wxString& file, long type )
+#else
+void wxIconBundle::AddIcon( const wxString& WXUNUSED(file), long WXUNUSED(type) )
+#endif
 {
 #if wxUSE_IMAGE
     size_t count = wxImage::GetImageCount( file, type );
index 41b273e76c123fcafd185384c16654c831e0f6c9..581ecbf68eb209445f2a25e8134d3a8072a85a0d 100644 (file)
@@ -50,9 +50,15 @@ wxBitmap wxRegion::ConvertToBitmap() const
 
 //---------------------------------------------------------------------------
 
+#if wxUSE_IMAGE
 bool wxRegion::Union(const wxBitmap& bmp,
                      const wxColour& transColour,
                      int   tolerance)
+#else
+bool wxRegion::Union(const wxBitmap& WXUNUSED(bmp),
+                     const wxColour& WXUNUSED(transColour),
+                     int   WXUNUSED(tolerance))
+#endif
 {
 #if wxUSE_IMAGE
     unsigned char loR, loG, loB;
@@ -116,10 +122,10 @@ bool wxRegion::Union(const wxBitmap& bmp,
         }
     }
 
-    return TRUE;
+    return true;
 #else
     // No wxImage support
-    return FALSE;
+    return false;
 #endif
 }
 
index bf16d8a0dfb4b2f8c33c005389b88e9fdeb3ba4b..2c596b353595bb7646360f6dd1cf5e897afe1165 100644 (file)
@@ -1528,7 +1528,7 @@ wxImageList *wxFileIconsTable::GetSmallImageList()
     return m_smallImageList;
 }
 
-#if wxUSE_MIMETYPE
+#if wxUSE_MIMETYPE && wxUSE_IMAGE
 // VS: we don't need this function w/o wxMimeTypesManager because we'll only have
 //     one icon and we won't resize it
 
@@ -1684,6 +1684,7 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime)
     {
         m_smallImageList->Add(bmp);
     }
+#if wxUSE_IMAGE
     else
     {
         wxImage img = bmp.ConvertToImage();
@@ -1694,7 +1695,8 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime)
         else
             m_smallImageList->Add(CreateAntialiasedBitmap(img));
     }
-    
+#endif // wxUSE_IMAGE
+
     m_HashTable->Put(extension, new wxFileIconEntry(id));
     return id;
 
index ad7929de219c2fc9d8c1451edd62f63868e0b862..6a2c74a221e869b6b44188143f6376db90f11cd8 100644 (file)
@@ -429,7 +429,11 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
 }
 
 // Create from XPM data
+#if wxUSE_IMAGE && wxUSE_XPM
 bool wxBitmap::CreateFromXpm(const char **data)
+#else
+bool wxBitmap::CreateFromXpm(const char **WXUNUSED(data))
+#endif
 {
 #if wxUSE_IMAGE && wxUSE_XPM
     Init();
index edb246d7500aaf3e647d0d2f0362cd17d9a84fdb..5f980abb3d50fcaf62ca5263f72a3a04e169c3de 100644 (file)
@@ -234,7 +234,9 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
 wxMDIParentFrame::~wxMDIParentFrame()
 {
     // see comment in ~wxMDIChildFrame
+#if wxUSE_TOOLBAR
     m_frameToolBar = NULL;
+#endif
     m_frameStatusBar = NULL;
 
     DestroyChildren();
@@ -732,7 +734,9 @@ wxMDIChildFrame::~wxMDIChildFrame()
 {
     // will be destroyed by DestroyChildren() but reset them before calling it
     // to avoid using dangling pointers if a callback comes in the meanwhile
+#if wxUSE_TOOLBAR
     m_frameToolBar = NULL;
+#endif
     m_frameStatusBar = NULL;
 
     DestroyChildren();
@@ -1027,11 +1031,13 @@ bool wxMDIChildFrame::HandleWindowPosChanging(void *pos)
             lpPos->cx = rectClient.right - rectClient.left;
             lpPos->cy = rectClient.bottom - rectClient.top;
         }
+#if wxUSE_TOOLBAR
         wxMDIParentFrame* pFrameWnd = (wxMDIParentFrame *)GetParent();
         if (pFrameWnd && pFrameWnd->GetToolBar() && pFrameWnd->GetToolBar()->IsShown())
         {
             pFrameWnd->GetToolBar()->Refresh();
         }
+#endif
     }
 #endif // Win95