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