From a7bc03c94bba504a4ce68352af0c9782e1a5eb14 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 2 Aug 2003 00:12:39 +0000 Subject: [PATCH] use wxWindowBase, not wxWindow, in wxUpdateUIEvent::CanUpdate() (wxUniv compilation fix) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/event.h | 31 ++++++++++++++++--------------- src/common/event.cpp | 2 +- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/include/wx/event.h b/include/wx/event.h index 61a0634053..324cba4a3d 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -39,6 +39,7 @@ class WXDLLIMPEXP_BASE wxList; class WXDLLIMPEXP_CORE wxDC; class WXDLLIMPEXP_CORE wxMenu; class WXDLLIMPEXP_CORE wxWindow; + class WXDLLIMPEXP_CORE wxWindowBase; #endif // wxUSE_GUI // ---------------------------------------------------------------------------- @@ -546,10 +547,10 @@ public: bool IsSelection() const { return (m_extraLong != 0); } void SetExtraLong(long extraLong) { m_extraLong = extraLong; } - long GetExtraLong() const { return m_extraLong ; } + long GetExtraLong() const { return m_extraLong; } void SetInt(int i) { m_commandInt = i; } - long GetInt() const { return m_commandInt ; } + long GetInt() const { return m_commandInt; } virtual wxEvent *Clone() const { return new wxCommandEvent(*this); } @@ -619,8 +620,8 @@ public: wxScrollEvent(wxEventType commandType = wxEVT_NULL, int winid = 0, int pos = 0, int orient = 0); - int GetOrientation() const { return (int) m_extraLong ; } - int GetPosition() const { return m_commandInt ; } + int GetOrientation() const { return (int) m_extraLong; } + int GetPosition() const { return m_commandInt; } void SetOrientation(int orient) { m_extraLong = (long) orient; } void SetPosition(int pos) { m_commandInt = pos; } @@ -652,8 +653,8 @@ public: { m_commandInt = event.m_commandInt; m_extraLong = event.m_extraLong; } - int GetOrientation() const { return (int) m_extraLong ; } - int GetPosition() const { return m_commandInt ; } + int GetOrientation() const { return (int) m_extraLong; } + int GetPosition() const { return m_commandInt; } void SetOrientation(int orient) { m_extraLong = (long) orient; } void SetPosition(int pos) { m_commandInt = pos; } @@ -798,7 +799,7 @@ public: wxPoint GetPosition() const { return wxPoint(m_x, m_y); } // Find the logical position of the event given the DC - wxPoint GetLogicalPosition(const wxDC& dc) const ; + wxPoint GetLogicalPosition(const wxDC& dc) const; // Compatibility #if WXWIN_COMPATIBILITY @@ -1507,10 +1508,10 @@ public: (GetEventType() == wxEVT_JOY_BUTTON_UP)); } // Was it a move event? - bool IsMove() const { return (GetEventType() == wxEVT_JOY_MOVE) ; } + bool IsMove() const { return (GetEventType() == wxEVT_JOY_MOVE); } // Was it a zmove event? - bool IsZMove() const { return (GetEventType() == wxEVT_JOY_ZMOVE) ; } + bool IsZMove() const { return (GetEventType() == wxEVT_JOY_ZMOVE); } // Was it a down event from button 1, 2, 3, 4 or any? bool ButtonDown(int but = wxJOY_BUTTON_ANY) const @@ -1640,14 +1641,14 @@ public: static void SetUpdateInterval(long updateInterval) { sm_updateInterval = updateInterval; } // Returns the current interval between updates in milliseconds - static long GetUpdateInterval() { return sm_updateInterval ; } + static long GetUpdateInterval() { return sm_updateInterval; } // Can we update this window? - static bool CanUpdate(wxWindow* win) ; + static bool CanUpdate(wxWindowBase *win); // Reset the update time to provide a delay until the next // time we should update - static void ResetUpdateTime() ; + static void ResetUpdateTime(); // Specify how wxWindows will send update events: to // all windows, or only to those which specify that they @@ -1655,7 +1656,7 @@ public: static void SetMode(wxUpdateUIMode mode) { sm_updateMode = mode; } // Returns the UI update mode - static wxUpdateUIMode GetMode() { return sm_updateMode ; } + static wxUpdateUIMode GetMode() { return sm_updateMode; } virtual wxEvent *Clone() const { return new wxUpdateUIEvent(*this); } @@ -2019,10 +2020,10 @@ public: static void SetMode(wxIdleMode mode) { sm_idleMode = mode; } // Returns the idle event mode - static wxIdleMode GetMode() { return sm_idleMode ; } + static wxIdleMode GetMode() { return sm_idleMode; } // Can we send an idle event? - static bool CanSend(wxWindow* win) ; + static bool CanSend(wxWindow* win); protected: bool m_requestMore; diff --git a/src/common/event.cpp b/src/common/event.cpp index 1906077d27..49601ef677 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -390,7 +390,7 @@ long wxUpdateUIEvent::sm_updateInterval = 0; wxUpdateUIMode wxUpdateUIEvent::sm_updateMode = wxUPDATE_UI_PROCESS_ALL; // Can we update? -bool wxUpdateUIEvent::CanUpdate(wxWindow* win) +bool wxUpdateUIEvent::CanUpdate(wxWindowBase *win) { // Don't update if we've switched global updating off // and this window doesn't support updates. -- 2.45.2