~ubuntu-dev/wxwidgets2.6/upstream-debian

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
\section{\class{wxTabView}}\label{wxtabview}

Responsible for drawing tabs onto a window, and dealing with input.

Please note that the preferred class for programming tabbed windows is \helpref{wxNotebook}{wxnotebook}.
This class is retained for backward compatibility.

\wxheading{Derived from}

\helpref{wxObject}{wxobject}

\wxheading{Include files}

<wx/tab.h>

\wxheading{See also}

\helpref{wxTabView overview}{wxtabviewoverview}, \helpref{wxPanelTabView}{wxpaneltabview}

\latexignore{\rtfignore{\wxheading{Members}}}

\membersection{wxTabView::wxTabView}

\func{}{wxTabView}{\param{long }{style = wxTAB\_STYLE\_DRAW\_BOX \pipe wxTAB\_STYLE\_COLOUR\_INTERIOR}}

Constructor.

{\it style} may be a bit list of the following:

\begin{twocollist}\itemsep=0pt
\twocolitem{wxTAB\_STYLE\_DRAW\_BOX}{Draw a box around the view area. Most commonly used for dialogs.}
\twocolitem{wxTAB\_STYLE\_COLOUR\_INTERIOR}{Draw tab backgrounds in the specified colour. Omitting this style
will ensure that the tab background matches the dialog background.}
\end{twocollist}

\membersection{wxTabView::AddTab}\label{wxtabviewaddtab}

\func{wxTabControl *}{AddTab}{\param{int}{ id}, \param{const wxString\& }{label}, \param{wxTabControl *}{existingTab=NULL}}

Adds a tab to the view.

{\it id} is the application-chosen identifier for the tab, which will be used in subsequent tab operations.

{\it label} is the label to give the tab.

{\it existingTab} maybe NULL to specify a new tab, or non-NULL to indicate that an existing tab should be used.

A new layer (row) is started when the current layer has been filled up with tabs.

\membersection{wxTabView::CalculateTabWidth}\label{wxtabviewcalculatetabwidth}

\func{int}{CalculateTabWidth}{\param{int}{ noTabs}, \param{bool}{ adjustView = false}}

The application can specify the tab width using this function, in terms
of the number of tabs per layer (row) which will fit the view area, which
should have been set previously with SetViewRect.

{\it noTabs} is the number of tabs which should take up the full width
of the view area.

{\it adjustView} can be set to true in order to readjust the view width
to exactly fit the given number of tabs. 

The new tab width is returned.

\membersection{wxTabView::ClearTabs}

\func{void}{ClearTabs}{\param{bool }{deleteTabs=true}}

Clears the tabs, deleting them if {\it deleteTabs} is true.

\membersection{wxTabView::Draw}

\func{void}{Draw}{\param{wxDC\& }{dc}}

Draws the tabs and (optionally) a box around the view area.

\membersection{wxTabView::FindTabControlForId}

\func{wxTabControl *}{FindTabControlForId}{\param{int}{ id}}

Finds the wxTabControl corresponding to {\it id}.

\membersection{wxTabView::FindTabControlForPosition}

\func{wxTabControl *}{FindTabControlForPosition}{\param{int}{ layer}, \param{int}{ position}}

Finds the wxTabControl at layer {\it layer}, position in layer {\it position}, both starting from
zero. Note that tabs change layer as they are selected or deselected.

\membersection{wxTabView::GetBackgroundBrush}

\func{wxBrush *}{GetBackgroundBrush}{\void}

Returns the brush used to draw in the background colour. It is set when
SetBackgroundColour is called. 

\membersection{wxTabView::GetBackgroundColour}

\func{wxColour}{GetBackgroundColour}{\void}

Returns the colour used for each tab background. By default, this is
light grey. To ensure a match with the dialog or panel background, omit
the wxTAB\_STYLE\_COLOUR\_INTERIOR flag from the wxTabView constructor. 

\membersection{wxTabView::GetBackgroundPen}

\func{wxPen *}{GetBackgroundPen}{\void}

Returns the pen used to draw in the background colour. It is set when
SetBackgroundColour is called. 

\membersection{wxTabView::GetHighlightColour}

\func{wxColour}{GetHighlightColour}{\void}

Returns the colour used for bright highlights on the left side of `3D' surfaces. By default, this is white.

\membersection{wxTabView::GetHighlightPen}

\func{wxPen *}{GetHighlightPen}{\void}

Returns the pen used to draw 3D effect highlights. This is set when
SetHighlightColour is called. 

\membersection{wxTabView::GetHorizontalTabOffset}

\func{int}{GetHorizontalTabOffset}{\void}

Returns the horizontal spacing by which each tab layer is offset from the one below.

\membersection{wxTabView::GetNumberOfLayers}

\func{int}{GetNumberOfLayers}{\void}

Returns the number of layers (rows of tabs).

\membersection{wxTabView::GetSelectedTabFont}

\func{wxFont *}{GetSelectedTabFont}{\void}

Returns the font to be used for the selected tab label.

\membersection{wxTabView::GetShadowColour}

\func{wxColour}{GetShadowColour}{\void}

Returns the colour used for shadows on the right-hand side of `3D' surfaces. By default, this is dark grey.

\membersection{wxTabView::GetTabHeight}

\func{int}{GetTabHeight}{\void}

Returns the tab default height.

\membersection{wxTabView::GetTabFont}

\func{wxFont *}{GetTabFont}{\void}

Returns the tab label font.

\membersection{wxTabView::GetTabSelectionHeight}

\func{int}{GetTabSelectionHeight}{\void}

Returns the height to be used for the currently selected tab; normally a few pixels
higher than the other tabs.

\membersection{wxTabView::GetTabStyle}

