X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9fa72bd2a637cee761c56e2ce61cec3e43c62765..99257cbe01d32c8bd2e8393ba4ce6a71e5953c7e:/src/gtk/spinctrl.cpp?ds=inline diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp index fc1227c39a..f9cc4a9518 100644 --- a/src/gtk/spinctrl.cpp +++ b/src/gtk/spinctrl.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: spinbutt.cpp +// Name: src/gtk/spinbutt.cpp // Purpose: wxSpinCtrl // Author: Robert // Modified by: @@ -25,9 +25,6 @@ // idle system //----------------------------------------------------------------------------- -extern void wxapp_install_idle_handler(); -extern bool g_isIdle; - static const float sensitivity = 0.02; //----------------------------------------------------------------------------- @@ -101,14 +98,14 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id, int min, int max, int initial, const wxString& name) { - m_needParent = TRUE; - m_acceptsFocus = TRUE; + m_needParent = true; + m_acceptsFocus = true; if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) { wxFAIL_MSG( wxT("wxSpinCtrl creation failed") ); - return FALSE; + return false; } m_oldPos = initial; @@ -128,7 +125,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id, SetValue( value ); - return TRUE; + return true; } void wxSpinCtrl::GtkDisableEvents() @@ -270,7 +267,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event ) } } - if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER)) + if ((event.GetKeyCode() == WXK_RETURN) && (m_windowStyle & wxTE_PROCESS_ENTER)) { wxCommandEvent evt( wxEVT_COMMAND_TEXT_ENTER, m_windowId ); evt.SetEventObject(this); @@ -285,11 +282,11 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event ) bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window ) { - if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return TRUE; + if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return true; - if (GTK_SPIN_BUTTON(m_widget)->panel == window) return TRUE; + if (GTK_SPIN_BUTTON(m_widget)->panel == window) return true; - return FALSE; + return false; } wxSize wxSpinCtrl::DoGetBestSize() const