ProcessScrollEvent(win, wxEVT_SCROLL_THUMBRELEASE);
}
// Keep slider at an integral position
- win->BlockScrollEvent();
+ win->m_blockScrollEvent = true;
gtk_range_set_value(GTK_RANGE (win->m_widget), win->GetValue());
- win->UnblockScrollEvent();
+ win->m_blockScrollEvent = false;
}
}
}
m_pos = 0;
m_scrollEventType = 0;
m_needThumbRelease = false;
+ m_blockScrollEvent = false;
}
bool wxSlider::Create(wxWindow *parent,
return false;
}
- m_pos = 0;
- m_scrollEventType = 0;
- m_needThumbRelease = false;
-
if (style & wxSL_VERTICAL)
m_widget = gtk_vscale_new( (GtkAdjustment *) NULL );
else
{
if (GetValue() != value)
{
- BlockScrollEvent();
+ m_blockScrollEvent = true;
gtk_range_set_value(GTK_RANGE (m_widget), value);
- UnblockScrollEvent();
+ m_blockScrollEvent = false;
}
}
void wxSlider::SetRange( int minValue, int maxValue )
{
- BlockScrollEvent();
+ m_blockScrollEvent = true;
gtk_range_set_range(GTK_RANGE (m_widget), minValue, maxValue);
gtk_range_set_increments(GTK_RANGE (m_widget), 1, (maxValue - minValue + 9) / 10);
- UnblockScrollEvent();
+ m_blockScrollEvent = false;
}
int wxSlider::GetMin() const
void wxSlider::SetPageSize( int pageSize )
{
- BlockScrollEvent();
+ m_blockScrollEvent = true;
gtk_range_set_increments(GTK_RANGE (m_widget), GetLineSize(), pageSize);
- UnblockScrollEvent();
+ m_blockScrollEvent = false;
}
int wxSlider::GetPageSize() const
void wxSlider::SetLineSize( int lineSize )
{
- BlockScrollEvent();
+ m_blockScrollEvent = true;
gtk_range_set_increments(GTK_RANGE (m_widget), lineSize, GetPageSize());
- UnblockScrollEvent();
+ m_blockScrollEvent = false;
}
int wxSlider::GetLineSize() const