]>
Commit | Line | Data |
---|---|---|
76bdc1d2 KO |
1 | \section{\class{wxStdDialogButtonSizer}}\label{wxstddialogbuttonsizer} |
2 | ||
dceb1c09 JS |
3 | This class creates button layouts which conform to the standard button spacing and ordering defined by the platform |
4 | or toolkit's user interface guidelines (if such things exist). By using this class, you can ensure that all your | |
5 | standard dialogs look correct on all major platforms. Currently it conforms to the Windows, GTK+ and Mac OS X | |
6 | human interface guidelines. | |
76bdc1d2 | 7 | |
dceb1c09 JS |
8 | When there aren't interface guidelines defined for a particular platform or toolkit, wxStdDialogButtonSizer reverts |
9 | to the Windows implementation. | |
76bdc1d2 | 10 | |
dceb1c09 | 11 | To use this class, first add buttons to the sizer by calling AddButton (or SetAffirmativeButton, SetNegativeButton, |
718903fe | 12 | or SetCancelButton) and then call Realize in order to create the actual button layout used. Other than these special |
dceb1c09 | 13 | operations, this sizer works like any other sizer. |
76bdc1d2 | 14 | |
dceb1c09 JS |
15 | If you add a button with wxID\_SAVE, on Mac OS X the button will be renamed to "Save" and |
16 | the wxID\_NO button will be renamed to "Don't Save" in accordance with the Mac OS X Human Interface Guidelines. | |
76bdc1d2 KO |
17 | |
18 | \wxheading{Derived from} | |
19 | ||
20 | \helpref{wxBoxSizer}{wxboxsizer}\\ | |
21 | \helpref{wxSizer}{wxsizer}\\ | |
22 | \helpref{wxObject}{wxobject} | |
23 | ||
24 | \wxheading{Include files} | |
25 | ||
26 | <wx/sizer.h> | |
27 | ||
a7af285d VZ |
28 | \wxheading{Library} |
29 | ||
30 | \helpref{wxCore}{librarieslist} | |
31 | ||
76bdc1d2 KO |
32 | \wxheading{See also} |
33 | ||
67edd0c7 JS |
34 | \helpref{wxSizer}{wxsizer}, \helpref{Sizer overview}{sizeroverview}, \helpref{wxDialog::CreateButtonSizer}{wxdialogcreatebuttonsizer} |
35 | ||
809e21b5 FM |
36 | |
37 | \latexignore{\rtfignore{\wxheading{Members}}} | |
38 | ||
67edd0c7 | 39 | \membersection{wxStdDialogButtonSizer::wxStdDialogButtonSizer}\label{wxstddialogbuttonsizerctor} |
76bdc1d2 KO |
40 | |
41 | \func{}{wxStdDialogButtonSizer}{\void} | |
42 | ||
43 | Constructor for a wxStdDialogButtonSizer. | |
44 | ||
45 | \membersection{wxStdDialogButtonSizer::AddButton}\label{wxstddialogbuttonsizeraddbutton} | |
46 | ||
47 | \func{void}{AddButton}{\param{wxButton* }{button}} | |
48 | ||
dceb1c09 | 49 | Adds a button to the wxStdDialogButtonSizer. The button must have one of the following identifiers: |
76bdc1d2 | 50 | |
67edd0c7 | 51 | \begin{itemize}\itemsep=0pt |
dceb1c09 JS |
52 | \item wxID\_OK |
53 | \item wxID\_YES | |
54 | \item wxID\_SAVE | |
55 | \item wxID\_APPLY | |
57d7f988 | 56 | \item wxID\_CLOSE |
dceb1c09 JS |
57 | \item wxID\_NO |
58 | \item wxID\_CANCEL | |
59 | \item wxID\_HELP | |
60 | \item wxID\_CONTEXT\_HELP | |
76bdc1d2 KO |
61 | \end{itemize} |
62 | ||
718903fe | 63 | \membersection{wxStdDialogButtonSizer::Realize}\label{wxstddialogbuttonsizerrealize} |
76bdc1d2 | 64 | |
718903fe | 65 | \func{void}{Realize}{\void} |
76bdc1d2 KO |
66 | |
67 | Rearranges the buttons and applies proper spacing between buttons to make them match the platform or toolkit's interface guidelines. | |
68 | ||
69 | \membersection{wxStdDialogButtonSizer::SetAffirmativeButton}\label{wxstddialogbuttonsizersetaffirmativebutton} | |
70 | ||
71 | \func{void}{SetAffirmativeButton}{\param{wxButton* }{button}} | |
72 | ||
dceb1c09 | 73 | Sets the affirmative button for the sizer. This allows you to use identifiers other than the standard identifiers outlined above. |
76bdc1d2 KO |
74 | |
75 | \membersection{wxStdDialogButtonSizer::SetCancelButton}\label{wxstddialogbuttonsizersetcancelbutton} | |
76 | ||
77 | \func{void}{SetCancelButton}{\param{wxButton* }{button}} | |
78 | ||
dceb1c09 | 79 | Sets the cancel button for the sizer. This allows you to use identifiers other than the standard identifiers outlined above. |
76bdc1d2 KO |
80 | |
81 | \membersection{wxStdDialogButtonSizer::SetNegativeButton}\label{wxstddialogbuttonsizersetnegativebutton} | |
82 | ||
83 | \func{void}{SetNegativeButton}{\param{wxButton* }{button}} | |
84 | ||
dceb1c09 JS |
85 | Sets the negative button for the sizer. This allows you to use identifiers other than the standard identifiers outlined above. |
86 |