Make wxDumpWindow() public and available in wxMSW too

This function was defined in wxGTK and wxOSX, but not in wxMSW or the
other ports, but it can be useful there too, so make it public and
define it in common code.
This commit is contained in:
Vadim Zeitlin
2021-10-20 23:11:40 +01:00
parent 85503d1dcd
commit 9e5c8eef24
7 changed files with 58 additions and 45 deletions

View File

@@ -309,26 +309,6 @@ static wxPoint gs_lastGesturePoint;
// the trace mask used for the focus debugging messages
#define TRACE_FOCUS wxT("focus")
#if wxUSE_LOG_TRACE
// Function used to dump a brief description of a window.
static
wxString wxDumpWindow(wxWindowGTK* win)
{
if ( !win )
return "(no window)";
wxString s = wxString::Format("%s(%p",
win->GetClassInfo()->GetClassName(), win);
wxString label = win->GetLabel();
if ( !label.empty() )
s += wxString::Format(", \"%s\"", label);
s += ")";
return s;
}
#endif // wxUSE_LOG_TRACE
// A handy function to run from under gdb to show information about the given
// GtkWidget. Right now it only shows its type, we could enhance it to show
// more information later but this is already pretty useful.