]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/choicdgg.cpp
Reflect changes in stc.cpp in stc.cpp.in from which it's generated.
[wxWidgets.git] / src / generic / choicdgg.cpp
index 073e669417ee38d1cf061aabb2706212489c56d2..6acb6833f9c70fae0509c0c8dd5335c350aee965 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Julian Smart
 // Modified by: 03.11.00: VZ to add wxArrayString and multiple sel functions
 // Created:     04/01/98
-// RCS-ID:      $Id$
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -222,13 +221,13 @@ void *wxGetSingleChoiceData( const wxString& message,
                              int initialSelection)
 {
     wxSingleChoiceDialog dialog(parent, message, caption, n, choices,
-                                (char **)client_data);
+                                client_data);
 
     dialog.SetSelection(initialSelection);
 
     void *data;
     if ( dialog.ShowModal() == wxID_OK )
-        data = dialog.GetSelectionClientData();
+        data = dialog.GetSelectionData();
     else
         data = NULL;
 
@@ -467,35 +466,12 @@ END_EVENT_TABLE()
 
 IMPLEMENT_DYNAMIC_CLASS(wxSingleChoiceDialog, wxDialog)
 
-wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
-                                           const wxString& message,
-                                           const wxString& caption,
-                                           int n,
-                                           const wxString *choices,
-                                           char **clientData,
-                                           long style,
-                                           const wxPoint& WXUNUSED(pos))
-{
-    Create(parent, message, caption, n, choices, clientData, style);
-}
-
-wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
-                                           const wxString& message,
-                                           const wxString& caption,
-                                           const wxArrayString& choices,
-                                           char **clientData,
-                                           long style,
-                                           const wxPoint& WXUNUSED(pos))
-{
-    Create(parent, message, caption, choices, clientData, style);
-}
-
 bool wxSingleChoiceDialog::Create( wxWindow *parent,
                                    const wxString& message,
                                    const wxString& caption,
                                    int n,
                                    const wxString *choices,
-                                   char **clientData,
+                                   void **clientData,
                                    long style,
                                    const wxPoint& pos )
 {
@@ -519,7 +495,7 @@ bool wxSingleChoiceDialog::Create( wxWindow *parent,
                                    const wxString& message,
                                    const wxString& caption,
                                    const wxArrayString& choices,
-                                   char **clientData,
+                                   void **clientData,
                                    long style,
                                    const wxPoint& pos )
 {
@@ -531,7 +507,7 @@ bool wxSingleChoiceDialog::Create( wxWindow *parent,
 // Set the selection
 void wxSingleChoiceDialog::SetSelection(int sel)
 {
-    wxCHECK_RET( sel > 0 && (unsigned)sel < m_listbox->GetCount(),
+    wxCHECK_RET( sel >= 0 && (unsigned)sel < m_listbox->GetCount(),
                  "Invalid initial selection" );
 
     m_listbox->SetSelection(sel);