wx debugging: ostream<< for wxTreeItemId

This commit is contained in:
Moritz Bunkus 2013-12-08 19:49:30 +01:00
parent bda8dee41a
commit 79b850659c

View File

@ -27,6 +27,7 @@
#include <wx/bitmap.h>
#include <wx/icon.h>
#include <wx/mstream.h>
#include <wx/treebase.h>
#include "common/logger.h"
@ -103,6 +104,17 @@ operator <<(std::ostream &out,
# endif
#endif
inline std::ostream &
operator <<(std::ostream &out,
wxTreeItemId const &id) {
#if wxCHECK_VERSION(2, 9, 0)
out << "ItemID[" << id.IsOk() << "@" << id.GetID() << "]";
#else
out << "ItemID[" << id.IsOk() << "@" << id.m_pItem << "]";
#endif
return out;
}
// Use wxComboBox on non-Windows builds with wxWidgets 2.8.0 and newer
// because GTK's combo box has serious problems (see bug 339).
// wxWidgets 2.9.x's default wxComboBox is good, though.