X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3e02f5ed14d30d059c2f94a871f25a5a7ff8eee9..c52b96359b639cda516615f9433d3b20b35443b5:/docs/latex/wx/sngchdlg.tex?ds=inline diff --git a/docs/latex/wx/sngchdlg.tex b/docs/latex/wx/sngchdlg.tex index 62173d4505..3b0e3a5928 100644 --- a/docs/latex/wx/sngchdlg.tex +++ b/docs/latex/wx/sngchdlg.tex @@ -1,12 +1,13 @@ \section{\class{wxSingleChoiceDialog}}\label{wxsinglechoicedialog} -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 single-clicking -and then pressing OK. +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 +single-clicking and then pressing OK. \wxheading{Derived from} \helpref{wxDialog}{wxdialog}\\ +\helpref{wxTopLevelWindow}{wxtoplevelwindow}\\ \helpref{wxWindow}{wxwindow}\\ \helpref{wxEvtHandler}{wxevthandler}\\ \helpref{wxObject}{wxobject} @@ -17,25 +18,24 @@ and then pressing OK. \wxheading{See also} -\helpref{wxSingleChoiceDialog overview}{wxsinglechoicedialogoverview} +\helpref{wxSingleChoiceDialog overview}{wxsinglechoicedialogoverview}, +\helpref{wxMultiChoiceDialog}{wxmultichoicedialog} \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxSingleChoiceDialog::wxSingleChoiceDialog}\label{wxsinglechoicedialogconstr} +\membersection{wxSingleChoiceDialog::wxSingleChoiceDialog}\label{wxsinglechoicedialogctor} \func{}{wxSingleChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp \param{const wxString\& }{caption}, \param{int }{n}, \param{const wxString* }{choices},\rtfsp -\param{void**}{ clientData = NULL}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE},\rtfsp +\param{void**}{ clientData = NULL}, \param{long }{style = wxCHOICEDLG\_STYLE},\rtfsp \param{const wxPoint\& }{pos = wxDefaultPosition}} -Constructor, taking an array of wxString choices and optional client data. - \func{}{wxSingleChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp -\param{const wxString\& }{caption}, \param{const wxStringList\& }{choices},\rtfsp -\param{void**}{ clientData = NULL}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE},\rtfsp +\param{const wxString\& }{caption}, \param{const wxArrayString\& }{choices},\rtfsp +\param{void**}{ clientData = NULL}, \param{long }{style = wxCHOICEDLG\_STYLE},\rtfsp \param{const wxPoint\& }{pos = wxDefaultPosition}} -Constructor, taking a string list and optional client data. +Constructor, taking an array of wxString choices and optional client data. \wxheading{Parameters} @@ -49,7 +49,11 @@ Constructor, taking a string list and optional client data. \docparam{choices}{An array of strings, or a string list, containing the choices.} -\docparam{style}{A dialog style (bitlist) containing flags chosen from the following: +\docparam{clientData}{An array of client data to be associated with the items. +See \helpref{GetSelectionClientData}{wxsinglechoicedialoggetselectionclientdata}.} + +\docparam{style}{A dialog style (bitlist) containing flags chosen from standard +dialog styles and the following: \twocolwidtha{5cm} \begin{twocollist} @@ -57,6 +61,7 @@ Constructor, taking a string list and optional client data. \twocolitem{{\bf wxCANCEL}}{Show a Cancel button.} \twocolitem{{\bf wxCENTRE}}{Centre the message. Not Windows.} \end{twocollist} +The default value is equivalent to {\bf wxDEFAULT\_DIALOG\_STYLE \pipe wxRESIZE\_BORDER \pipe wxOK \pipe wxCANCEL \pipe wxCENTRE}. } \docparam{pos}{Dialog position. Not Windows.} @@ -65,35 +70,33 @@ Constructor, taking a string list and optional client data. Use \helpref{wxSingleChoiceDialog::ShowModal}{wxsinglechoicedialogshowmodal} to show the dialog. -\pythonnote{For Python the two parametes \tt{n} and \tt{choices} are collapsed -into a single parameter \tt{choices} which is expected to be a Python +\pythonnote{For Python the two parameters {\tt n} and {\tt choices} are collapsed +into a single parameter {\tt choices} which is expected to be a Python list of strings.} -\membersection{wxSingleChoiceDialog::\destruct{wxSingleChoiceDialog}} - -\func{}{\destruct{wxSingleChoiceDialog}}{\void} - -Destructor. +\perlnote{In wxPerl there is just an array reference in place of {\tt n} +and {\tt choices}, and the client data array, if present, must have the +same length as the choices array.} -\membersection{wxSingleChoiceDialog::GetSelection} +\membersection{wxSingleChoiceDialog::GetSelection}\label{wxsinglechoicedialoggetselection} \constfunc{int}{GetSelection}{\void} Returns the index of selected item. -\membersection{wxSingleChoiceDialog::GetSelectionClientData} +\membersection{wxSingleChoiceDialog::GetSelectionClientData}\label{wxsinglechoicedialoggetselectionclientdata} \constfunc{char*}{GetSelectionClientData}{\void} Returns the client data associated with the selection. -\membersection{wxSingleChoiceDialog::GetStringSelection} +\membersection{wxSingleChoiceDialog::GetStringSelection}\label{wxsinglechoicedialoggetstringselection} \constfunc{wxString}{GetStringSelection}{\void} Returns the selected string. -\membersection{wxSingleChoiceDialog::SetSelection} +\membersection{wxSingleChoiceDialog::SetSelection}\label{wxsinglechoicedialogsetselection} \constfunc{void}{SetSelection}{\param{int}{ selection}}