X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01111366c9b4ea40eee7f4b13ddfe6f6b9f886db..d9ea011f4d7f66c9728593c5ee10ce2c34964545:/src/gtk1/gauge.cpp diff --git a/src/gtk1/gauge.cpp b/src/gtk1/gauge.cpp index 30688eda35..e176cbe194 100644 --- a/src/gtk1/gauge.cpp +++ b/src/gtk1/gauge.cpp @@ -2,7 +2,7 @@ // Name: gauge.cpp // Purpose: // Author: Robert Roebling -// Id: $id$ +// Id: $Id$ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -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