!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( wxT("wxSlider creation failed") );
- return FALSE;
+ return FALSE;
}
m_oldPos = 0.0;
if (style & wxSL_LABELS)
{
gtk_scale_set_draw_value( GTK_SCALE( m_widget ), TRUE );
- gtk_scale_set_digits( GTK_SCALE( m_widget ), 0 );
+ gtk_scale_set_digits( GTK_SCALE( m_widget ), 0 );
/* labels need more space and too small window will
cause junk to appear on the dialog */
return TRUE;
}
-int wxSlider::GetValue(void) const
+int wxSlider::GetValue() const
{
return (int)(m_adjust->value+0.5);
}
m_adjust->lower = fmin;
m_adjust->upper = fmax;
+ m_adjust->step_increment = 1.0;
+ m_adjust->page_increment = ceil((fmax-fmin) / 10.0);
gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" );
}
-int wxSlider::GetMin(void) const
+int wxSlider::GetMin() const
{
return (int)ceil(m_adjust->lower);
}
-int wxSlider::GetMax(void) const
+int wxSlider::GetMax() const
{
return (int)ceil(m_adjust->upper);
}
gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" );
}
-int wxSlider::GetPageSize(void) const
+int wxSlider::GetPageSize() const
{
return (int)ceil(m_adjust->page_increment);
}
gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" );
}
-int wxSlider::GetThumbLength(void) const
+int wxSlider::GetThumbLength() const
{
return (int)ceil(m_adjust->page_size);
}
{
}
-int wxSlider::GetLineSize(void) const
+int wxSlider::GetLineSize() const
{
return 0;
}
{
}
-int wxSlider::GetTickFreq(void) const
+int wxSlider::GetTickFreq() const
{
return 0;
}
-void wxSlider::ClearTicks(void)
+void wxSlider::ClearTicks()
{
}
{
}
-int wxSlider::GetSelEnd(void) const
+int wxSlider::GetSelEnd() const
{
return 0;
}
-int wxSlider::GetSelStart(void) const
+int wxSlider::GetSelStart() const
{
return 0;
}
-void wxSlider::ClearSel(void)
+void wxSlider::ClearSel()
{
}