X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a81258bee4e20d3fa9b3d2f6bf3bcd1200d1e5e0..79570d64d36dfdf31e20b4242bf664232f20594b:/src/gtk/gauge.cpp?ds=sidebyside diff --git a/src/gtk/gauge.cpp b/src/gtk/gauge.cpp index bc6f74b995..e176cbe194 100644 --- a/src/gtk/gauge.cpp +++ b/src/gtk/gauge.cpp @@ -13,6 +13,11 @@ #include "wx/gauge.h" +#if wxUSE_GAUGE + +#include "gdk/gdk.h" +#include "gtk/gtk.h" + //----------------------------------------------------------------------------- // wxGauge //----------------------------------------------------------------------------- @@ -27,7 +32,9 @@ bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range, PreCreation( parent, id, pos, size, style, name ); - SetValidator( validator ); +#if wxUSE_VALIDATORS + SetValidator( validator ); +#endif m_rangeMax = range; m_gaugePos = 0; @@ -35,6 +42,8 @@ bool wxGauge::Create( wxWindow *parent, wxWindowID id, int range, m_widget = gtk_progress_bar_new(); + m_parent->DoAddChild( this ); + PostCreation(); Show( TRUE ); @@ -68,3 +77,10 @@ int wxGauge::GetValue(void) const return m_gaugePos; } +void wxGauge::ApplyWidgetStyle() +{ + SetWidgetStyle(); + gtk_widget_set_style( m_widget, m_widgetStyle ); +} + +#endif