]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/auinotebook.tex
Clarified context menu event behaviour.
[wxWidgets.git] / docs / latex / wx / auinotebook.tex
1 %
2 % automatically generated by HelpGen $Revision$ from
3 % auibook.h at 11/Nov/06 22:56:01
4 %
5
6 \section{\class{wxAuiNotebook}}\label{wxauinotebook}
7
8 wxAuiNotebook is part of the wxAUI class framework.
9 See also \helpref{wxAUI overview}{wxauioverview}.
10
11 wxAuiNotebook is a notebook control which implements many features common in applications with dockable panes.
12 Specifically, wxAuiNotebook implements functionality which allows the user to rearrange tab order via drag-and-drop,
13 split the tab window into many different splitter configurations, and toggle through different themes to customize
14 the control's look and feel.
15
16 An effort has been made to try to maintain an API as similar to that of wxNotebook.
17
18 The default theme that is used is wxAuiDefaultTabArt, which provides a modern, glossy look and feel.
19 The theme can be changed by calling \helpref{wxAuiNotebook::SetArtProvider}{wxauinotebooksetartprovider}.
20
21 \wxheading{Derived from}
22
23 \helpref{wxControl}{wxcontrol}\\
24 \helpref{wxWindow}{wxwindow}\\
25 \helpref{wxEvtHandler}{wxevthandler}\\
26 \helpref{wxObject}{wxobject}
27
28 \wxheading{Include files}
29
30 <wx/aui/auibook.h>
31
32 \wxheading{Library}
33
34 \helpref{wxAui}{librarieslist}
35
36
37 \wxheading{Window styles}
38
39 \twocolwidtha{5cm}%
40 \begin{twocollist}\itemsep=0pt
41 \twocolitem{\windowstyle{wxAUI\_NB\_DEFAULT\_STYLE}}{Defined as wxAUI\_NB\_TOP | wxAUI\_NB\_TAB\_SPLIT | wxAUI\_NB\_TAB\_MOVE | wxAUI\_NB\_SCROLL\_BUTTONS | wxAUI\_NB\_CLOSE\_ON\_ACTIVE\_TAB.}
42 \twocolitem{\windowstyle{wxAUI\_NB\_TAB\_SPLIT}}{Allows the tab control to be split by dragging a tab.}
43 \twocolitem{\windowstyle{wxAUI\_NB\_TAB\_MOVE}}{Allows a tab to be moved horizontally by dragging.}
44 \twocolitem{\windowstyle{wxAUI\_NB\_TAB\_EXTERNAL\_MOVE}}{Allows a tab to be moved to another tab control.}
45 \twocolitem{\windowstyle{wxAUI\_NB\_TAB\_FIXED\_WIDTH}}{With this style, all tabs have the same width.}
46 \twocolitem{\windowstyle{wxAUI\_NB\_SCROLL\_BUTTONS}}{With this style, left and right scroll buttons are displayed.}
47 \twocolitem{\windowstyle{wxAUI\_NB\_WINDOWLIST\_BUTTON}}{With this style, a drop-down list of windows is available.}
48 \twocolitem{\windowstyle{wxAUI\_NB\_CLOSE\_BUTTON}}{With this style, a close button is available on the tab bar.}
49 \twocolitem{\windowstyle{wxAUI\_NB\_CLOSE\_ON\_ACTIVE\_TAB}}{With this style, the close button is visible on the active tab.}
50 \twocolitem{\windowstyle{wxAUI\_NB\_CLOSE\_ON\_ALL\_TABS}}{With this style, the close button is visible on all tabs.}
51 \twocolitem{\windowstyle{wxAUI\_NB\_TOP}}{With this style, tabs are drawn along the top of the notebook.}
52 \twocolitem{\windowstyle{wxAUI\_NB\_BOTTOM}}{With this style, tabs are drawn along the bottom of the notebook.}
53 \end{twocollist}
54
55
56 \wxheading{Data structures}
57
58 \latexignore{\rtfignore{\wxheading{Members}}}
59
60 \membersection{wxAuiNotebook::wxAuiNotebook}\label{wxauinotebookwxauinotebook}
61
62 \func{}{wxAuiNotebook}{\void}
63
64 \func{}{wxAuiNotebook}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxAUI\_NB\_DEFAULT\_STYLE}}
65
66 Constructor. Creates a wxAuiNotebok control.
67
68 \membersection{wxAuiNotebook::AddPage}\label{wxauinotebookaddpage}
69
70 \func{bool}{AddPage}{\param{wxWindow* }{page}, \param{const wxString\& }{caption}, \param{bool }{select = false}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}
71
72 Adds a page. If the {\it select} parameter is true, calling this will generate a page change event.
73
74 \membersection{wxAuiNotebook::AdvanceSelection}\label{wxauinotebookadvanceselection}
75
76 \func{void}{AdvanceSelection}{\param{bool }{forward = true}}
77
78 Sets the selection to the next or previous page.
79
80 \membersection{wxAuiNotebook::Create}\label{wxauinotebookcreate}
81
82 \func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}}
83
84 Creates the notebook window.
85
86 \membersection{wxAuiNotebook::DeletePage}\label{wxauinotebookdeletepage}
87
88 \func{bool}{DeletePage}{\param{size\_t }{page}}
89
90 Deletes a page at the given index. Calling this method will generate a page change event.
91
92 \membersection{wxAuiNotebook::GetArtProvider}\label{wxauinotebookgetartprovider}
93
94 \constfunc{wxAuiTabArt*}{GetArtProvider}{\void}
95
96 Returns the associated art provider.
97
98 \membersection{wxAuiNotebook::GetHeightForPageHeight}\label{wxauinotebookgetheightforpageheight}
99
100 \func{int}{GetHeightForPageHeight}{\param{int }{pageHeight}}
101
102 Returns the desired height of the notebook for the given page height. Use this to fit the notebook to
103 a given page size.
104
105 \membersection{wxAuiNotebook::GetPage}\label{wxauinotebookgetpage}
106
107 \constfunc{wxWindow*}{GetPage}{\param{size\_t }{page\_idx}}
108
109 Returns the page specified by the given index.
110
111 \membersection{wxAuiNotebook::GetPageBitmap}\label{wxauinotebookgetpagebitmap}
112
113 \constfunc{wxBitmap}{GetPageBitmap}{\param{size\_t }{page}}
114
115 Returns the tab bitmap for the page.
116
117 \membersection{wxAuiNotebook::GetPageCount}\label{wxauinotebookgetpagecount}
118
119 \constfunc{size\_t}{GetPageCount}{\void}
120
121 Returns the number of pages in the notebook.
122
123 \membersection{wxAuiNotebook::GetPageIndex}\label{wxauinotebookgetpageindex}
124
125 \constfunc{int}{GetPageIndex}{\param{wxWindow* }{page\_wnd}}
126
127 Returns the page index for the specified window. If the window is not found in
128 the notebook, wxNOT\_FOUND is returned.
129
130 \membersection{wxAuiNotebook::GetPageText}\label{wxauinotebookgetpagetext}
131
132 \constfunc{wxString}{GetPageText}{\param{size\_t }{page}}
133
134 Returns the tab label for the page.
135
136 \membersection{wxAuiNotebook::GetTabCtrlHeight}\label{wxauinotebookgettabctrlheight}
137
138 \constfunc{int}{GetTabCtrlHeight}{\void}
139
140 Returns the height of the tab control.
141
142 \membersection{wxAuiNotebook::GetSelection}\label{wxauinotebookgetselection}
143
144 \constfunc{int}{GetSelection}{\void}
145
146 Returns the currently selected page.
147
148 \membersection{wxAuiNotebook::InsertPage}\label{wxauinotebookinsertpage}
149
150 \func{bool}{InsertPage}{\param{size\_t }{page\_idx}, \param{wxWindow* }{page}, \param{const wxString\& }{caption}, \param{bool }{select = false}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}
151
152 InsertPage() is similar to AddPage, but allows the ability to specify the insert location.
153 If the {\it select} parameter is true, calling this will generate a page change event.
154
155 \membersection{wxAuiNotebook::RemovePage}\label{wxauinotebookremovepage}
156
157 \func{bool}{RemovePage}{\param{size\_t }{page}}
158
159 Removes a page, without deleting the window pointer.
160
161 \membersection{wxAuiNotebook::SetArtProvider}\label{wxauinotebooksetartprovider}
162
163 \func{void}{SetArtProvider}{\param{wxAuiTabArt* }{art}}
164
165 Sets the art provider to be used by the notebook.
166
167 \membersection{wxAuiNotebook::SetFont}\label{wxauinotebooksetfont}
168
169 \func{bool}{SetFont}{\param{const wxFont\& }{font}}
170
171 Sets the font for drawing the tab labels, using a bold version of the font for selected tab labels.
172
173 \membersection{wxAuiNotebook::SetNormalFont}\label{wxauinotebooksetnormalfont}
174
175 \func{void}{SetNormalFont}{\param{const wxFont\& }{font}}
176
177 Sets the font for drawing unselected tab labels.
178
179 \membersection{wxAuiNotebook::SetSelectedFont}\label{wxauinotebooksetselectedfont}
180
181 \func{void}{SetSelectedFont}{\param{const wxFont\& }{font}}
182
183 Sets the font for drawing selected tab labels.
184
185 \membersection{wxAuiNotebook::SetMeasuringFont}\label{wxauinotebooksetmeasuringfont}
186
187 \func{void}{SetMeasuringFont}{\param{const wxFont\& }{font}}
188
189 Sets the font for measuring tab labels.
190
191 \membersection{wxAuiNotebook::SetPageBitmap}\label{wxauinotebooksetpagebitmap}
192
193 \func{bool}{SetPageBitmap}{\param{size\_t }{page}, \param{const wxBitmap\& }{bitmap}}
194
195 Sets the bitmap for the page. To remove a bitmap from the tab caption, pass
196 wxNullBitmap.
197
198 \membersection{wxAuiNotebook::SetPageText}\label{wxauinotebooksetpagetext}
199
200 \func{bool}{SetPageText}{\param{size\_t }{page}, \param{const wxString\& }{text}}
201
202 Sets the tab label for the page.
203
204 \membersection{wxAuiNotebook::SetSelection}\label{wxauinotebooksetselection}
205
206 \func{size\_t}{SetSelection}{\param{size\_t }{new\_page}}
207
208 Sets the page selection. Calling this method will generate a page change event.
209
210 \membersection{wxAuiNotebook::SetTabCtrlHeight}\label{wxauinotebooksettabctrlheight}
211
212 \func{void}{SetTabCtrlHeight}{\param{int }{height}}
213
214 Sets the tab height. By default, the tab control height is calculated
215 by measuring the text height and bitmap sizes on the tab captions. Calling this
216 method will override that calculation and set the tab control to the specified
217 height parameter. A call to this method will override any call to SetUniformBitmapSize().
218 Specifying -1 as the height will return the control to its default auto-sizing behaviour.
219
220 \membersection{wxAuiNotebook::SetUniformBitmapSize}\label{wxauinotebooksetuniformbitmapsize}
221
222 \func{void}{SetUniformBitmapSize}{\param{const wxSize\& }{size}}
223
224 SetUniformBitmapSize() ensures that all tabs will have the same height, even
225 if some tabs don't have bitmaps. Passing wxDefaultSize to this function will
226 instruct the control to use dynamic tab height, which is the default behaviour.
227 Under the default behaviour, when a tab with a large bitmap is added, the tab control's
228 height will automatically increase to accommodate the larger bitmap.
229
230 \func{void}{Split}{\param{size\_t }{page}, \param{int }{direction}}
231
232 Split performs a split operation programmatically. The argument \arg{page} indicates
233 the page that will be split off. This page will also become the active page after the
234 split. The \arg{direction} argument specifies where the pane should go, it should be one
235 of the following: wxTOP, wxBOTTOM, wxLEFT, or wxRIGHT.
236
237 \membersection{wxAuiNotebook::ShowWindowMenu}\label{wxauinotebookshowwindowmenu}
238
239 \func{bool}{ShowWindowMenu}{\void}
240
241 Shows the window menu for the active tab control associated with this notebook,
242 and returns \true if a selection was made.
243