]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/propdlg.tex
docstring fix
[wxWidgets.git] / docs / latex / wx / propdlg.tex
1 \section{\class{wxPropertySheetDialog}}\label{wxpropertysheetdialog}
2
3 This class represents a property sheet dialog: a tabbed dialog
4 for showing settings. It is optimized to show with flat tabs
5 on PocketPC devices.
6
7 To use this class, call \helpref{wxPropertySheetDialog::Create}{wxpropertysheetdialogcreate} from your own
8 Create function. Then call \helpref{CreateButtons}{wxpropertysheetdialogcreatebuttons}, and create pages, adding them to the book control.
9 Finally call \helpref{LayoutDialog}{wxpropertysheetdialoglayoutdialog}.
10
11 For example:
12
13 \begin{verbatim}
14 bool MyPropertySheetDialog::Create(...)
15 {
16 if (!wxPropertySheetDialog::Create(...))
17 return false;
18
19 CreateButtons(wxOK|wxCANCEL|wxHELP);
20
21 // Add page
22 wxPanel* panel = new wxPanel(GetBookCtrl(), ...);
23 GetBookCtrl()->AddPage(panel, wxT("General"));
24
25 LayoutDialog();
26 return true;
27 }
28 \end{verbatim}
29
30 If necessary, override CreateBookCtrl and AddBookCtrl to create and add a different
31 kind of book control. You would then need to use two-step construction for the dialog.
32
33 \wxheading{Derived from}
34
35 \helpref{wxDialog}{wxdialog}\\
36 \helpref{wxWindow}{wxwindow}\\
37 \helpref{wxEvtHandler}{wxevthandler}\\
38 \helpref{wxObject}{wxobject}
39
40 \wxheading{Include files}
41
42 <wx/propdlg.h>
43 <wx/generic/propdlg.h>
44
45 \latexignore{\rtfignore{\wxheading{Members}}}
46
47 \membersection{wxPropertySheetDialog::wxPropertySheetDialog}\label{wxpropertysheetdialogctor}
48
49 \func{}{wxPropertySheetDialog}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
50 \param{const wxString\& }{title},\rtfsp
51 \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
52 \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
53 \param{long}{ style = wxDEFAULT\_DIALOG\_STYLE},\rtfsp
54 \param{const wxString\& }{name = ``dialogBox"}}
55
56 Constructor.
57
58 \membersection{wxPropertySheetDialog::AddBookCtrl}\label{wxpropertysheetdialogaddbookctrl}
59
60 \func{virtual void}{AddBookCtrl}{\param{wxSizer* }{sizer}}
61
62 Override this if you wish to add the book control in a way different from the
63 standard way (for example, using different spacing).
64
65 \membersection{wxPropertySheetDialog::Create}\label{wxpropertysheetdialogcreate}
66
67 \func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
68 \param{const wxString\& }{title},\rtfsp
69 \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
70 \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
71 \param{long}{ style = wxDEFAULT\_DIALOG\_STYLE},\rtfsp
72 \param{const wxString\& }{name = ``dialogBox"}}
73
74 Call this from your own Create function, before adding buttons and pages.
75
76 \membersection{wxPropertySheetDialog::CreateBookCtrl}\label{wxpropertysheetdialogcreatebookctrl}
77
78 \func{virtual wxBookCtrlBase*}{CreateBookCtrl}{\void}
79
80 Override this if you wish to create a different kind of book control; by default, a wxNotebook
81 is created.
82
83 \membersection{wxPropertySheetDialog::CreateButtons}\label{wxpropertysheetdialogcreatebuttons}
84
85 \func{void}{CreateButtons}{\param{int }{flags=wxOK|wxCANCEL}}
86
87 Call this to create the buttons for the dialog. This calls \helpref{wxDialog::CreateButtonSizer}{wxdialogcreatebuttonsizer}, and
88 the flags are the same. On PocketPC, no buttons are created.
89
90 \membersection{wxPropertySheetDialog::GetBookCtrl}\label{wxpropertysheetdialoggetbookctrl}
91
92 \constfunc{wxBookCtrlBase*}{GetBookCtrl}{\void}
93
94 Returns the book control that will contain your settings pages.
95
96 \membersection{wxPropertySheetDialog::GetInnerSizer}\label{wxpropertysheetdialoggetinnersizer}
97
98 \constfunc{wxSizer*}{GetInnerSizer}{\void}
99
100 Returns the inner sizer that contains the book control and button sizer.
101
102 \membersection{wxPropertySheetDialog::LayoutDialog}\label{wxpropertysheetdialoglayoutdialog}
103
104 \func{void}{LayoutDialog}{\void}
105
106 Call this to lay out the dialog. On PocketPC, this does nothing, since the dialog will be shown
107 full-screen, and the layout will be done when the dialog receives a size event.
108
109 \membersection{wxPropertySheetDialog::SetBookCtrl}\label{wxpropertysheetdialogsetbookctrl}
110
111 \func{void}{SetBookCtrl}{\param{wxBookCtrlBase* }{bookCtrl}}
112
113 Sets the book control used for the dialog. You will normally not need to use this.
114
115 \membersection{wxPropertySheetDialog::SetInnerSizer}\label{wxpropertysheetdialogsetinnersizer}
116
117 \func{void}{SetInnerSizer}{\param{wxSizer*}{ sizer}}
118
119 Sets the inner sizer that contains the book control and button sizer. You will normally not need to use this.
120