]>
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 | |
b88d16d3 BW |
29 | |
30 | \wxheading{Window styles} | |
31 | ||
32 | \twocolwidtha{5cm}% | |
33 | \begin{twocollist}\itemsep=0pt | |
34 | \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 | |
35 | .} | |
36 | \twocolitem{\windowstyle{wxAUI\_NB\_TAB\_SPLIT}}{Allows the tab control to be split by dragging a tab.} | |
37 | \twocolitem{\windowstyle{wxAUI\_NB\_TAB\_MOVE}}{Allows a tab to be moved horizontally by dragging.} | |
38 | \twocolitem{\windowstyle{wxAUI\_NB\_TAB\_EXTERNAL\_MOVE}}{Allows a tab to be moved to another tab control.} | |
39 | \twocolitem{\windowstyle{wxAUI\_NB\_TAB\_FIXED\_WIDTH}}{With this style, all tabs have the same width.} | |
40 | \twocolitem{\windowstyle{wxAUI\_NB\_SCROLL\_BUTTONS}}{With this style, left and right scroll buttons are displayed.} | |
41 | \twocolitem{\windowstyle{wxAUI\_NB\_WINDOWLIST\_BUTTON}}{With this style, a drop-down list of windows is available.} | |
42 | \twocolitem{\windowstyle{wxAUI\_NB\_CLOSE\_BUTTON}}{With this style, a close button is available on the tab bar.} | |
43 | \twocolitem{\windowstyle{wxAUI\_NB\_CLOSE\_ON\_ACTIVE\_TAB}}{With this style, the close button is visible on the active tab.} | |
44 | \twocolitem{\windowstyle{wxAUI\_NB\_CLOSE\_ON\_ALL\_TABS}}{With this style, the close button is visible on all tabs.} | |
45 | \end{twocollist} | |
46 | ||
47 | ||
c0d9896a BW |
48 | \wxheading{Data structures} |
49 | ||
50 | \latexignore{\rtfignore{\wxheading{Members}}} | |
51 | ||
c0d9896a BW |
52 | \membersection{wxAuiNotebook::wxAuiNotebook}\label{wxauinotebookwxauinotebook} |
53 | ||
54 | \func{}{wxAuiNotebook}{\void} | |
55 | ||
c0d9896a BW |
56 | \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}} |
57 | ||
8ffbb0f8 | 58 | Constructor. Creates a wxAuiNotebok control. |
c0d9896a BW |
59 | |
60 | \membersection{wxAuiNotebook::AddPage}\label{wxauinotebookaddpage} | |
61 | ||
62 | \func{bool}{AddPage}{\param{wxWindow* }{page}, \param{const wxString\& }{caption}, \param{bool }{select = false}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}} | |
63 | ||
683b60e9 | 64 | Adds a page. If the {\it select} parameter is true, calling this will generate a page change event. |
c0d9896a | 65 | |
c0d9896a BW |
66 | \membersection{wxAuiNotebook::Create}\label{wxauinotebookcreate} |
67 | ||
68 | \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}} | |
69 | ||
8ffbb0f8 | 70 | Creates the notebook window. |
c0d9896a BW |
71 | |
72 | \membersection{wxAuiNotebook::DeletePage}\label{wxauinotebookdeletepage} | |
73 | ||
74 | \func{bool}{DeletePage}{\param{size\_t }{page}} | |
75 | ||
683b60e9 | 76 | Deletes a page at the given index. Calling this method will generate a page change event. |
c0d9896a BW |
77 | |
78 | \membersection{wxAuiNotebook::GetArtProvider}\label{wxauinotebookgetartprovider} | |
79 | ||
80 | \constfunc{wxAuiTabArt*}{GetArtProvider}{\void} | |
81 | ||
8ffbb0f8 | 82 | Returns the associated art provider. |
c0d9896a BW |
83 | |
84 | \membersection{wxAuiNotebook::GetPage}\label{wxauinotebookgetpage} | |
85 | ||
86 | \constfunc{wxWindow*}{GetPage}{\param{size\_t }{page\_idx}} | |
87 | ||
8ffbb0f8 | 88 | Returns the page specified by the given index. |
c0d9896a | 89 | |
c3e016e4 JS |
90 | \membersection{wxAuiNotebook::GetPageBitmap}\label{wxauinotebookgetpagebitmap} |
91 | ||
92 | \constfunc{wxBitmap}{GetPageBitmap}{\param{size\_t }{page}} | |
93 | ||
94 | Returns the tab bitmap for the page. | |
95 | ||
c0d9896a BW |
96 | \membersection{wxAuiNotebook::GetPageCount}\label{wxauinotebookgetpagecount} |
97 | ||
98 | \constfunc{size\_t}{GetPageCount}{\void} | |
99 | ||
b88d16d3 | 100 | Returns the number of pages in the notebook. |
c0d9896a BW |
101 | |
102 | \membersection{wxAuiNotebook::GetPageIndex}\label{wxauinotebookgetpageindex} | |
103 | ||
104 | \constfunc{int}{GetPageIndex}{\param{wxWindow* }{page\_wnd}} | |
105 | ||
f83d50d2 | 106 | Returns the page index for the specified window. If the window is not found in the notebook, wxNOT_FOUND is returned. |
c0d9896a | 107 | |
c3e016e4 JS |
108 | \membersection{wxAuiNotebook::GetPageText}\label{wxauinotebookgetpagetext} |
109 | ||
110 | \constfunc{wxString}{GetPageText}{\param{size\_t }{page}} | |
111 | ||
112 | Returns the tab label for the page. | |
113 | ||
c0d9896a BW |
114 | \membersection{wxAuiNotebook::GetSelection}\label{wxauinotebookgetselection} |
115 | ||
116 | \constfunc{int}{GetSelection}{\void} | |
117 | ||
8ffbb0f8 | 118 | Returns the currently selected page. |
c0d9896a BW |
119 | |
120 | \membersection{wxAuiNotebook::InsertPage}\label{wxauinotebookinsertpage} | |
121 | ||
122 | \func{bool}{InsertPage}{\param{size\_t }{page\_idx}, \param{wxWindow* }{page}, \param{const wxString\& }{caption}, \param{bool }{select = false}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}} | |
123 | ||
b88d16d3 BW |
124 | InsertPage() is similar to AddPage, but allows the ability to specify the insert location. |
125 | If the {\it select} parameter is true, calling this will generate a page change event. | |
c0d9896a | 126 | |
c0d9896a BW |
127 | \membersection{wxAuiNotebook::RemovePage}\label{wxauinotebookremovepage} |
128 | ||
129 | \func{bool}{RemovePage}{\param{size\_t }{page}} | |
130 | ||
683b60e9 | 131 | Removes a page, without deleting the window pointer. |
c0d9896a BW |
132 | |
133 | \membersection{wxAuiNotebook::SetArtProvider}\label{wxauinotebooksetartprovider} | |
134 | ||
135 | \func{void}{SetArtProvider}{\param{wxAuiTabArt* }{art}} | |
136 | ||
8ffbb0f8 | 137 | Sets the art provider to be used by the notebook. |
c0d9896a BW |
138 | |
139 | \membersection{wxAuiNotebook::SetPageBitmap}\label{wxauinotebooksetpagebitmap} | |
140 | ||
141 | \func{bool}{SetPageBitmap}{\param{size\_t }{page}, \param{const wxBitmap\& }{bitmap}} | |
142 | ||
b88d16d3 BW |
143 | Sets the bitmap for the page. To remove a bitmap from the tab caption, pass |
144 | wxNullBitmap. | |
c0d9896a BW |
145 | |
146 | \membersection{wxAuiNotebook::SetPageText}\label{wxauinotebooksetpagetext} | |
147 | ||
148 | \func{bool}{SetPageText}{\param{size\_t }{page}, \param{const wxString\& }{text}} | |
149 | ||
683b60e9 | 150 | Sets the tab label for the page. |
c0d9896a BW |
151 | |
152 | \membersection{wxAuiNotebook::SetSelection}\label{wxauinotebooksetselection} | |
153 | ||
154 | \func{size\_t}{SetSelection}{\param{size\_t }{new\_page}} | |
155 | ||
683b60e9 | 156 | Sets the page selection. Calling this method will generate a page change event. |
c0d9896a BW |
157 | |
158 | \membersection{wxAuiNotebook::SetTabCtrlHeight}\label{wxauinotebooksettabctrlheight} | |
159 | ||
160 | \func{void}{SetTabCtrlHeight}{\param{int }{height}} | |
161 | ||
b88d16d3 BW |
162 | Sets the tab height. By default, the tab control height is calculated |
163 | by measuring the text height and bitmap sizes on the tab captions. Calling this | |
164 | method will override that calculation and set the tab control to the specified | |
165 | height parameter. A call to this method will override any call to SetUniformBitmapSize(). | |
166 | Specifying -1 as the height will return the control to its default auto-sizing behaviour. | |
167 | ||
168 | \membersection{wxAuiNotebook::SetUniformBitmapSize}\label{wxauinotebooksetuniformbitmapsize} | |
169 | ||
170 | \func{void}{SetUniformBitmapSize}{\param{const wxSize\& }{size}} | |
c0d9896a | 171 | |
b88d16d3 BW |
172 | SetUniformBitmapSize() ensures that all tabs will have the same height, even |
173 | if some tabs don't have bitmaps. Passing wxDefaultSize to this function will | |
174 | instruct the control to use dynamic tab height, which is the default behaviour. | |
175 | Under the default behaviour, when a tab with a large bitmap is added, the tab control's | |
176 | height will automatically increase to accommodate the larger bitmap. | |
2e56b9d7 | 177 |