From: Guillermo Rodriguez Garcia <guille@iies.es>
Date: Tue, 18 Jan 2000 20:13:43 +0000 (+0000)
Subject: isScrolling() in wxScroll[Win]Event
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/298d19f9adbbf0de58eb6593e97fadd86fe1a5f6

isScrolling() in wxScroll[Win]Event


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/include/wx/event.h b/include/wx/event.h
index 83d7212b5f..7e0eb58997 100644
--- a/include/wx/event.h
+++ b/include/wx/event.h
@@ -482,8 +482,14 @@ public:
 
     int GetOrientation() const { return (int) m_extraLong ; }
     int GetPosition() const { return m_commandInt ; }
+    bool IsScrolling() const { return m_isScrolling; }
     void SetOrientation(int orient) { m_extraLong = (long) orient; }
     void SetPosition(int pos) { m_commandInt = pos; }
+    void SetScrolling(bool isScrolling) { m_isScrolling = isScrolling; }
+
+    void CopyObject(wxObject& obj) const;
+public:
+    bool m_isScrolling;
 };
 
 // ScrollWin event class, derived fom wxEvent. wxScrollWinEvents
@@ -513,13 +519,16 @@ public:
 
     int GetOrientation() const { return (int) m_extraLong ; }
     int GetPosition() const { return m_commandInt ; }
+    bool IsScrolling() const { return m_isScrolling; }
     void SetOrientation(int orient) { m_extraLong = (long) orient; }
     void SetPosition(int pos) { m_commandInt = pos; }
+    void SetScrolling(bool isScrolling) { m_isScrolling = isScrolling; }
 
     void CopyObject(wxObject& object_dest) const;
 public:
     int               m_commandInt;    // Additional information
     long              m_extraLong;
+    bool              m_isScrolling;
 };
 
 // Mouse event class
diff --git a/src/common/event.cpp b/src/common/event.cpp
index 97f135ff08..eaf9a7eff9 100644
--- a/src/common/event.cpp
+++ b/src/common/event.cpp
@@ -205,6 +205,16 @@ wxScrollEvent::wxScrollEvent(wxEventType commandType,
 {
     m_extraLong = orient;
     m_commandInt = pos;
+    m_isScrolling = TRUE;
+}
+
+void wxScrollEvent::CopyObject(wxObject& obj_d) const
+{
+    wxScrollEvent *obj = (wxScrollEvent*)&obj_d;
+
+    wxCommandEvent::CopyObject(obj_d);
+
+    obj->m_isScrolling  = m_isScrolling;
 }
 
 /*
@@ -218,6 +228,7 @@ wxScrollWinEvent::wxScrollWinEvent(wxEventType commandType,
     m_eventType = commandType;
     m_extraLong = orient;
     m_commandInt = pos;
+    m_isScrolling = TRUE;
 }
 
 void wxScrollWinEvent::CopyObject(wxObject& obj_d) const
@@ -228,6 +239,7 @@ void wxScrollWinEvent::CopyObject(wxObject& obj_d) const
 
     obj->m_extraLong    = m_extraLong;
     obj->m_commandInt   = m_commandInt;
+    obj->m_isScrolling  = m_isScrolling;
 }
 
 /*