-// Split message, using constraints to position controls
-static void wxSplitMessage2(const wxChar *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer)
-{
- wxChar *copyMessage = copystring(message);
- size_t i = 0;
- size_t len = wxStrlen(copyMessage);
- wxChar *currentMessage = copyMessage;
-
-// wxWindow *lastWindow = parent;
-
- while (i < len) {
- while ((i < len) && (copyMessage[i] != _T('\n'))) i++;
- if (i < len) copyMessage[i] = 0;
- wxStaticText *mess = new wxStaticText(parent, -1, currentMessage);
-
-/*
- wxLayoutConstraints *c = new wxLayoutConstraints;
- c->left.SameAs (parent, wxLeft, 10);
- c->top.SameAs (lastWindow, wxBottom, 5);
- c->right.AsIs ();
- c->height.AsIs ();
-
- mess->SetConstraints(c);
-*/
- sizer->AddSizerChild(mess);
-
- messageList->Append(mess);
-
- currentMessage = copyMessage + i + 1;
- }
- delete[] copyMessage;
-}
-
-wxString wxGetSingleChoice( const wxString& message, const wxString& caption, int n,
- const wxString *choices, wxWindow *parent,
- int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre),
- int WXUNUSED(width), int WXUNUSED(height) )
-{
- wxSingleChoiceDialog dialog(parent, message, caption, n, choices);
- if ( dialog.ShowModal() == wxID_OK )
- {
- return dialog.GetStringSelection();
- }
- else
- return "";
-}
-
-// Overloaded for backward compatibility
-wxString wxGetSingleChoice( const wxString& message, const wxString& caption, int n,
- char *choices[], wxWindow *parent,
- int x, int y, bool centre,
- int width, int height )
-{
- wxString *strings = new wxString[n];
- int i;
- for ( i = 0; i < n; i++)
- {
- strings[i] = choices[i];
- }
- wxString ans(wxGetSingleChoice(message, caption, n, (const wxString *)strings, parent,
- x, y, centre, width, height));
- delete[] strings;
- return ans;
-}
-
-int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, int n,
- const wxString *choices, wxWindow *parent,
- int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre),
- int WXUNUSED(width), int WXUNUSED(height) )
-{
- wxSingleChoiceDialog dialog(parent, message, caption, n, choices);
- if ( dialog.ShowModal() == wxID_OK )
- {
- return dialog.GetSelection();
- }
- else
- return -1;
-}
-
-// Overloaded for backward compatibility
-int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, int n,
- wxChar *choices[], wxWindow *parent,
- int x, int y, bool centre,
- int width, int height )
-{
- wxString *strings = new wxString[n];
- int i;
- for ( i = 0; i < n; i++)
- {
- strings[i] = choices[i];
- }
- int ans = wxGetSingleChoiceIndex(message, caption, n, (const wxString *)strings, parent,
- x, y, centre, width, height);
- delete[] strings;
- return ans;
-}
-
-wxChar *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n,
- const wxString *choices, wxChar **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, client_data);
- if ( dialog.ShowModal() == wxID_OK )
- {
- 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,
- int x, int y, bool centre,
- int width, int height )
-{
- wxString *strings = new wxString[n];
- int i;
- for ( i = 0; i < n; i++)
- {
- strings[i] = choices[i];
- }
- wxChar *data = wxGetSingleChoiceData(message, caption, n, (const wxString *)strings, client_data, parent,
- x, y, centre, width, height);
- delete[] strings;
- return data;
-}
-
-
-/* Multiple choice dialog contributed by Robert Cowell
- *
-
-The new data passed are in the "int nsel" and "int * selection"
-
-The idea is to make a multiple selection from list of strings.
-The returned value is the total number selected. initialily there
-are nsel selected, with indices stored in
-selection[0],...,selection[nsel-1] which appear highlighted to
-begin with. On exit with value i
-selection[0..i-1] contains the indices of the selected items.
-(Some prior selectecions might be deselected.)
-Thus selection must be as big as choices, in case all items are
-selected.
-
-*/
-/*
-int wxGetMultipleChoice(const wxString& message, const wxString& caption,
- int n, const wxString *choices,
- int nsel, int * selection,
- wxWindow *parent , int x , int y, bool centre,
- int width, int height)
-{
- return -1;
-}
-*/