Use GTK_SPIN_BUTTON() not (GtkSpinButton*)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-09-13 14:36:32 +00:00
parent 4a03bf0918
commit 4a783bb436

View File

@@ -106,8 +106,8 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
}
m_widget = gtk_spin_button_new_with_range(min, max, 1);
gtk_spin_button_set_value((GtkSpinButton*)m_widget, initial);
m_pos = int(gtk_spin_button_get_value((GtkSpinButton*)m_widget));
gtk_spin_button_set_value( GTK_SPIN_BUTTON(m_widget), initial);
m_pos = (int) gtk_spin_button_get_value( GTK_SPIN_BUTTON(m_widget));
gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget),
(int)(m_windowStyle & wxSP_WRAP) );
@@ -132,7 +132,7 @@ int wxSpinCtrl::GetMin() const
wxCHECK_MSG( (m_widget != NULL), 0, wxT("invalid spin button") );
double min;
gtk_spin_button_get_range((GtkSpinButton*)m_widget, &min, NULL);
gtk_spin_button_get_range( GTK_SPIN_BUTTON(m_widget), &min, NULL);
return int(min);
}
@@ -141,7 +141,7 @@ int wxSpinCtrl::GetMax() const
wxCHECK_MSG( (m_widget != NULL), 0, wxT("invalid spin button") );
double max;
gtk_spin_button_get_range((GtkSpinButton*)m_widget, NULL, &max);
gtk_spin_button_get_range( GTK_SPIN_BUTTON(m_widget), NULL, &max);
return int(max);
}
@@ -180,8 +180,8 @@ void wxSpinCtrl::SetValue( int value )
wxCHECK_RET( (m_widget != NULL), wxT("invalid spin button") );
GtkDisableEvents();
gtk_spin_button_set_value((GtkSpinButton*)m_widget, value);
m_pos = value;
gtk_spin_button_set_value( GTK_SPIN_BUTTON(m_widget), value);
m_pos = (int) gtk_spin_button_get_value( GTK_SPIN_BUTTON(m_widget));
GtkEnableEvents();
}
@@ -203,7 +203,7 @@ void wxSpinCtrl::SetRange(int minVal, int maxVal)
wxCHECK_RET( (m_widget != NULL), wxT("invalid spin button") );
GtkDisableEvents();
gtk_spin_button_set_range((GtkSpinButton*)m_widget, minVal, maxVal);
gtk_spin_button_set_range( GTK_SPIN_BUTTON(m_widget), minVal, maxVal);
GtkEnableEvents();
}