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:
parent
05e4fd64c4
commit
1904aa72f0
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 );
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user