#include "wx/spinctrl.h"
-#ifdef wxUSE_SPINBTN
+#if wxUSE_SPINCTRL
#include "wx/utils.h"
#include "wx/spinbutt.h"
+
#include <math.h>
-#include "gdk/gdk.h"
-#include "gtk/gtk.h"
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
// idle system
event.SetPosition( value );
event.SetEventObject( win );
win->GetEventHandler()->ProcessEvent( event );
-
+
/* always send a thumbtrack event */
if (command != wxEVT_SCROLL_THUMBTRACK)
{
const wxString& name)
{
m_needParent = TRUE;
+ m_acceptsFocus = TRUE;
wxSize new_size = size;
if (new_size.y == -1)
m_widget = gtk_spin_button_new( m_adjust, 1, 0 );
- gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), (m_windowStyle & wxSP_WRAP) );
+ gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget),
+ (int)(m_windowStyle & wxSP_WRAP) );
gtk_signal_connect( GTK_OBJECT (m_adjust),
"value_changed",
m_adjust->upper = fmax;
gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" );
-
+
// these two calls are required due to some bug in GTK
Refresh();
SetFocus();
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
top_frame = top_frame->GetParent();
GtkWindow *window = GTK_WINDOW(top_frame->m_widget);
-
+
if (window->default_widget)
{
gtk_widget_activate (window->default_widget);
}
#endif
+ // wxUSE_SPINCTRL