//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
- float line_step = win->m_adjust->step_increment;
- float page_step = win->m_adjust->page_increment;
+ float line_step = win->m_adjust->step_increment;
+ float page_step = win->m_adjust->page_increment;
- if (fabs(diff-line_step) < 0.2) command = wxEVT_SCROLL_LINEDOWN;
- else if (fabs(diff+line_step) < 0.2) command = wxEVT_SCROLL_LINEUP;
- else if (fabs(diff-page_step) < 0.2) command = wxEVT_SCROLL_PAGEDOWN;
- else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP;
- else command = wxEVT_SCROLL_THUMBTRACK;
+ if (fabs(diff-line_step) < 0.2) command = wxEVT_SCROLL_LINEDOWN;
+ else if (fabs(diff+line_step) < 0.2) command = wxEVT_SCROLL_LINEUP;
+ else if (fabs(diff-page_step) < 0.2) command = wxEVT_SCROLL_PAGEDOWN;
+ else if (fabs(diff+page_step) < 0.2) command = wxEVT_SCROLL_PAGEUP;
+ else command = wxEVT_SCROLL_THUMBTRACK;
- wxSpinEvent event( command, win->GetId());
- event.SetPosition( value );
- event.SetOrientation( wxVERTICAL );
- event.SetEventObject( win );
+ wxSpinEvent event( command, win->GetId());
+ event.SetPosition( value );
+ event.SetOrientation( wxVERTICAL );
+ event.SetEventObject( win );
bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
long style, const wxString& name)
{
bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
long style, const wxString& name)
{
- PreCreation( parent, id, pos, new_size, style, name );
+ PreCreation( parent, id, pos, new_size, style, name );
- m_adjust = (GtkAdjustment*) gtk_adjustment_new( 0.0, 0.0, 100.0, 1.0, 5.0, 0.0);
+ m_adjust = (GtkAdjustment*) gtk_adjustment_new( 0.0, 0.0, 100.0, 1.0, 5.0, 0.0);
- gtk_signal_connect (GTK_OBJECT (m_adjust), "value_changed",
- (GtkSignalFunc) gtk_spinbutt_callback, (gpointer) this );
+ gtk_signal_connect( GTK_OBJECT (m_adjust),
+ "value_changed",
+ (GtkSignalFunc) gtk_spinbutt_callback,
+ (gpointer) this );
- float fpos = (float)value;
- m_oldPos = fpos;
- if (fabs(fpos-m_adjust->value) < 0.2) return;
- m_adjust->value = fpos;
+ float fpos = (float)value;
+ m_oldPos = fpos;
+ if (fabs(fpos-m_adjust->value) < 0.2) return;
+
+ m_adjust->value = fpos;