#include "wx/math.h"
#include "wx/gtk/private.h"
-//-----------------------------------------------------------------------------
-// idle system
-//-----------------------------------------------------------------------------
-
-extern void wxapp_install_idle_handler();
-extern bool g_isIdle;
-
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
extern "C" {
static void gtk_scrollbar_callback( GtkAdjustment *adjust,
- SCROLLBAR_CBACK_ARG
wxScrollBar *win )
{
if (g_isIdle) wxapp_install_idle_handler();
win->m_oldPos = adjust->value;
- wxEventType command = GtkScrollTypeToWx(GET_SCROLL_TYPE(win->m_widget));
+ wxEventType command = GtkScrollTypeToWx(GTK_SCROLL_JUMP);
double dvalue = adjust->value;
int value = (int)(dvalue < 0 ? dvalue - 0.5 : dvalue + 0.5);
m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL );
m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );
+ if ( style & wxSB_VERTICAL )
+ {
+ SetVScrollAdjustment(m_adjust);
+ }
g_signal_connect (m_adjust, "value_changed",
G_CALLBACK (gtk_scrollbar_callback), this);