2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: choicdlg.h
|
2008-03-18 15:30:01 -04:00
|
|
|
// Purpose: interface of wx[Multi|Single]ChoiceDialog
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2012-03-03 19:29:07 -05:00
|
|
|
/**
|
|
|
|
Default width of the choice dialog.
|
|
|
|
*/
|
|
|
|
#define wxCHOICE_WIDTH 150
|
|
|
|
|
|
|
|
/**
|
|
|
|
Default height of the choice dialog.
|
|
|
|
*/
|
|
|
|
#define wxCHOICE_HEIGHT 200
|
|
|
|
|
|
|
|
/**
|
|
|
|
Default style of the choice dialog.
|
|
|
|
*/
|
|
|
|
#define wxCHOICEDLG_STYLE (wxDEFAULT_DIALOG_STYLE | wxOK | wxCANCEL | wxCENTRE | wxRESIZE_BORDER)
|
|
|
|
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxMultiChoiceDialog
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-05 05:12:23 -04:00
|
|
|
This class represents a dialog that shows a list of strings, and allows the
|
|
|
|
user to select one or more.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2012-04-01 06:26:37 -04:00
|
|
|
@beginStyleTable
|
|
|
|
@style{wxOK}
|
|
|
|
Show an OK button.
|
|
|
|
@style{wxCANCEL}
|
|
|
|
Show a Cancel button.
|
|
|
|
@style{wxCENTRE}
|
2017-03-24 22:22:17 -04:00
|
|
|
Centre the message.
|
2012-04-01 06:26:37 -04:00
|
|
|
@endStyleTable
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxbase}
|
|
|
|
@category{cmndlg}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-18 15:30:01 -04:00
|
|
|
@see @ref overview_cmndlg_multichoice, wxSingleChoiceDialog
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxMultiChoiceDialog : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
Constructor taking an array of wxString choices.
|
2008-03-18 15:30:01 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param parent
|
2008-03-09 08:33:59 -04:00
|
|
|
Parent window.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param message
|
2008-03-09 08:33:59 -04:00
|
|
|
Message to show on the dialog.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param caption
|
2008-03-09 08:33:59 -04:00
|
|
|
The dialog caption.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param n
|
2008-03-09 08:33:59 -04:00
|
|
|
The number of choices.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param choices
|
2008-03-09 08:33:59 -04:00
|
|
|
An array of strings, or a string list, containing the choices.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param style
|
2008-03-09 08:33:59 -04:00
|
|
|
A dialog style (bitlist) containing flags chosen from standard
|
2012-04-01 06:26:37 -04:00
|
|
|
dialog styles and the ones listed in the class documentation. The
|
|
|
|
default value is equivalent to wxDEFAULT_DIALOG_STYLE |
|
|
|
|
wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE.
|
2008-03-18 15:30:01 -04:00
|
|
|
@param pos
|
2017-03-24 22:22:17 -04:00
|
|
|
Dialog position.
|
2008-03-18 15:30:01 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@remarks Use ShowModal() to show the dialog.
|
2008-04-05 05:12:23 -04:00
|
|
|
|
2009-10-18 13:47:01 -04:00
|
|
|
@beginWxPerlOnly
|
|
|
|
Not supported by wxPerl.
|
|
|
|
@endWxPerlOnly
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxMultiChoiceDialog(wxWindow* parent, const wxString& message,
|
|
|
|
const wxString& caption,
|
2008-04-05 05:12:23 -04:00
|
|
|
int n, const wxString* choices,
|
2008-03-08 08:52:38 -05:00
|
|
|
long style = wxCHOICEDLG_STYLE,
|
|
|
|
const wxPoint& pos = wxDefaultPosition);
|
2008-08-30 08:44:43 -04:00
|
|
|
/**
|
|
|
|
Constructor taking an array of wxString choices.
|
|
|
|
|
|
|
|
@param parent
|
|
|
|
Parent window.
|
|
|
|
@param message
|
|
|
|
Message to show on the dialog.
|
|
|
|
@param caption
|
|
|
|
The dialog caption.
|
|
|
|
@param choices
|
|
|
|
An array of strings, or a string list, containing the choices.
|
|
|
|
@param style
|
|
|
|
A dialog style (bitlist) containing flags chosen from standard
|
2012-04-01 06:26:37 -04:00
|
|
|
dialog styles and the ones listed in the class documentation. The
|
|
|
|
default value is equivalent to wxDEFAULT_DIALOG_STYLE |
|
|
|
|
wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE.
|
2008-08-30 08:44:43 -04:00
|
|
|
@param pos
|
2017-03-24 22:22:17 -04:00
|
|
|
Dialog position.
|
2008-08-30 08:44:43 -04:00
|
|
|
|
|
|
|
@remarks Use ShowModal() to show the dialog.
|
|
|
|
|
2009-10-18 13:47:01 -04:00
|
|
|
@beginWxPerlOnly
|
|
|
|
Use an array reference for the @a choices parameter.
|
|
|
|
@endWxPerlOnly
|
2008-08-30 08:44:43 -04:00
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
wxMultiChoiceDialog(wxWindow* parent,
|
|
|
|
const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
const wxArrayString& choices,
|
|
|
|
long style = wxCHOICEDLG_STYLE,
|
|
|
|
const wxPoint& pos = wxDefaultPosition);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns array with indexes of selected items.
|
|
|
|
*/
|
2012-02-15 10:40:04 -05:00
|
|
|
wxArrayInt GetSelections() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets selected items from the array of selected items' indexes.
|
|
|
|
*/
|
2008-09-22 15:01:17 -04:00
|
|
|
void SetSelections(const wxArrayInt& selections);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Shows the dialog, returning either wxID_OK or wxID_CANCEL.
|
|
|
|
*/
|
|
|
|
int ShowModal();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxSingleChoiceDialog
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-05 05:12:23 -04:00
|
|
|
This class represents a dialog that shows a list of strings, and allows the
|
|
|
|
user to select one. Double-clicking on a list item is equivalent to
|
2008-03-08 08:52:38 -05:00
|
|
|
single-clicking and then pressing OK.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2012-04-01 06:26:37 -04:00
|
|
|
@beginStyleTable
|
|
|
|
@style{wxOK}
|
|
|
|
Show an OK button.
|
|
|
|
@style{wxCANCEL}
|
|
|
|
Show a Cancel button.
|
|
|
|
@style{wxCENTRE}
|
2017-03-24 22:22:17 -04:00
|
|
|
Centre the message.
|
2012-04-01 06:26:37 -04:00
|
|
|
@endStyleTable
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxbase}
|
|
|
|
@category{cmndlg}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-18 15:30:01 -04:00
|
|
|
@see @ref overview_cmndlg_singlechoice, wxMultiChoiceDialog
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxSingleChoiceDialog : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//@{
|
|
|
|
/**
|
2008-03-18 15:30:01 -04:00
|
|
|
Constructor, taking an array of wxString choices and optional client
|
|
|
|
data.
|
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param parent
|
2008-03-09 08:33:59 -04:00
|
|
|
Parent window.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param message
|
2008-03-09 08:33:59 -04:00
|
|
|
Message to show on the dialog.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param caption
|
2008-03-09 08:33:59 -04:00
|
|
|
The dialog caption.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param n
|
2008-03-09 08:33:59 -04:00
|
|
|
The number of choices.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param choices
|
2008-03-09 08:33:59 -04:00
|
|
|
An array of strings, or a string list, containing the choices.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param clientData
|
2008-04-05 05:12:23 -04:00
|
|
|
An array of client data to be associated with the items. See
|
2012-02-05 09:18:33 -05:00
|
|
|
GetSelectionData().
|
2008-03-08 09:43:31 -05:00
|
|
|
@param style
|
2008-03-09 08:33:59 -04:00
|
|
|
A dialog style (bitlist) containing flags chosen from standard
|
2012-04-01 06:26:37 -04:00
|
|
|
dialog styles and the ones listed in the class documentation. The
|
|
|
|
default value is equivalent to wxDEFAULT_DIALOG_STYLE |
|
|
|
|
wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE.
|
2008-03-18 15:30:01 -04:00
|
|
|
@param pos
|
2017-03-24 22:22:17 -04:00
|
|
|
Dialog position.
|
2008-03-18 15:30:01 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@remarks Use ShowModal() to show the dialog.
|
2008-04-05 05:12:23 -04:00
|
|
|
|
2009-10-18 13:47:01 -04:00
|
|
|
@beginWxPerlOnly
|
|
|
|
Not supported by wxPerl.
|
|
|
|
@endWxPerlOnly
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxSingleChoiceDialog(wxWindow* parent, const wxString& message,
|
|
|
|
const wxString& caption,
|
2008-04-05 05:12:23 -04:00
|
|
|
int n, const wxString* choices,
|
2008-03-09 08:33:59 -04:00
|
|
|
void** clientData = NULL,
|
2008-03-08 08:52:38 -05:00
|
|
|
long style = wxCHOICEDLG_STYLE,
|
|
|
|
const wxPoint& pos = wxDefaultPosition);
|
2008-08-30 08:44:43 -04:00
|
|
|
/**
|
|
|
|
Constructor, taking an array of wxString choices and optional client
|
|
|
|
data.
|
|
|
|
|
|
|
|
@param parent
|
|
|
|
Parent window.
|
|
|
|
@param message
|
|
|
|
Message to show on the dialog.
|
|
|
|
@param caption
|
|
|
|
The dialog caption.
|
|
|
|
@param choices
|
|
|
|
An array of strings, or a string list, containing the choices.
|
|
|
|
@param clientData
|
|
|
|
An array of client data to be associated with the items. See
|
2012-02-05 09:18:33 -05:00
|
|
|
GetSelectionData().
|
2008-08-30 08:44:43 -04:00
|
|
|
@param style
|
|
|
|
A dialog style (bitlist) containing flags chosen from standard
|
2012-04-01 06:26:37 -04:00
|
|
|
dialog styles and the ones listed in the class documentation. The
|
|
|
|
default value is equivalent to wxDEFAULT_DIALOG_STYLE |
|
|
|
|
wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE.
|
2008-08-30 08:44:43 -04:00
|
|
|
@param pos
|
2017-03-24 22:22:17 -04:00
|
|
|
Dialog position.
|
2008-08-30 08:44:43 -04:00
|
|
|
|
|
|
|
@remarks Use ShowModal() to show the dialog.
|
|
|
|
|
2009-10-18 13:47:01 -04:00
|
|
|
@beginWxPerlOnly
|
|
|
|
Use an array reference for the @a choices parameter.
|
|
|
|
@endWxPerlOnly
|
2008-08-30 08:44:43 -04:00
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
wxSingleChoiceDialog(wxWindow* parent,
|
|
|
|
const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
const wxArrayString& choices,
|
2008-03-09 08:33:59 -04:00
|
|
|
void** clientData = NULL,
|
2008-03-08 09:43:31 -05:00
|
|
|
long style = wxCHOICEDLG_STYLE,
|
|
|
|
const wxPoint& pos = wxDefaultPosition);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the index of selected item.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetSelection() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the client data associated with the selection.
|
2012-02-05 09:18:33 -05:00
|
|
|
|
|
|
|
@since 2.9.4
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2012-02-05 09:18:33 -05:00
|
|
|
void* GetSelectionData() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns the selected string.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxString GetStringSelection() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the index of the initially selected item.
|
|
|
|
*/
|
2008-09-22 15:01:17 -04:00
|
|
|
void SetSelection(int selection);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Shows the dialog, returning either wxID_OK or wxID_CANCEL.
|
|
|
|
*/
|
|
|
|
int ShowModal();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
// ============================================================================
|
|
|
|
// Global functions/macros
|
|
|
|
// ============================================================================
|
|
|
|
|
2009-01-05 15:48:06 -05:00
|
|
|
/** @addtogroup group_funcmacro_dialog */
|
2008-03-08 08:52:38 -05:00
|
|
|
//@{
|
2008-03-18 15:30:01 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
2008-03-18 15:30:01 -04:00
|
|
|
Same as wxGetSingleChoice() but returns the index representing the
|
|
|
|
selected string. If the user pressed cancel, -1 is returned.
|
|
|
|
|
|
|
|
@header{wx/choicdlg.h}
|
2009-10-18 13:47:01 -04:00
|
|
|
|
|
|
|
@beginWxPerlOnly
|
|
|
|
Use an array reference for the @a aChoices parameter.
|
|
|
|
@endWxPerlOnly
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
int wxGetSingleChoiceIndex(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
const wxArrayString& aChoices,
|
2008-03-09 08:33:59 -04:00
|
|
|
wxWindow* parent = NULL,
|
2012-03-03 19:29:07 -05:00
|
|
|
int x = wxDefaultCoord,
|
|
|
|
int y = wxDefaultCoord,
|
2008-03-09 08:33:59 -04:00
|
|
|
bool centre = true,
|
2012-03-03 19:29:07 -05:00
|
|
|
int width = wxCHOICE_WIDTH,
|
|
|
|
int height = wxCHOICE_HEIGHT,
|
2010-03-21 07:06:31 -04:00
|
|
|
int initialSelection = 0);
|
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
int wxGetSingleChoiceIndex(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
int n,
|
|
|
|
const wxString& choices[],
|
2008-03-09 08:33:59 -04:00
|
|
|
wxWindow* parent = NULL,
|
2012-03-03 19:29:07 -05:00
|
|
|
int x = wxDefaultCoord,
|
|
|
|
int y = wxDefaultCoord,
|
2008-03-09 08:33:59 -04:00
|
|
|
bool centre = true,
|
2012-03-03 19:29:07 -05:00
|
|
|
int width = wxCHOICE_WIDTH,
|
|
|
|
int height = wxCHOICE_HEIGHT,
|
2010-03-21 07:06:31 -04:00
|
|
|
int initialSelection = 0);
|
|
|
|
|
|
|
|
|
|
|
|
int wxGetSingleChoiceIndex(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
const wxArrayString& choices,
|
|
|
|
int initialSelection,
|
|
|
|
wxWindow *parent = NULL);
|
2008-03-18 15:30:01 -04:00
|
|
|
|
2010-03-21 07:06:31 -04:00
|
|
|
int wxGetSingleChoiceIndex(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
int n, const wxString *choices,
|
|
|
|
int initialSelection,
|
|
|
|
wxWindow *parent = NULL);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
2009-01-05 15:48:06 -05:00
|
|
|
/** @addtogroup group_funcmacro_dialog */
|
2008-03-08 08:52:38 -05:00
|
|
|
//@{
|
2008-03-18 15:30:01 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Pops up a dialog box containing a message, OK/Cancel buttons and a
|
2008-03-18 15:30:01 -04:00
|
|
|
single-selection listbox. The user may choose an item and press OK to
|
|
|
|
return a string or Cancel to return the empty string. Use
|
|
|
|
wxGetSingleChoiceIndex() if empty string is a valid choice and if you want
|
|
|
|
to be able to detect pressing Cancel reliably.
|
|
|
|
|
|
|
|
You may pass the list of strings to choose from either using @c choices
|
2008-03-09 08:33:59 -04:00
|
|
|
which is an array of @a n strings for the listbox or by using a single
|
2008-03-18 15:30:01 -04:00
|
|
|
@c aChoices parameter of type wxArrayString.
|
|
|
|
|
|
|
|
If @c centre is @true, the message text (which may include new line
|
2008-03-08 08:52:38 -05:00
|
|
|
characters) is centred; if @false, the message is left-justified.
|
2008-03-18 15:30:01 -04:00
|
|
|
|
|
|
|
@header{wx/choicdlg.h}
|
2009-10-18 13:47:01 -04:00
|
|
|
|
|
|
|
@beginWxPerlOnly
|
|
|
|
Use an array reference for the @a choices parameter.
|
|
|
|
@endWxPerlOnly
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxString wxGetSingleChoice(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
const wxArrayString& aChoices,
|
2008-03-09 08:33:59 -04:00
|
|
|
wxWindow* parent = NULL,
|
2012-03-03 19:29:07 -05:00
|
|
|
int x = wxDefaultCoord,
|
|
|
|
int y = wxDefaultCoord,
|
2008-03-09 08:33:59 -04:00
|
|
|
bool centre = true,
|
2012-03-03 19:29:07 -05:00
|
|
|
int width = wxCHOICE_WIDTH,
|
|
|
|
int height = wxCHOICE_HEIGHT,
|
2010-03-21 07:06:31 -04:00
|
|
|
int initialSelection = 0);
|
2008-03-08 09:43:31 -05:00
|
|
|
wxString wxGetSingleChoice(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
int n,
|
|
|
|
const wxString& choices[],
|
2008-03-09 08:33:59 -04:00
|
|
|
wxWindow* parent = NULL,
|
2012-03-03 19:29:07 -05:00
|
|
|
int x = wxDefaultCoord,
|
|
|
|
int y = wxDefaultCoord,
|
2008-03-09 08:33:59 -04:00
|
|
|
bool centre = true,
|
2012-03-03 19:29:07 -05:00
|
|
|
int width = wxCHOICE_WIDTH,
|
|
|
|
int height = wxCHOICE_HEIGHT,
|
2010-03-21 07:06:31 -04:00
|
|
|
int initialSelection = 0);
|
|
|
|
|
|
|
|
|
|
|
|
wxString wxGetSingleChoice(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
const wxArrayString& choices,
|
|
|
|
int initialSelection,
|
|
|
|
wxWindow *parent = NULL);
|
|
|
|
|
|
|
|
wxString wxGetSingleChoice(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
int n, const wxString *choices,
|
|
|
|
int initialSelection,
|
|
|
|
wxWindow *parent = NULL);
|
2008-03-18 15:30:01 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
2009-01-05 15:48:06 -05:00
|
|
|
/** @addtogroup group_funcmacro_dialog */
|
2008-03-08 08:52:38 -05:00
|
|
|
//@{
|
2008-03-18 15:30:01 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
2008-03-18 15:30:01 -04:00
|
|
|
Same as wxGetSingleChoice but takes an array of client data pointers
|
|
|
|
corresponding to the strings, and returns one of these pointers or @NULL
|
|
|
|
if Cancel was pressed. The @c client_data array must have the same number
|
|
|
|
of elements as @c choices or @c aChoices!
|
|
|
|
|
|
|
|
@header{wx/choicdlg.h}
|
2009-10-18 13:47:01 -04:00
|
|
|
|
|
|
|
@beginWxPerlOnly
|
|
|
|
Use an array reference for the @a aChoices and @a client_data parameters.
|
|
|
|
@endWxPerlOnly
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxString wxGetSingleChoiceData(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
const wxArrayString& aChoices,
|
|
|
|
const wxString& client_data[],
|
2008-03-09 08:33:59 -04:00
|
|
|
wxWindow* parent = NULL,
|
2012-03-03 19:29:07 -05:00
|
|
|
int x = wxDefaultCoord,
|
|
|
|
int y = wxDefaultCoord,
|
2008-03-09 08:33:59 -04:00
|
|
|
bool centre = true,
|
2012-03-03 19:29:07 -05:00
|
|
|
int width = wxCHOICE_WIDTH,
|
|
|
|
int height = wxCHOICE_HEIGHT,
|
2010-03-21 07:06:31 -04:00
|
|
|
int initialSelection = 0);
|
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
wxString wxGetSingleChoiceData(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
int n,
|
|
|
|
const wxString& choices[],
|
|
|
|
const wxString& client_data[],
|
2008-03-09 08:33:59 -04:00
|
|
|
wxWindow* parent = NULL,
|
2012-03-03 19:29:07 -05:00
|
|
|
int x = wxDefaultCoord,
|
|
|
|
int y = wxDefaultCoord,
|
2008-03-09 08:33:59 -04:00
|
|
|
bool centre = true,
|
2012-03-03 19:29:07 -05:00
|
|
|
int width = wxCHOICE_WIDTH,
|
|
|
|
int height = wxCHOICE_HEIGHT,
|
2010-03-21 07:06:31 -04:00
|
|
|
int initialSelection = 0);
|
|
|
|
|
|
|
|
void* wxGetSingleChoiceData(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
const wxArrayString& choices,
|
|
|
|
void **client_data,
|
|
|
|
int initialSelection,
|
|
|
|
wxWindow *parent = NULL);
|
|
|
|
|
|
|
|
void* wxGetSingleChoiceData(const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
int n, const wxString *choices,
|
|
|
|
void **client_data,
|
|
|
|
int initialSelection,
|
|
|
|
wxWindow *parent = NULL);
|
2008-03-18 15:30:01 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
2009-01-05 15:48:06 -05:00
|
|
|
/** @addtogroup group_funcmacro_dialog */
|
2008-03-08 08:52:38 -05:00
|
|
|
//@{
|
2008-03-18 15:30:01 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Pops up a dialog box containing a message, OK/Cancel buttons and a
|
|
|
|
multiple-selection listbox. The user may choose an arbitrary (including 0)
|
|
|
|
number of items in the listbox whose indices will be returned in
|
2008-03-18 15:30:01 -04:00
|
|
|
@c selections array. The initial contents of this array will be used to
|
2009-03-07 10:39:09 -05:00
|
|
|
select the items when the dialog is shown. If the user cancels the dialog,
|
|
|
|
the function returns -1 and @c selections array is left unchanged.
|
2008-03-18 15:30:01 -04:00
|
|
|
|
|
|
|
You may pass the list of strings to choose from either using @c choices
|
2008-03-09 08:33:59 -04:00
|
|
|
which is an array of @a n strings for the listbox or by using a single
|
2008-03-18 15:30:01 -04:00
|
|
|
@c aChoices parameter of type wxArrayString.
|
|
|
|
|
|
|
|
If @c centre is @true, the message text (which may include new line
|
2008-03-08 08:52:38 -05:00
|
|
|
characters) is centred; if @false, the message is left-justified.
|
2008-03-18 15:30:01 -04:00
|
|
|
|
|
|
|
@header{wx/choicdlg.h}
|
2009-10-18 13:47:01 -04:00
|
|
|
|
|
|
|
@beginWxPerlOnly
|
|
|
|
Use an array reference for the @a choices parameter.
|
|
|
|
In wxPerl there is no @a selections parameter; the function
|
|
|
|
returns an array containing the user selections.
|
|
|
|
@endWxPerlOnly
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2009-03-07 10:39:09 -05:00
|
|
|
int wxGetSelectedChoices(wxArrayInt& selections,
|
2008-03-08 08:52:38 -05:00
|
|
|
const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
const wxArrayString& aChoices,
|
2008-03-09 08:33:59 -04:00
|
|
|
wxWindow* parent = NULL,
|
2012-03-03 19:29:07 -05:00
|
|
|
int x = wxDefaultCoord,
|
|
|
|
int y = wxDefaultCoord,
|
2008-03-09 08:33:59 -04:00
|
|
|
bool centre = true,
|
2012-03-03 19:29:07 -05:00
|
|
|
int width = wxCHOICE_WIDTH,
|
|
|
|
int height = wxCHOICE_HEIGHT);
|
2010-03-21 07:06:31 -04:00
|
|
|
|
2009-03-07 10:39:09 -05:00
|
|
|
int wxGetSelectedChoices(wxArrayInt& selections,
|
2008-03-08 09:43:31 -05:00
|
|
|
const wxString& message,
|
|
|
|
const wxString& caption,
|
|
|
|
int n,
|
|
|
|
const wxString& choices[],
|
2008-03-09 08:33:59 -04:00
|
|
|
wxWindow* parent = NULL,
|
2012-03-03 19:29:07 -05:00
|
|
|
int x = wxDefaultCoord,
|
|
|
|
int y = wxDefaultCoord,
|
2008-03-09 08:33:59 -04:00
|
|
|
bool centre = true,
|
2012-03-03 19:29:07 -05:00
|
|
|
int width = wxCHOICE_WIDTH,
|
|
|
|
int height = wxCHOICE_HEIGHT);
|
2008-03-18 15:30:01 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|