X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1294ada8e87725409f290328da02306e5c8f4eb..14aed066ad1a572673a1b9603725c60cc108c009:/src/gtk1/choice.cpp?ds=inline diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp index 0d50df554f..1a17d2d027 100644 --- a/src/gtk1/choice.cpp +++ b/src/gtk1/choice.cpp @@ -78,7 +78,7 @@ static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice * else if ( choice->HasClientUntypedData() ) event.SetClientData( choice->GetClientData(n) ); - choice->GetEventHandler()->ProcessEvent(event); + choice->HandleWindowEvent(event); } } @@ -86,11 +86,9 @@ static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice * // wxChoice //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControlWithItems) - wxChoice::wxChoice() { - m_strings = (wxSortedArrayString *)NULL; + m_strings = NULL; } bool wxChoice::Create( wxWindow *parent, wxWindowID id, @@ -228,7 +226,7 @@ void wxChoice::DoDeleteOneItem(unsigned int n) { wxCHECK_RET( m_widget != NULL, wxT("invalid choice") ); - wxCHECK_RET( IsValid(n), _T("invalid index in wxChoice::Delete") ); + wxCHECK_RET( IsValid(n), wxT("invalid index in wxChoice::Delete") ); // if the item to delete is before the selection, and the selection is valid if (((int)n < m_selection_hack) && (m_selection_hack != wxNOT_FOUND)) @@ -264,7 +262,7 @@ void wxChoice::DoDeleteOneItem(unsigned int n) void ** const data = &itemsData[0]; if ( HasClientObjectData() ) - Append(items, wx_reinterpret_cast(wxClientData **, data)); + Append(items, reinterpret_cast(data)); else Append(items, data); } @@ -282,7 +280,7 @@ int wxChoice::FindString( const wxString &string, bool bCase ) const while (child) { GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = (GtkLabel *) NULL; + GtkLabel *label = NULL; if (bin->child) label = GTK_LABEL(bin->child); if (!label) @@ -322,7 +320,7 @@ void wxChoice::SetString(unsigned int n, const wxString& str ) GtkBin *bin = GTK_BIN( child->data ); if (count == n) { - GtkLabel *label = (GtkLabel *) NULL; + GtkLabel *label = NULL; if (bin->child) label = GTK_LABEL(bin->child); if (!label) @@ -351,7 +349,7 @@ wxString wxChoice::GetString(unsigned int n) const GtkBin *bin = GTK_BIN( child->data ); if (count == n) { - GtkLabel *label = (GtkLabel *) NULL; + GtkLabel *label = NULL; if (bin->child) label = GTK_LABEL(bin->child); if (!label) @@ -424,7 +422,7 @@ void wxChoice::DoApplyWidgetStyle(GtkRcStyle *style) gtk_widget_modify_style( GTK_WIDGET( child->data ), style ); GtkBin *bin = GTK_BIN( child->data ); - GtkWidget *label = (GtkWidget *) NULL; + GtkWidget *label = NULL; if (bin->child) label = bin->child; if (!label) @@ -453,11 +451,11 @@ int wxChoice::GtkAddHelper(GtkWidget *menu, unsigned int pos, const wxString& it if ( index ) { m_clientList.Insert( m_clientList.Item(index - 1), - (wxObject*) NULL ); + NULL ); } else { - m_clientList.Insert( (wxObject*) NULL ); + m_clientList.Insert( NULL ); } } else @@ -469,13 +467,13 @@ int wxChoice::GtkAddHelper(GtkWidget *menu, unsigned int pos, const wxString& it if (pos == m_clientList.GetCount()) { gtk_menu_append( GTK_MENU(menu), menu_item ); - m_clientList.Append( (wxObject*) NULL ); + m_clientList.Append( NULL ); index = m_clientList.GetCount() - 1; } else { gtk_menu_insert( GTK_MENU(menu), menu_item, pos ); - m_clientList.Insert( pos, (wxObject*) NULL ); + m_clientList.Insert( pos, NULL ); index = pos; } }