Fixed compilation for !wxUSE_IMAGE as well as !wxUSE_TOOLBAR.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -91,11 +91,12 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#if wxUSE_IMAGE
 | 
					#if wxUSE_IMAGE
 | 
				
			||||||
    static void AddFile(const wxString& filename, wxImage& image, long type);
 | 
					    static void AddFile(const wxString& filename, wxImage& image, long type);
 | 
				
			||||||
#endif // wxUSE_IMAGE
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    static void AddFile(const wxString& filename,
 | 
					    static void AddFile(const wxString& filename,
 | 
				
			||||||
                        const wxBitmap& bitmap,
 | 
					                        const wxBitmap& bitmap,
 | 
				
			||||||
                        long type);
 | 
					                        long type);
 | 
				
			||||||
 | 
					#endif // wxUSE_IMAGE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#else // !wxUSE_GUI
 | 
					#else // !wxUSE_GUI
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -231,7 +231,6 @@ wxMemoryFSHandler::AddFile(const wxString& filename, wxImage& image, long type)
 | 
				
			|||||||
        wxLogError(s);
 | 
					        wxLogError(s);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif // wxUSE_IMAGE
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*static*/ void wxMemoryFSHandler::AddFile(const wxString& filename, const wxBitmap& bitmap, long type)
 | 
					/*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);
 | 
					    AddFile(filename, img, type);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif // wxUSE_IMAGE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif // wxUSE_GUI
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif // wxUSE_FILESYSTEM && wxUSE_FS_ZIP
 | 
					#endif // wxUSE_FILESYSTEM && wxUSE_FS_ZIP
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -54,7 +54,11 @@ void wxIconBundle::DeleteIcons()
 | 
				
			|||||||
    m_icons.Empty();
 | 
					    m_icons.Empty();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if wxUSE_IMAGE
 | 
				
			||||||
void wxIconBundle::AddIcon( const wxString& file, long type )
 | 
					void wxIconBundle::AddIcon( const wxString& file, long type )
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					void wxIconBundle::AddIcon( const wxString& WXUNUSED(file), long WXUNUSED(type) )
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#if wxUSE_IMAGE
 | 
					#if wxUSE_IMAGE
 | 
				
			||||||
    size_t count = wxImage::GetImageCount( file, type );
 | 
					    size_t count = wxImage::GetImageCount( file, type );
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -50,9 +50,15 @@ wxBitmap wxRegion::ConvertToBitmap() const
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
//---------------------------------------------------------------------------
 | 
					//---------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if wxUSE_IMAGE
 | 
				
			||||||
bool wxRegion::Union(const wxBitmap& bmp,
 | 
					bool wxRegion::Union(const wxBitmap& bmp,
 | 
				
			||||||
                     const wxColour& transColour,
 | 
					                     const wxColour& transColour,
 | 
				
			||||||
                     int   tolerance)
 | 
					                     int   tolerance)
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					bool wxRegion::Union(const wxBitmap& WXUNUSED(bmp),
 | 
				
			||||||
 | 
					                     const wxColour& WXUNUSED(transColour),
 | 
				
			||||||
 | 
					                     int   WXUNUSED(tolerance))
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#if wxUSE_IMAGE
 | 
					#if wxUSE_IMAGE
 | 
				
			||||||
    unsigned char loR, loG, loB;
 | 
					    unsigned char loR, loG, loB;
 | 
				
			||||||
@@ -116,10 +122,10 @@ bool wxRegion::Union(const wxBitmap& bmp,
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return TRUE;
 | 
					    return true;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
    // No wxImage support
 | 
					    // No wxImage support
 | 
				
			||||||
    return FALSE;
 | 
					    return false;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1528,7 +1528,7 @@ wxImageList *wxFileIconsTable::GetSmallImageList()
 | 
				
			|||||||
    return m_smallImageList;
 | 
					    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
 | 
					// VS: we don't need this function w/o wxMimeTypesManager because we'll only have
 | 
				
			||||||
//     one icon and we won't resize it
 | 
					//     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);
 | 
					        m_smallImageList->Add(bmp);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					#if wxUSE_IMAGE
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        wxImage img = bmp.ConvertToImage();
 | 
					        wxImage img = bmp.ConvertToImage();
 | 
				
			||||||
@@ -1694,7 +1695,8 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime)
 | 
				
			|||||||
        else
 | 
					        else
 | 
				
			||||||
            m_smallImageList->Add(CreateAntialiasedBitmap(img));
 | 
					            m_smallImageList->Add(CreateAntialiasedBitmap(img));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					#endif // wxUSE_IMAGE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_HashTable->Put(extension, new wxFileIconEntry(id));
 | 
					    m_HashTable->Put(extension, new wxFileIconEntry(id));
 | 
				
			||||||
    return id;
 | 
					    return id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -429,7 +429,11 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Create from XPM data
 | 
					// Create from XPM data
 | 
				
			||||||
 | 
					#if wxUSE_IMAGE && wxUSE_XPM
 | 
				
			||||||
bool wxBitmap::CreateFromXpm(const char **data)
 | 
					bool wxBitmap::CreateFromXpm(const char **data)
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					bool wxBitmap::CreateFromXpm(const char **WXUNUSED(data))
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#if wxUSE_IMAGE && wxUSE_XPM
 | 
					#if wxUSE_IMAGE && wxUSE_XPM
 | 
				
			||||||
    Init();
 | 
					    Init();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -234,7 +234,9 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
 | 
				
			|||||||
wxMDIParentFrame::~wxMDIParentFrame()
 | 
					wxMDIParentFrame::~wxMDIParentFrame()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    // see comment in ~wxMDIChildFrame
 | 
					    // see comment in ~wxMDIChildFrame
 | 
				
			||||||
 | 
					#if wxUSE_TOOLBAR
 | 
				
			||||||
    m_frameToolBar = NULL;
 | 
					    m_frameToolBar = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
    m_frameStatusBar = NULL;
 | 
					    m_frameStatusBar = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    DestroyChildren();
 | 
					    DestroyChildren();
 | 
				
			||||||
@@ -732,7 +734,9 @@ wxMDIChildFrame::~wxMDIChildFrame()
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    // will be destroyed by DestroyChildren() but reset them before calling it
 | 
					    // will be destroyed by DestroyChildren() but reset them before calling it
 | 
				
			||||||
    // to avoid using dangling pointers if a callback comes in the meanwhile
 | 
					    // to avoid using dangling pointers if a callback comes in the meanwhile
 | 
				
			||||||
 | 
					#if wxUSE_TOOLBAR
 | 
				
			||||||
    m_frameToolBar = NULL;
 | 
					    m_frameToolBar = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
    m_frameStatusBar = NULL;
 | 
					    m_frameStatusBar = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    DestroyChildren();
 | 
					    DestroyChildren();
 | 
				
			||||||
@@ -1027,11 +1031,13 @@ bool wxMDIChildFrame::HandleWindowPosChanging(void *pos)
 | 
				
			|||||||
            lpPos->cx = rectClient.right - rectClient.left;
 | 
					            lpPos->cx = rectClient.right - rectClient.left;
 | 
				
			||||||
            lpPos->cy = rectClient.bottom - rectClient.top;
 | 
					            lpPos->cy = rectClient.bottom - rectClient.top;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					#if wxUSE_TOOLBAR
 | 
				
			||||||
        wxMDIParentFrame* pFrameWnd = (wxMDIParentFrame *)GetParent();
 | 
					        wxMDIParentFrame* pFrameWnd = (wxMDIParentFrame *)GetParent();
 | 
				
			||||||
        if (pFrameWnd && pFrameWnd->GetToolBar() && pFrameWnd->GetToolBar()->IsShown())
 | 
					        if (pFrameWnd && pFrameWnd->GetToolBar() && pFrameWnd->GetToolBar()->IsShown())
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            pFrameWnd->GetToolBar()->Refresh();
 | 
					            pFrameWnd->GetToolBar()->Refresh();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
#endif // Win95
 | 
					#endif // Win95
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user