Hide operator<<() overloaded for wxBitmapBundle

Define it inside this class and not in the global scope.
This commit is contained in:
Vadim Zeitlin 2024-01-06 23:04:34 +01:00
parent 4833c67f79
commit 0122ce20c4

View file

@ -17,6 +17,7 @@
class wxBitmapBundleImpl;
class WXDLLIMPEXP_FWD_CORE wxIconBundle;
class WXDLLIMPEXP_FWD_CORE wxImageList;
class WXDLLIMPEXP_FWD_BASE wxVariant;
class WXDLLIMPEXP_FWD_CORE wxWindow;
// ----------------------------------------------------------------------------
@ -155,6 +156,15 @@ public:
return GetImpl() == other.GetImpl();
}
// Allow using wxBitmapBundle with wxVariant
#if wxUSE_VARIANT
friend WXDLLIMPEXP_CORE
wxBitmapBundle& operator<<(wxBitmapBundle& value, const wxVariant& variant);
friend WXDLLIMPEXP_CORE
wxVariant& operator<<(wxVariant& variant, const wxBitmapBundle& value);
#endif // wxUSE_VARIANT
// Implementation only from now on.
// Get the bitmap size preferred by the majority of the elements of the
@ -274,19 +284,4 @@ public:
virtual wxBitmap GetBitmap(const wxSize& size) = 0;
};
// ----------------------------------------------------------------------------
// Allow using wxBitmapBundle in wxVariant
// ----------------------------------------------------------------------------
#if wxUSE_VARIANT
class WXDLLIMPEXP_FWD_BASE wxVariant;
WXDLLIMPEXP_CORE
wxBitmapBundle& operator<<(wxBitmapBundle& value, const wxVariant& variant);
WXDLLIMPEXP_CORE
wxVariant& operator<<(wxVariant& variant, const wxBitmapBundle& value);
#endif // wxUSE_VARIANT
#endif // _WX_BMPBNDL_H_