+// we only have to do it here when we use wxStatusBarGeneric in addition to the
+// standard wxStatusBar class, if wxStatusBarGeneric is the same as
+// wxStatusBar, then the corresponding IMPLEMENT_DYNAMIC_CLASS is already in
+// common/statbar.cpp
+#if defined(__WXMAC__) || \
+ (defined(wxUSE_NATIVE_STATUSBAR) && wxUSE_NATIVE_STATUSBAR)
+ #include "wx/generic/statusbr.h"
+
+ IMPLEMENT_DYNAMIC_CLASS(wxStatusBarGeneric, wxWindow)
+#endif // wxUSE_NATIVE_STATUSBAR
+
+// Default status border dimensions
+#define wxTHICK_LINE_BORDER 2
+
+// Margin between the field text and the field rect
+#define wxFIELD_TEXT_MARGIN 2
+
+// ----------------------------------------------------------------------------
+// GTK+ signal handler
+// ----------------------------------------------------------------------------
+
+#if defined( __WXGTK20__ )
+#if GTK_CHECK_VERSION(2,12,0)
+extern "C" {
+static
+gboolean statusbar_query_tooltip(GtkWidget* WXUNUSED(widget),
+ gint x,
+ gint y,
+ gboolean WXUNUSED(keyboard_mode),
+ GtkTooltip *tooltip,
+ wxStatusBar* statbar)
+{
+ int n = statbar->GetFieldFromPoint(wxPoint(x,y));
+ if (n == wxNOT_FOUND)
+ return FALSE;
+
+ // should we show the tooltip for the n-th pane of the statusbar?
+ if (!statbar->GetField(n).IsEllipsized())
+ return FALSE; // no, it's not useful
+
+ const wxString& str = statbar->GetStatusText(n);
+ if (str.empty())
+ return FALSE;
+
+ gtk_tooltip_set_text(tooltip, wxGTK_CONV_SYS(str));
+ return TRUE;
+}
+}
+#endif
+#endif