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