Fix compilation of wxIconBundle in some particular minimal builds.
Let the code compile when wxUSE_STREAMS==1 but wxUSE_FILE and wxUSE_FFILE are both 0. Closes #10900. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -33,7 +33,9 @@ public:
|
|||||||
|
|
||||||
// initializes the bundle with the icon(s) found in the file
|
// initializes the bundle with the icon(s) found in the file
|
||||||
#if wxUSE_STREAMS && wxUSE_IMAGE
|
#if wxUSE_STREAMS && wxUSE_IMAGE
|
||||||
|
#if wxUSE_FFILE || wxUSE_FILE
|
||||||
wxIconBundle(const wxString& file, wxBitmapType type = wxBITMAP_TYPE_ANY);
|
wxIconBundle(const wxString& file, wxBitmapType type = wxBITMAP_TYPE_ANY);
|
||||||
|
#endif // wxUSE_FFILE || wxUSE_FILE
|
||||||
wxIconBundle(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY);
|
wxIconBundle(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY);
|
||||||
#endif // wxUSE_STREAMS && wxUSE_IMAGE
|
#endif // wxUSE_STREAMS && wxUSE_IMAGE
|
||||||
|
|
||||||
@@ -46,7 +48,9 @@ public:
|
|||||||
// if the collection already contains icons with the same
|
// if the collection already contains icons with the same
|
||||||
// width and height, they are replaced
|
// width and height, they are replaced
|
||||||
#if wxUSE_STREAMS && wxUSE_IMAGE
|
#if wxUSE_STREAMS && wxUSE_IMAGE
|
||||||
|
#if wxUSE_FFILE || wxUSE_FILE
|
||||||
void AddIcon(const wxString& file, wxBitmapType type = wxBITMAP_TYPE_ANY);
|
void AddIcon(const wxString& file, wxBitmapType type = wxBITMAP_TYPE_ANY);
|
||||||
|
#endif // wxUSE_FFILE || wxUSE_FILE
|
||||||
void AddIcon(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY);
|
void AddIcon(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY);
|
||||||
#endif // wxUSE_STREAMS && wxUSE_IMAGE
|
#endif // wxUSE_STREAMS && wxUSE_IMAGE
|
||||||
|
|
||||||
@@ -83,6 +87,7 @@ public:
|
|||||||
bool IsEmpty() const { return GetIconCount() == 0; }
|
bool IsEmpty() const { return GetIconCount() == 0; }
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2_8
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
|
#if wxUSE_STREAMS && wxUSE_IMAGE && (wxUSE_FFILE || wxUSE_FILE)
|
||||||
wxDEPRECATED( void AddIcon(const wxString& file, long type)
|
wxDEPRECATED( void AddIcon(const wxString& file, long type)
|
||||||
{
|
{
|
||||||
AddIcon(file, (wxBitmapType)type);
|
AddIcon(file, (wxBitmapType)type);
|
||||||
@@ -94,6 +99,7 @@ public:
|
|||||||
AddIcon(file, (wxBitmapType)type);
|
AddIcon(file, (wxBitmapType)type);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
#endif // wxUSE_STREAMS && wxUSE_IMAGE && (wxUSE_FFILE || wxUSE_FILE)
|
||||||
#endif // WXWIN_COMPATIBILITY_2_8
|
#endif // WXWIN_COMPATIBILITY_2_8
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -58,11 +58,14 @@ wxIconBundle::wxIconBundle()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STREAMS && wxUSE_IMAGE
|
#if wxUSE_STREAMS && wxUSE_IMAGE
|
||||||
|
|
||||||
|
#if wxUSE_FFILE || wxUSE_FILE
|
||||||
wxIconBundle::wxIconBundle(const wxString& file, wxBitmapType type)
|
wxIconBundle::wxIconBundle(const wxString& file, wxBitmapType type)
|
||||||
: wxGDIObject()
|
: wxGDIObject()
|
||||||
{
|
{
|
||||||
AddIcon(file, type);
|
AddIcon(file, type);
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_FFILE || wxUSE_FILE
|
||||||
|
|
||||||
wxIconBundle::wxIconBundle(wxInputStream& stream, wxBitmapType type)
|
wxIconBundle::wxIconBundle(wxInputStream& stream, wxBitmapType type)
|
||||||
: wxGDIObject()
|
: wxGDIObject()
|
||||||
@@ -141,6 +144,8 @@ void DoAddIcon(wxIconBundle& bundle,
|
|||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
|
#if wxUSE_FFILE || wxUSE_FILE
|
||||||
|
|
||||||
void wxIconBundle::AddIcon(const wxString& file, wxBitmapType type)
|
void wxIconBundle::AddIcon(const wxString& file, wxBitmapType type)
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
@@ -169,6 +174,8 @@ void wxIconBundle::AddIcon(const wxString& file, wxBitmapType type)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_FFILE || wxUSE_FILE
|
||||||
|
|
||||||
void wxIconBundle::AddIcon(wxInputStream& stream, wxBitmapType type)
|
void wxIconBundle::AddIcon(wxInputStream& stream, wxBitmapType type)
|
||||||
{
|
{
|
||||||
DoAddIcon(*this, stream, type, _("Failed to load image %d from stream."));
|
DoAddIcon(*this, stream, type, _("Failed to load image %d from stream."));
|
||||||
|
Reference in New Issue
Block a user