X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f1e01716310cb6e3bfcf5894b442d277bc32789a..ab7049776d45e622f621dd06216a4c1a1ad34b15:/src/gtk1/tglbtn.cpp diff --git a/src/gtk1/tglbtn.cpp b/src/gtk1/tglbtn.cpp index 78b4a596c9..286f3fc478 100644 --- a/src/gtk1/tglbtn.cpp +++ b/src/gtk1/tglbtn.cpp @@ -7,7 +7,7 @@ // Created: 08.02.01 // RCS-ID: $Id$ // Copyright: (c) 2000 Johnny C. Norris II -// License: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". @@ -43,11 +43,11 @@ static void gtk_togglebutton_clicked_callback(GtkWidget *WXUNUSED(widget), wxTog wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, cb->GetId()); event.SetInt(cb->GetValue()); event.SetEventObject(cb); - cb->GetEventHandler()->ProcessEvent(event); + cb->HandleWindowEvent(event); } } -DEFINE_EVENT_TYPE(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED) +wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); // ------------------------------------------------------------------------ // wxToggleBitmapButton @@ -81,7 +81,7 @@ bool wxToggleBitmapButton::Create(wxWindow *parent, wxWindowID id, if (style & wxNO_BORDER) gtk_button_set_relief( GTK_BUTTON(m_widget), GTK_RELIEF_NONE ); - if (m_bitmap.Ok()) + if (m_bitmap.IsOk()) { OnSetBitmap(); } @@ -134,9 +134,9 @@ void wxToggleBitmapButton::SetLabel(const wxBitmap& label) void wxToggleBitmapButton::OnSetBitmap() { - if (!m_bitmap.Ok()) return; + if (!m_bitmap.IsOk()) return; - GdkBitmap *mask = (GdkBitmap *) NULL; + GdkBitmap *mask = NULL; if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); GtkWidget *child = BUTTON_CHILD(m_widget); @@ -179,11 +179,11 @@ void wxToggleBitmapButton::OnInternalIdle() { wxCursor cursor = m_cursor; - if (g_globalCursor.Ok()) + if (g_globalCursor.IsOk()) cursor = g_globalCursor; GdkWindow *win = TOGGLE_BUTTON_EVENT_WIN(m_widget); - if ( win && cursor.Ok() ) + if ( win && cursor.IsOk() ) { /* I now set the cursor the anew in every OnInternalIdle call as setting the cursor in a parent window also effects the @@ -203,7 +203,7 @@ wxSize wxToggleBitmapButton::DoGetBestSize() const { wxSize best; - if (m_bitmap.Ok()) + if (m_bitmap.IsOk()) { int border = HasFlag(wxNO_BORDER) ? 4 : 10; best.x = m_bitmap.GetWidth()+border; @@ -320,11 +320,11 @@ void wxToggleButton::OnInternalIdle() { wxCursor cursor = m_cursor; - if (g_globalCursor.Ok()) + if (g_globalCursor.IsOk()) cursor = g_globalCursor; GdkWindow *win = TOGGLE_BUTTON_EVENT_WIN(m_widget); - if ( win && cursor.Ok() ) + if ( win && cursor.IsOk() ) { /* I now set the cursor the anew in every OnInternalIdle call as setting the cursor in a parent window also effects the