]>
Commit | Line | Data |
---|---|---|
a660d684 KB |
1 | \section{\class{wxSingleChoiceDialog}}\label{wxsinglechoicedialog} |
2 | ||
3 | This class represents a dialog that shows a list of strings, and allows | |
4 | the user to select one. Double-clicking on a list item is equivalent to single-clicking | |
5 | and then pressing OK. | |
6 | ||
7 | \wxheading{Derived from} | |
8 | ||
9 | \helpref{wxDialog}{wxdialog}\\ | |
10 | \helpref{wxWindow}{wxwindow}\\ | |
11 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
12 | \helpref{wxObject}{wxobject} | |
13 | ||
14 | \wxheading{See also} | |
15 | ||
16 | \helpref{wxSingleChoiceDialog overview}{wxsinglechoicedialogoverview} | |
17 | ||
18 | \latexignore{\rtfignore{\wxheading{Members}}} | |
19 | ||
20 | \membersection{wxSingleChoiceDialog::wxSingleChoiceDialog}\label{wxsinglechoicedialogconstr} | |
21 | ||
22 | \func{}{wxSingleChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp | |
eaaa6a06 | 23 | \param{const wxString\& }{caption}, \param{int }{n}, \param{const wxString* }{choices},\rtfsp |
a660d684 KB |
24 | \param{char**}{ clientData = NULL}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE},\rtfsp |
25 | \param{const wxPoint\& }{pos = wxDefaultPosition}} | |
26 | ||
27 | Constructor, taking an array of wxString choices and optional client data. | |
28 | ||
29 | \func{}{wxSingleChoiceDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message},\rtfsp | |
30 | \param{const wxString\& }{caption}, \param{const wxStringList\& }{choices},\rtfsp | |
31 | \param{char**}{ clientData = NULL}, \param{long }{style = wxOK \pipe wxCANCEL \pipe wxCENTRE},\rtfsp | |
32 | \param{const wxPoint\& }{pos = wxDefaultPosition}} | |
33 | ||
34 | Constructor, taking a string list and optional client data. | |
35 | ||
36 | \wxheading{Parameters} | |
37 | ||
38 | \docparam{parent}{Parent window.} | |
39 | ||
40 | \docparam{message}{Message to show on the dialog.} | |
41 | ||
42 | \docparam{caption}{The dialog caption.} | |
43 | ||
44 | \docparam{n}{The number of choices.} | |
45 | ||
46 | \docparam{choices}{An array of strings, or a string list, containing the choices.} | |
47 | ||
48 | \docparam{style}{A dialog style (bitlist) containing flags chosen from the following: | |
49 | ||
50 | \twocolwidtha{5cm} | |
51 | \begin{twocollist} | |
52 | \twocolitem{{\bf wxOK}}{Show an OK button.} | |
53 | \twocolitem{{\bf wxCANCEL}}{Show a Cancel button.} | |
54 | \twocolitem{{\bf wxCENTRE}}{Centre the message. Not Windows.} | |
55 | \end{twocollist} | |
56 | } | |
57 | ||
58 | \docparam{pos}{Dialog position. Not Windows.} | |
59 | ||
60 | \wxheading{Remarks} | |
61 | ||
62 | Use \helpref{wxSingleChoiceDialog::ShowModal}{wxsinglechoicedialogshowmodal} to show the dialog. | |
63 | ||
64 | ||
65 | \membersection{wxSingleChoiceDialog::\destruct{wxSingleChoiceDialog}} | |
66 | ||
67 | \func{}{\destruct{wxSingleChoiceDialog}}{\void} | |
68 | ||
69 | Destructor. | |
70 | ||
71 | \membersection{wxSingleChoiceDialog::GetSelection} | |
72 | ||
73 | \constfunc{int}{GetSelection}{\void} | |
74 | ||
75 | Returns the index of selected item. | |
76 | ||
77 | \membersection{wxSingleChoiceDialog::GetSelectionClientData} | |
78 | ||
79 | \constfunc{char*}{GetSelectionClientData}{\void} | |
80 | ||
81 | Returns the client data associated with the selection. | |
82 | ||
83 | \membersection{wxSingleChoiceDialog::GetStringSelection} | |
84 | ||
85 | \constfunc{wxString}{GetStringSelection}{\void} | |
86 | ||
87 | Returns the selected string. | |
88 | ||
89 | \membersection{wxSingleChoiceDialog::ShowModal}\label{wxsinglechoicedialogshowmodal} | |
90 | ||
91 | \func{int}{ShowModal}{\void} | |
92 | ||
93 | Shows the dialog, returning either wxID\_OK or wxID\_CANCEL. | |
94 |