]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/propdlg.tex
Added missing include
[wxWidgets.git] / docs / latex / wx / propdlg.tex
CommitLineData
3c9287bb
JS
1\section{\class{wxPropertySheetDialog}}\label{wxpropertysheetdialog}
2
3This class represents a property sheet dialog: a tabbed dialog
4for showing settings. It is optimized to show with flat tabs
5on PocketPC devices.
6
7To use this class, call \helpref{wxPropertySheetDialog::Create}{wxpropertysheetdialogcreate} from your own
8Create function. Then call \helpref{CreateButtons}{wxpropertysheetdialogcreatebuttons}, and create pages, adding them to the book control.
9Finally call \helpref{LayoutDialog}{wxpropertysheetdialoglayoutdialog}.
10
11For example:
12
13\begin{verbatim}
14bool 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
30If necessary, override CreateBookCtrl and AddBookCtrl to create and add a different
31kind 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
56Constructor.
57
58\membersection{wxPropertySheetDialog::AddBookCtrl}\label{wxpropertysheetdialogaddbookctrl}
59
60\func{virtual void}{AddBookCtrl}{\param{wxSizer* }{sizer}}
61
62Override this if you wish to add the book control in a way different from the
63standard 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
74Call 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
80Override this if you wish to create a different kind of book control; by default, a wxNotebook
81is created.
82
83\membersection{wxPropertySheetDialog::CreateButtons}\label{wxpropertysheetdialogcreatebuttons}
84
85\func{void}{CreateButtons}{\param{int }{flags=wxOK|wxCANCEL}}
86
87Call this to create the buttons for the dialog. This calls \helpref{wxDialog::CreateButtonSizer}{wxdialogcreatebuttonsizer}, and
88the flags are the same. On PocketPC, no buttons are created.
89
90\membersection{wxPropertySheetDialog::GetBookCtrl}\label{wxpropertysheetdialoggetbookctrl}
91
92\constfunc{wxBookCtrlBase*}{GetBookCtrl}{\void}
93
94Returns the book control that will contain your settings pages.
95
96\membersection{wxPropertySheetDialog::GetInnerSizer}\label{wxpropertysheetdialoggetinnersizer}
97
98\constfunc{wxSizer*}{GetInnerSizer}{\void}
99
100Returns 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
106Call this to lay out the dialog. On PocketPC, this does nothing, since the dialog will be shown
107full-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
113Sets 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
119Sets the inner sizer that contains the book control and button sizer. You will normally not need to use this.
120