summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
aed8ac3)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4720
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#if wxUSE_SLIDER
#include "wx/utils.h"
#if wxUSE_SLIDER
#include "wx/utils.h"
-#include "gdk/gdk.h"
-#include "gtk/gtk.h"
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
// idle system
//-----------------------------------------------------------------------------
// idle system
extern bool g_blockEventsOnDrag;
extern bool g_blockEventsOnDrag;
+static const float sensitivity = 0.02;
+
//-----------------------------------------------------------------------------
// "value_changed"
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// "value_changed"
//-----------------------------------------------------------------------------
if (g_blockEventsOnDrag) return;
float diff = adjust->value - win->m_oldPos;
if (g_blockEventsOnDrag) return;
float diff = adjust->value - win->m_oldPos;
- if (fabs(diff) < 0.2) return;
+ if (fabs(diff) < sensitivity) return;
win->m_oldPos = adjust->value;
win->m_oldPos = adjust->value;
IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl)
-wxSlider::wxSlider(void)
-{
-}
-
-wxSlider::~wxSlider(void)
-{
-}
-
bool wxSlider::Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos, const wxSize& size,
bool wxSlider::Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos, const wxSize& size,
#if wxUSE_SLIDER
#include "wx/utils.h"
#if wxUSE_SLIDER
#include "wx/utils.h"
-#include "gdk/gdk.h"
-#include "gtk/gtk.h"
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
// idle system
//-----------------------------------------------------------------------------
// idle system
extern bool g_blockEventsOnDrag;
extern bool g_blockEventsOnDrag;
+static const float sensitivity = 0.02;
+
//-----------------------------------------------------------------------------
// "value_changed"
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// "value_changed"
//-----------------------------------------------------------------------------
if (g_blockEventsOnDrag) return;
float diff = adjust->value - win->m_oldPos;
if (g_blockEventsOnDrag) return;
float diff = adjust->value - win->m_oldPos;
- if (fabs(diff) < 0.2) return;
+ if (fabs(diff) < sensitivity) return;
win->m_oldPos = adjust->value;
win->m_oldPos = adjust->value;
IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl)
-wxSlider::wxSlider(void)
-{
-}
-
-wxSlider::~wxSlider(void)
-{
-}
-
bool wxSlider::Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos, const wxSize& size,
bool wxSlider::Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos, const wxSize& size,