+ return TRUE;
+}
+
+void wxGauge::DoSetGauge()
+{
+ wxASSERT_MSG( 0 <= m_gaugePos && m_gaugePos <= m_rangeMax,
+ _T("invalid gauge position in DoSetGauge()") );
+
+ gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget),
+ m_rangeMax ? ((float)m_gaugePos)/m_rangeMax : 0.);
+}
+
+wxSize wxGauge::DoGetBestSize() const
+{
+ if (HasFlag(wxGA_VERTICAL))
+ return wxSize(28, 100);
+ else
+ return wxSize(100, 28);
+}
+
+void wxGauge::SetRange( int range )
+{
+ m_rangeMax = range;
+ if (m_gaugePos > m_rangeMax)
+ m_gaugePos = m_rangeMax;
+
+ DoSetGauge();
+}
+
+void wxGauge::SetValue( int pos )
+{
+ wxCHECK_RET( pos <= m_rangeMax, _T("invalid value in wxGauge::SetValue()") );