\func{long}{GetTabStyle}{\void}

Returns the tab style. See constructor documentation for details of valid styles.

\membersection{wxTabView::GetTabWidth}

\func{int}{GetTabWidth}{\void}

Returns the tab default width.

\membersection{wxTabView::GetTextColour}

\func{wxColour}{GetTextColour}{\void}

Returns the colour used to draw label text. By default, this is
black.

\membersection{wxTabView::GetTopMargin}

\func{int}{GetTopMargin}{\void}

Returns the height between the top of the view area and the bottom of the first
row of tabs.

\membersection{wxTabView::GetShadowPen}

\func{wxPen *}{GetShadowPen}{\void}

Returns the pen used to draw 3D effect shadows. This is set when
SetShadowColour is called. 

\membersection{wxTabView::GetViewRect}

\func{wxRectangle}{GetViewRect}{\void}

Returns the rectangle specifying the view area (above which tabs are
placed).

\membersection{wxTabView::GetVerticalTabTextSpacing}

\func{int}{GetVerticalTabTextSpacing}{\void}

Returns the vertical spacing between the top of an unselected tab, and the tab label.

\membersection{wxTabView::GetWindow}

\func{wwxWindow *}{GetWindow}{\void}

Returns the window for the view.

\membersection{wxTabView::OnCreateTabControl}

\func{wxTabControl *}{OnCreateTabControl}{\void}

Creates a new tab control. By default, this returns a wxTabControl object, but the application may wish
to define a derived class, in which case the tab view should be subclassed and this function overridden.

\membersection{wxTabView::LayoutTabs}

\func{void}{LayoutTabs}{\void}

Recalculates the positions of the tabs, and adjusts the layer of the selected tab if necessary.

You may want to call this function if the view width has changed (for example, from an OnSize handler).

\membersection{wxTabView::OnEvent}

\func{bool}{OnEvent}{\param{wxMouseEvent\& }{event}}

Processes mouse events sent from the panel or dialog. Returns true if the event was processed,
false otherwise.

\membersection{wxTabView::OnTabActivate}

\func{void}{OnTabActivate}{\param{int}{ activateId}, \param{int}{ deactivateId}}

Called when a tab is activated, with the new active tab id, and the former active tab id.

\membersection{wxTabView::OnTabPreActivate}

\func{bool}{OnTabPreActivate}{\param{int}{ activateId}, \param{int}{ deactivateId}}

Called just before a tab is activated, with the new active tab id, and the former active tab id.

If the function returns false, the tab is not activated.

\membersection{wxTabView::SetBackgroundColour}

\func{void}{SetBackgroundColour}{\param{const wxColour\&}{ col}}

Sets the colour to be used for each tab background. By default, this is
light grey. To ensure a match with the dialog or panel background, omit
the wxTAB\_STYLE\_COLOUR\_INTERIOR flag from the wxTabView constructor. 

\membersection{wxTabView::SetHighlightColour}

\func{void}{SetHighlightColour}{\param{const wxColour\&}{ col}}

Sets the colour to be used for bright highlights on the left side of `3D' surfaces. By default, this is white.

\membersection{wxTabView::SetHorizontalTabOffset}

\func{void}{SetHorizontalTabOffset}{\param{int}{ offset}}

Sets the horizontal spacing by which each tab layer is offset from the one below.

\membersection{wxTabView::SetSelectedTabFont}

\func{void}{SetSelectedTabFont}{\param{wxFont *}{font}}

Sets the font to be used for the selected tab label.

\membersection{wxTabView::SetShadowColour}

\func{void}{SetShadowColour}{\param{const wxColour\&}{ col}}

Sets the colour to be used for shadows on the right-hand side of `3D' surfaces. By default, this is dark grey.

\membersection{wxTabView::SetTabFont}

\func{void}{SetTabFont}{\param{wxFont *}{font}}

Sets the tab label font.

\membersection{wxTabView::SetTabStyle}

\func{void}{SetTabStyle}{\param{long}{ tabStyle}}

Sets the tab style. See constructor documentation for details of valid styles.

\membersection{wxTabView::SetTabSize}

\func{void}{SetTabSize}{\param{int}{ width}, \param{int}{ height}}

Sets the tab default width and height.

\membersection{wxTabView::SetTabSelectionHeight}

\func{void}{SetTabSelectionHeight}{\param{int}{ height}}

Sets the height to be used for the currently selected tab; normally a few pixels
higher than the other tabs.

\membersection{wxTabView::SetTabSelection}

\func{void}{SetTabSelection}{\param{int}{ sel}, \param{bool}{ activateTool=true}}

Sets the selected tab, calling the application's OnTabActivate function.

If {\it activateTool} is false, OnTabActivate will not be called.

\membersection{wxTabView::SetTextColour}

\func{void}{SetTextColour}{\param{const wxColour\&}{ col}}

Sets the colour to be used to draw label text. By default, this is
black.

\membersection{wxTabView::SetTopMargin}

\func{void}{SetTopMargin}{\param{int}{ margin}}

Sets the height between the top of the view area and the bottom of the first
row of tabs.

\membersection{wxTabView::SetVerticalTabTextSpacing}

\func{void}{SetVerticalTabTextSpacing}{\param{int}{ spacing}}

Sets the vertical spacing between the top of an unselected tab, and the tab label.

\membersection{wxTabView::SetViewRect}\label{wxtabviewsetviewrect}

\func{void}{SetViewRect}{\param{const wxRectangle\& }{rect}}

Sets the rectangle specifying the view area (above which tabs are
placed). This must be set by the application. 

\membersection{wxTabView::SetWindow}

\func{void}{SetWindow}{\param{wxWindow *}{window}}

Set the window that the tab view will use for drawing onto.