// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
// wxGauge
//-----------------------------------------------------------------------------
#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
// wxGauge
//-----------------------------------------------------------------------------
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( wxT("wxGauge creation failed") );
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( wxT("wxGauge creation failed") );
}
void wxGauge::DoSetGauge()
{
wxASSERT_MSG( 0 <= m_gaugePos && m_gaugePos <= m_rangeMax,
}
void wxGauge::DoSetGauge()
{
wxASSERT_MSG( 0 <= m_gaugePos && m_gaugePos <= m_rangeMax,
gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget),
m_rangeMax ? ((float)m_gaugePos)/m_rangeMax : 0.);
}
gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget),
m_rangeMax ? ((float)m_gaugePos)/m_rangeMax : 0.);
}
+wxSize wxGauge::DoGetBestSize() const
+{
+ wxSize best;
+ if (HasFlag(wxGA_VERTICAL))
+ best = wxSize(28, 100);
+ else
+ best = wxSize(100, 28);
+ CacheBestSize(best);
+ return best;
+}
+