1 \section{\class{wxTabbedDialog
}}\label{wxtabbeddialog
}
3 A dialog suitable for handling tabs.
5 Please note that the preferred class for programming tabbed windows is
\helpref{wxNotebook
}{wxnotebook
}.
6 This class is retained for backward compatibility.
8 \wxheading{Derived from
}
10 \helpref{wxDialog
}{wxdialog
}\\
11 \helpref{wxEvtHandler
}{wxevthandler
}\\
12 \helpref{wxObject
}{wxobject
}
14 \wxheading{Include files
}
20 \helpref{Tab classes overview
}{wxtaboverview
}
22 \latexignore{\rtfignore{\wxheading{Members
}}}
24 \membersection{wxTabbedDialog::wxTabbedDialog
}
26 \func{}{wxTabbedDialog
}{\param{wxWindow *
}{parent
},
\param{wxWindowID
}{id
},
27 \param{const wxString\&
}{title
},
\param{const wxPoint\&
}{ pos
},
\param{const wxSize\&
}{ size
},
28 \param{long
}{ style=wxDEFAULT
\_DIALOG\_STYLE},
\param{const wxString\&
}{name="dialogBox"
}}
32 \membersection{wxTabbedDialog::
\destruct{wxTabbedDialog
}}
34 \func{}{\destruct{wxTabbedDialog
}}{\void}
36 Destructor. This destructor deletes the tab view associated with the dialog box.
37 If you do not wish this to happen, set the tab view to NULL before destruction (for example,
38 in the OnCloseWindow event handler).
40 \membersection{wxTabbedDialog::SetTabView
}
42 \func{void
}{SetTabView
}{\param{wxTabView *
}{view
}}
44 Sets the tab view associated with the dialog box.
46 \membersection{wxTabbedDialog::GetTabView
}
48 \func{wxTabView *
}{GetTabView
}{\void}
50 Returns the tab view associated with the dialog box.
52 \section{\class{wxTabbedPanel
}}\label{wxtabbedpanel
}
54 A panel suitable for handling tabs.
56 Please note that the preferred class for programming tabbed windows is
\helpref{wxNotebook
}{wxnotebook
}.
57 This class is retained for backward compatibility.
59 \wxheading{Derived from
}
61 \helpref{wxPanel
}{wxpanel
}\\
62 \helpref{wxEvtHandler
}{wxevthandler
}\\
63 \helpref{wxObject
}{wxobject
}
65 \wxheading{Include files
}
71 \helpref{Tab classes overview
}{wxtaboverview
}
73 \latexignore{\rtfignore{\wxheading{Members
}}}
75 \membersection{wxTabbedPanel::wxTabbedPanel
}
77 \func{}{wxTabbedPanel
}{\param{wxWindow *
}{parent
},
\param{wxWindowID
}{ id
},
78 \param{const wxPoint\&
}{ pos
},
\param{const wxSize\&
}{ size
},
79 \param{long
}{ style=
0},
\param{const wxString\&
}{name="panel"
}}
83 \membersection{wxTabbedPanel::SetTabView
}
85 \func{void
}{SetTabView
}{\param{wxTabView *
}{view
}}
87 Sets the tab view associated with the panel.
89 \membersection{wxTabbedPanel::GetTabView
}
91 \func{wxTabView *
}{GetTabView
}{\void}
93 Returns the tab view associated with the panel.
95 \section{\class{wxTabControl
}}\label{wxtabcontrol
}
97 You will rarely need to use this class directly.
99 Please note that the preferred class for programming tabbed windows is
\helpref{wxNotebook
}{wxnotebook
}.
100 This class is retained for backward compatibility.
102 \wxheading{Derived from
}
104 \helpref{wxObject
}{wxobject
}
106 \wxheading{Include files
}
112 \overview{Tab classes overview
}{wxtaboverview
}
114 \latexignore{\rtfignore{\wxheading{Members
}}}
116 \membersection{wxTabControl::wxTabControl
}
118 \func{void
}{wxTabControl
}{\param{wxTabView *
}{view = NULL
}}
122 \membersection{wxTabControl::GetColPosition
}
124 \func{int
}{GetColPosition
}{\void}
126 Returns the position of the tab in the tab column.
128 \membersection{wxTabControl::GetFont
}
130 \func{wxFont *
}{GetFont
}{\void}
132 Returns the font to be used for this tab.
134 \membersection{wxTabControl::GetHeight
}
136 \func{int
}{GetHeight
}{\void}
138 Returns the tab height.
140 \membersection{wxTabControl::GetId
}
142 \func{int
}{GetId
}{\void}
144 Returns the tab identifier.
146 \membersection{wxTabControl::GetLabel
}
148 \func{wxString
}{GetLabel
}{\void}
150 Returns the tab label.
152 \membersection{wxTabControl::GetRowPosition
}
154 \func{int
}{GetRowPosition
}{\void}
156 Returns the position of the tab in the layer or row.
158 \membersection{wxTabControl::GetSelected
}
160 \func{bool
}{GetSelected
}{\void}
162 Returns the selected flag.
164 \membersection{wxTabControl::GetWidth
}
166 \func{int
}{GetWidth
}{\void}
168 Returns the tab width.
170 \membersection{wxTabControl::GetX
}
172 \func{int
}{GetX
}{\void}
174 Returns the x offset from the top-left of the view area.
176 \membersection{wxTabControl::GetY
}
178 \func{int
}{GetY
}{\void}
180 Returns the y offset from the top-left of the view area.
182 \membersection{wxTabControl::HitTest
}
184 \func{bool
}{HitTest
}{\param{int
}{ x
},
\param{int
}{ y
}}
186 Returns TRUE if the point x, y is within the tab area.
188 \membersection{wxTabControl::OnDraw
}
190 \func{void
}{OnDraw
}{\param{wxDC\&
}{dc
},
\param{bool
}{ lastInRow
}}
192 Draws the tab control on the given device context.
194 \membersection{wxTabControl::SetColPosition
}
196 \func{void
}{SetColPosition
}{\param{int
}{ pos
}}
198 Sets the position in the column.
200 \membersection{wxTabControl::SetFont
}
202 \func{void
}{SetFont
}{\param{wxFont *
}{font
}}
204 Sets the font to be used for this tab.
206 \membersection{wxTabControl::SetId
}
208 \func{void
}{SetId
}{\param{int
}{ id
}}
210 Sets the tab identifier.
212 \membersection{wxTabControl::SetLabel
}
214 \func{void
}{SetLabel
}{\param{const wxString\&
}{str
}}
216 Sets the label for the tab.
218 \membersection{wxTabControl::SetPosition
}
220 \func{void
}{SetPosition
}{\param{int
}{ x
},
\param{int
}{ y
}}
222 Sets the x and y offsets for this tab, measured from the top-left of the view area.
224 \membersection{wxTabControl::SetRowPosition
}
226 \func{void
}{SetRowPosition
}{\param{int
}{ pos
}}
228 Sets the position on the layer (row).
230 \membersection{wxTabControl::SetSelected
}
232 \func{void
}{SetSelected
}{\param{bool
}{selected
}}
234 Sets the selection flag for this tab (does not set the current tab for the view;
235 use wxTabView::SetSelectedTab for that).
237 \membersection{wxTabControl::SetSize
}
239 \func{void
}{SetSize
}{\param{int
}{ width
},
\param{int
}{ height
}}
241 Sets the width and height for this tab.
243 \section{\class{wxTabView
}}\label{wxtabview
}
245 Responsible for drawing tabs onto a window, and dealing with input.
247 Please note that the preferred class for programming tabbed windows is
\helpref{wxNotebook
}{wxnotebook
}.
248 This class is retained for backward compatibility.
250 \wxheading{Derived from
}
252 \helpref{wxObject
}{wxobject
}
254 \wxheading{Include files
}
260 \helpref{wxTabView overview
}{wxtabviewoverview
},
\helpref{wxPanelTabView
}{wxpaneltabview
}
262 \latexignore{\rtfignore{\wxheading{Members
}}}
264 \membersection{wxTabView::wxTabView
}
266 \func{}{wxTabView
}{\param{long
}{style = wxTAB
\_STYLE\_DRAW\_BOX \pipe wxTAB
\_STYLE\_COLOUR\_INTERIOR}}
270 {\it style
} may be a bit list of the following:
272 \begin{twocollist
}\itemsep=
0pt
273 \twocolitem{wxTAB
\_STYLE\_DRAW\_BOX}{Draw a box around the view area. Most commonly used for dialogs.
}
274 \twocolitem{wxTAB
\_STYLE\_COLOUR\_INTERIOR}{Draw tab backgrounds in the specified colour. Omitting this style
275 will ensure that the tab background matches the dialog background.
}
278 \membersection{wxTabView::AddTab
}\label{wxtabviewaddtab
}
280 \func{wxTabControl *
}{AddTab
}{\param{int
}{ id
},
\param{const wxString\&
}{label
},
\param{wxTabControl *
}{existingTab=NULL
}}
282 Adds a tab to the view.
284 {\it id
} is the application-chosen identifier for the tab, which will be used in subsequent tab operations.
286 {\it label
} is the label to give the tab.
288 {\it existingTab
} maybe NULL to specify a new tab, or non-NULL to indicate that an existing tab should be used.
290 A new layer (row) is started when the current layer has been filled up with tabs.
292 \membersection{wxTabView::CalculateTabWidth
}\label{wxtabviewcalculatetabwidth
}
294 \func{int
}{CalculateTabWidth
}{\param{int
}{ noTabs
},
\param{bool
}{ adjustView = FALSE
}}
296 The application can specify the tab width using this function, in terms
297 of the number of tabs per layer (row) which will fit the view area, which
298 should have been set previously with SetViewRect.
300 {\it noTabs
} is the number of tabs which should take up the full width
303 {\it adjustView
} can be set to TRUE in order to readjust the view width
304 to exactly fit the given number of tabs.
306 The new tab width is returned.
308 \membersection{wxTabView::ClearTabs
}
310 \func{void
}{ClearTabs
}{\param{bool
}{deleteTabs=TRUE
}}
312 Clears the tabs, deleting them if
{\it deleteTabs
} is TRUE.
314 \membersection{wxTabView::Draw
}
316 \func{void
}{Draw
}{\param{wxDC\&
}{dc
}}
318 Draws the tabs and (optionally) a box around the view area.
320 \membersection{wxTabView::FindTabControlForId
}
322 \func{wxTabControl *
}{FindTabControlForId
}{\param{int
}{ id
}}
324 Finds the wxTabControl corresponding to
{\it id
}.
326 \membersection{wxTabView::FindTabControlForPosition
}
328 \func{wxTabControl *
}{FindTabControlForPosition
}{\param{int
}{ layer
},
\param{int
}{ position
}}
330 Finds the wxTabControl at layer
{\it layer
}, position in layer
{\it position
}, both starting from
331 zero. Note that tabs change layer as they are selected or deselected.
333 \membersection{wxTabView::GetBackgroundBrush
}
335 \func{wxBrush *
}{GetBackgroundBrush
}{\void}
337 Returns the brush used to draw in the background colour. It is set when
338 SetBackgroundColour is called.
340 \membersection{wxTabView::GetBackgroundColour
}
342 \func{wxColour
}{GetBackgroundColour
}{\void}
344 Returns the colour used for each tab background. By default, this is
345 light grey. To ensure a match with the dialog or panel background, omit
346 the wxTAB
\_STYLE\_COLOUR\_INTERIOR flag from the wxTabView constructor.
348 \membersection{wxTabView::GetBackgroundPen
}
350 \func{wxPen *
}{GetBackgroundPen
}{\void}
352 Returns the pen used to draw in the background colour. It is set when
353 SetBackgroundColour is called.
355 \membersection{wxTabView::GetHighlightColour
}
357 \func{wxColour
}{GetHighlightColour
}{\void}
359 Returns the colour used for bright highlights on the left side of `
3D' surfaces. By default, this is white.
361 \membersection{wxTabView::GetHighlightPen
}
363 \func{wxPen *
}{GetHighlightPen
}{\void}
365 Returns the pen used to draw
3D effect highlights. This is set when
366 SetHighlightColour is called.
368 \membersection{wxTabView::GetHorizontalTabOffset
}
370 \func{int
}{GetHorizontalTabOffset
}{\void}
372 Returns the horizontal spacing by which each tab layer is offset from the one below.
374 \membersection{wxTabView::GetNumberOfLayers
}
376 \func{int
}{GetNumberOfLayers
}{\void}
378 Returns the number of layers (rows of tabs).
380 \membersection{wxTabView::GetSelectedTabFont
}
382 \func{wxFont *
}{GetSelectedTabFont
}{\void}
384 Returns the font to be used for the selected tab label.
386 \membersection{wxTabView::GetShadowColour
}
388 \func{wxColour
}{GetShadowColour
}{\void}
390 Returns the colour used for shadows on the right-hand side of `
3D' surfaces. By default, this is dark grey.
392 \membersection{wxTabView::GetTabHeight
}
394 \func{int
}{GetTabHeight
}{\void}
396 Returns the tab default height.
398 \membersection{wxTabView::GetTabFont
}
400 \func{wxFont *
}{GetTabFont
}{\void}
402 Returns the tab label font.
404 \membersection{wxTabView::GetTabSelectionHeight
}
406 \func{int
}{GetTabSelectionHeight
}{\void}
408 Returns the height to be used for the currently selected tab; normally a few pixels
409 higher than the other tabs.
411 \membersection{wxTabView::GetTabStyle
}
413 \func{long
}{GetTabStyle
}{\void}
415 Returns the tab style. See constructor documentation for details of valid styles.
417 \membersection{wxTabView::GetTabWidth
}
419 \func{int
}{GetTabWidth
}{\void}
421 Returns the tab default width.
423 \membersection{wxTabView::GetTextColour
}
425 \func{wxColour
}{GetTextColour
}{\void}
427 Returns the colour used to draw label text. By default, this is
430 \membersection{wxTabView::GetTopMargin
}
432 \func{int
}{GetTopMargin
}{\void}
434 Returns the height between the top of the view area and the bottom of the first
437 \membersection{wxTabView::GetShadowPen
}
439 \func{wxPen *
}{GetShadowPen
}{\void}
441 Returns the pen used to draw
3D effect shadows. This is set when
442 SetShadowColour is called.
444 \membersection{wxTabView::GetViewRect
}
446 \func{wxRectangle
}{GetViewRect
}{\void}
448 Returns the rectangle specifying the view area (above which tabs are
451 \membersection{wxTabView::GetVerticalTabTextSpacing
}
453 \func{int
}{GetVerticalTabTextSpacing
}{\void}
455 Returns the vertical spacing between the top of an unselected tab, and the tab label.
457 \membersection{wxTabView::GetWindow
}
459 \func{wwxWindow *
}{GetWindow
}{\void}
461 Returns the window for the view.
463 \membersection{wxTabView::OnCreateTabControl
}
465 \func{wxTabControl *
}{OnCreateTabControl
}{\void}
467 Creates a new tab control. By default, this returns a wxTabControl object, but the application may wish
468 to define a derived class, in which case the tab view should be subclassed and this function overridden.
470 \membersection{wxTabView::LayoutTabs
}
472 \func{void
}{LayoutTabs
}{\void}
474 Recalculates the positions of the tabs, and adjusts the layer of the selected tab if necessary.
476 You may want to call this function if the view width has changed (for example, from an OnSize handler).
478 \membersection{wxTabView::OnEvent
}
480 \func{bool
}{OnEvent
}{\param{wxMouseEvent\&
}{event
}}
482 Processes mouse events sent from the panel or dialog. Returns TRUE if the event was processed,
485 \membersection{wxTabView::OnTabActivate
}
487 \func{void
}{OnTabActivate
}{\param{int
}{ activateId
},
\param{int
}{ deactivateId
}}
489 Called when a tab is activated, with the new active tab id, and the former active tab id.
491 \membersection{wxTabView::OnTabPreActivate
}
493 \func{bool
}{OnTabPreActivate
}{\param{int
}{ activateId
},
\param{int
}{ deactivateId
}}
495 Called just before a tab is activated, with the new active tab id, and the former active tab id.
497 If the function returns FALSE, the tab is not activated.
499 \membersection{wxTabView::SetBackgroundColour
}
501 \func{void
}{SetBackgroundColour
}{\param{const wxColour\&
}{ col
}}
503 Sets the colour to be used for each tab background. By default, this is
504 light grey. To ensure a match with the dialog or panel background, omit
505 the wxTAB
\_STYLE\_COLOUR\_INTERIOR flag from the wxTabView constructor.
507 \membersection{wxTabView::SetHighlightColour
}
509 \func{void
}{SetHighlightColour
}{\param{const wxColour\&
}{ col
}}
511 Sets the colour to be used for bright highlights on the left side of `
3D' surfaces. By default, this is white.
513 \membersection{wxTabView::SetHorizontalTabOffset
}
515 \func{void
}{SetHorizontalTabOffset
}{\param{int
}{ offset
}}
517 Sets the horizontal spacing by which each tab layer is offset from the one below.
519 \membersection{wxTabView::SetSelectedTabFont
}
521 \func{void
}{SetSelectedTabFont
}{\param{wxFont *
}{font
}}
523 Sets the font to be used for the selected tab label.
525 \membersection{wxTabView::SetShadowColour
}
527 \func{void
}{SetShadowColour
}{\param{const wxColour\&
}{ col
}}
529 Sets the colour to be used for shadows on the right-hand side of `
3D' surfaces. By default, this is dark grey.
531 \membersection{wxTabView::SetTabFont
}
533 \func{void
}{SetTabFont
}{\param{wxFont *
}{font
}}
535 Sets the tab label font.
537 \membersection{wxTabView::SetTabStyle
}
539 \func{void
}{SetTabStyle
}{\param{long
}{ tabStyle
}}
541 Sets the tab style. See constructor documentation for details of valid styles.
543 \membersection{wxTabView::SetTabSize
}
545 \func{void
}{SetTabSize
}{\param{int
}{ width
},
\param{int
}{ height
}}
547 Sets the tab default width and height.
549 \membersection{wxTabView::SetTabSelectionHeight
}
551 \func{void
}{SetTabSelectionHeight
}{\param{int
}{ height
}}
553 Sets the height to be used for the currently selected tab; normally a few pixels
554 higher than the other tabs.
556 \membersection{wxTabView::SetTabSelection
}
558 \func{void
}{SetTabSelection
}{\param{int
}{ sel
},
\param{bool
}{ activateTool=TRUE
}}
560 Sets the selected tab, calling the application's OnTabActivate function.
562 If
{\it activateTool
} is FALSE, OnTabActivate will not be called.
564 \membersection{wxTabView::SetTextColour
}
566 \func{void
}{SetTextColour
}{\param{const wxColour\&
}{ col
}}
568 Sets the colour to be used to draw label text. By default, this is
571 \membersection{wxTabView::SetTopMargin
}
573 \func{void
}{SetTopMargin
}{\param{int
}{ margin
}}
575 Sets the height between the top of the view area and the bottom of the first
578 \membersection{wxTabView::SetVerticalTabTextSpacing
}
580 \func{void
}{SetVerticalTabTextSpacing
}{\param{int
}{ spacing
}}
582 Sets the vertical spacing between the top of an unselected tab, and the tab label.
584 \membersection{wxTabView::SetViewRect
}\label{wxtabviewsetviewrect
}
586 \func{void
}{SetViewRect
}{\param{const wxRectangle\&
}{rect
}}
588 Sets the rectangle specifying the view area (above which tabs are
589 placed). This must be set by the application.
591 \membersection{wxTabView::SetWindow
}
593 \func{void
}{SetWindow
}{\param{wxWindow *
}{window
}}
595 Set the window that the tab view will use for drawing onto.