int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
// Return client data instead
-// FIXME: this is horrible, using "char *" instead of "void *" belongs to the 70s!
-WXDLLEXPORT wxChar* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
- int n, const wxString *choices, char **client_data,
+WXDLLEXPORT void* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
+ int n, const wxString *choices, void **client_data,
wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1,
bool centre = TRUE,
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
-WXDLLEXPORT wxChar* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
- int n, wxChar *choices[], char **client_data,
+WXDLLEXPORT void* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
+ int n, wxChar *choices[], void **client_data,
wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1,
bool centre = TRUE,
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
// local constants
// ----------------------------------------------------------------------------
-static const char *s_MRUEntryFormat = wxT("&%d %s");
+static const wxChar *s_MRUEntryFormat = wxT("&%d %s");
// ============================================================================
// implementation
}
wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document template"), _("Templates"), n,
- strings, (char **)data);
+ strings, (void **)data);
delete[] strings;
delete[] data;
return theTemplate;
}
}
wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document view"), _("Views"), n,
- strings, (char **)data);
+ strings, (void **)data);
delete[] strings;
delete[] data;
return theTemplate;
return ans;
}
-wxChar *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n,
- const wxString *choices, wxChar **client_data, wxWindow *parent,
+void *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n,
+ const wxString *choices, void **client_data, wxWindow *parent,
int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre),
int WXUNUSED(width), int WXUNUSED(height) )
{
wxSingleChoiceDialog dialog(parent, message, caption, n, choices, (char **)client_data);
if ( dialog.ShowModal() == wxID_OK )
- return (wxChar *)dialog.GetSelectionClientData();
+ return dialog.GetSelectionClientData();
else
return NULL;
}
// Overloaded for backward compatibility
-wxChar *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n,
- wxChar *choices[], wxChar **client_data, wxWindow *parent,
+void *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n,
+ wxChar *choices[], void **client_data, wxWindow *parent,
int x, int y, bool centre,
int width, int height )
{
{
strings[i] = choices[i];
}
- wxChar *data = wxGetSingleChoiceData(message, caption, n, (const wxString *)strings, client_data, parent,
+ void *data = wxGetSingleChoiceData(message, caption, n, (const wxString *)strings, client_data, parent,
x, y, centre, width, height);
delete[] strings;
return data;