1 \section{\class{wxTabbedDialog
}}\label{wxtabbeddialog
}
3 A dialog suitable for handling tabs.
5 \wxheading{Derived from
}
7 \helpref{wxDialog
}{wxdialog
}\\
8 \helpref{wxEvtHandler
}{wxevthandler
}\\
9 \helpref{wxObject
}{wxobject
}
11 \wxheading{Include files
}
17 \helpref{Tab classes overview
}{wxtaboverview
}
19 \latexignore{\rtfignore{\wxheading{Members
}}}
21 \membersection{wxTabbedDialog::wxTabbedDialog
}
23 \func{}{wxTabbedDialog
}{\param{wxWindow *
}{parent
},
\param{wxWindowID
}{id
},
24 \param{const wxString\&
}{title
},
\param{const wxPoint\&
}{ pos
},
\param{const wxSize\&
}{ size
},
25 \param{long
}{ style=wxDEFAULT
\_DIALOG\_STYLE},
\param{const wxString\&
}{name="dialogBox"
}}
29 \membersection{wxTabbedDialog::
\destruct{wxTabbedDialog
}}
31 \func{}{\destruct{wxTabbedDialog
}}{\void}
33 Destructor. This destructor deletes the tab view associated with the dialog box.
34 If you do not wish this to happen, set the tab view to NULL before destruction (for example,
35 in the OnCloseWindow event handler).
37 \membersection{wxTabbedDialog::SetTabView
}
39 \func{void
}{SetTabView
}{\param{wxTabView *
}{view
}}
41 Sets the tab view associated with the dialog box.
43 \membersection{wxTabbedDialog::GetTabView
}
45 \func{wxTabView *
}{GetTabView
}{\void}
47 Returns the tab view associated with the dialog box.
49 \section{\class{wxTabbedPanel
}}\label{wxtabbedpanel
}
51 A panel suitable for handling tabs.
53 \wxheading{Derived from
}
55 \helpref{wxPanel
}{wxpanel
}\\
56 \helpref{wxEvtHandler
}{wxevthandler
}\\
57 \helpref{wxObject
}{wxobject
}
59 \wxheading{Include files
}
65 \helpref{Tab classes overview
}{wxtaboverview
}
67 \latexignore{\rtfignore{\wxheading{Members
}}}
69 \membersection{wxTabbedPanel::wxTabbedPanel
}
71 \func{}{wxTabbedPanel
}{\param{wxWindow *
}{parent
},
\param{wxWindowID
}{ id
},
72 \param{const wxPoint\&
}{ pos
},
\param{const wxSize\&
}{ size
},
73 \param{long
}{ style=
0},
\param{const wxString\&
}{name="panel"
}}
77 \membersection{wxTabbedPanel::SetTabView
}
79 \func{void
}{SetTabView
}{\param{wxTabView *
}{view
}}
81 Sets the tab view associated with the panel.
83 \membersection{wxTabbedPanel::GetTabView
}
85 \func{wxTabView *
}{GetTabView
}{\void}
87 Returns the tab view associated with the panel.
89 \section{\class{wxTabControl
}}\label{wxtabcontrol
}
91 You will rarely need to use this class directly.
93 \wxheading{Derived from
}
95 \helpref{wxObject
}{wxobject
}
97 \wxheading{Include files
}
103 \overview{Tab classes overview
}{wxtaboverview
}
105 \latexignore{\rtfignore{\wxheading{Members
}}}
107 \membersection{wxTabControl::wxTabControl
}
109 \func{void
}{wxTabControl
}{\param{wxTabView *
}{view = NULL
}}
113 \membersection{wxTabControl::GetColPosition
}
115 \func{int
}{GetColPosition
}{\void}
117 Returns the position of the tab in the tab column.
119 \membersection{wxTabControl::GetFont
}
121 \func{wxFont *
}{GetFont
}{\void}
123 Returns the font to be used for this tab.
125 \membersection{wxTabControl::GetHeight
}
127 \func{int
}{GetHeight
}{\void}
129 Returns the tab height.
131 \membersection{wxTabControl::GetId
}
133 \func{int
}{GetId
}{\void}
135 Returns the tab identifier.
137 \membersection{wxTabControl::GetLabel
}
139 \func{wxString
}{GetLabel
}{\void}
141 Returns the tab label.
143 \membersection{wxTabControl::GetRowPosition
}
145 \func{int
}{GetRowPosition
}{\void}
147 Returns the position of the tab in the layer or row.
149 \membersection{wxTabControl::GetSelected
}
151 \func{bool
}{GetSelected
}{\void}
153 Returns the selected flag.
155 \membersection{wxTabControl::GetWidth
}
157 \func{int
}{GetWidth
}{\void}
159 Returns the tab width.
161 \membersection{wxTabControl::GetX
}
163 \func{int
}{GetX
}{\void}
165 Returns the x offset from the top-left of the view area.
167 \membersection{wxTabControl::GetY
}
169 \func{int
}{GetY
}{\void}
171 Returns the y offset from the top-left of the view area.
173 \membersection{wxTabControl::HitTest
}
175 \func{bool
}{HitTest
}{\param{int
}{ x
},
\param{int
}{ y
}}
177 Returns TRUE if the point x, y is within the tab area.
179 \membersection{wxTabControl::OnDraw
}
181 \func{void
}{OnDraw
}{\param{wxDC\&
}{dc
},
\param{bool
}{ lastInRow
}}
183 Draws the tab control on the given device context.
185 \membersection{wxTabControl::SetColPosition
}
187 \func{void
}{SetColPosition
}{\param{int
}{ pos
}}
189 Sets the position in the column.
191 \membersection{wxTabControl::SetFont
}
193 \func{void
}{SetFont
}{\param{wxFont *
}{font
}}
195 Sets the font to be used for this tab.
197 \membersection{wxTabControl::SetId
}
199 \func{void
}{SetId
}{\param{int
}{ id
}}
201 Sets the tab identifier.
203 \membersection{wxTabControl::SetLabel
}
205 \func{void
}{SetLabel
}{\param{const wxString\&
}{str
}}
207 Sets the label for the tab.
209 \membersection{wxTabControl::SetPosition
}
211 \func{void
}{SetPosition
}{\param{int
}{ x
},
\param{int
}{ y
}}
213 Sets the x and y offsets for this tab, measured from the top-left of the view area.
215 \membersection{wxTabControl::SetRowPosition
}
217 \func{void
}{SetRowPosition
}{\param{int
}{ pos
}}
219 Sets the position on the layer (row).
221 \membersection{wxTabControl::SetSelected
}
223 \func{void
}{SetSelected
}{\param{bool
}{selected
}}
225 Sets the selection flag for this tab (does not set the current tab for the view;
226 use wxTabView::SetSelectedTab for that).
228 \membersection{wxTabControl::SetSize
}
230 \func{void
}{SetSize
}{\param{int
}{ width
},
\param{int
}{ height
}}
232 Sets the width and height for this tab.
234 \section{\class{wxTabView
}}\label{wxtabview
}
236 Responsible for drawing tabs onto a window, and dealing with input.
238 \wxheading{Derived from
}
240 \helpref{wxObject
}{wxobject
}
242 \wxheading{Include files
}
248 \helpref{wxTabView overview
}{wxtabviewoverview
},
\helpref{wxPanelTabView
}{wxpaneltabview
}
250 \latexignore{\rtfignore{\wxheading{Members
}}}
252 \membersection{wxTabView::wxTabView
}
254 \func{}{wxTabView
}{\param{long
}{style = wxTAB
\_STYLE\_DRAW\_BOX \pipe wxTAB
\_STYLE\_COLOUR\_INTERIOR}}
258 {\it style
} may be a bit list of the following:
260 \begin{twocollist
}\itemsep=
0pt
261 \twocolitem{wxTAB
\_STYLE\_DRAW\_BOX}{Draw a box around the view area. Most commonly used for dialogs.
}
262 \twocolitem{wxTAB
\_STYLE\_COLOUR\_INTERIOR}{Draw tab backgrounds in the specified colour. Omitting this style
263 will ensure that the tab background matches the dialog background.
}
266 \membersection{wxTabView::AddTab
}\label{wxtabviewaddtab
}
268 \func{wxTabControl *
}{AddTab
}{\param{int
}{ id
},
\param{const wxString\&
}{label
},
\param{wxTabControl *
}{existingTab=NULL
}}
270 Adds a tab to the view.
272 {\it id
} is the application-chosen identifier for the tab, which will be used in subsequent tab operations.
274 {\it label
} is the label to give the tab.
276 {\it existingTab
} maybe NULL to specify a new tab, or non-NULL to indicate that an existing tab should be used.
278 A new layer (row) is started when the current layer has been filled up with tabs.
280 \membersection{wxTabView::CalculateTabWidth
}\label{wxtabviewcalculatetabwidth
}
282 \func{int
}{CalculateTabWidth
}{\param{int
}{ noTabs
},
\param{bool
}{ adjustView = FALSE
}}
284 The application can specify the tab width using this function, in terms
285 of the number of tabs per layer (row) which will fit the view area, which
286 should have been set previously with SetViewRect.
288 {\it noTabs
} is the number of tabs which should take up the full width
291 {\it adjustView
} can be set to TRUE in order to readjust the view width
292 to exactly fit the given number of tabs.
294 The new tab width is returned.
296 \membersection{wxTabView::ClearTabs
}
298 \func{void
}{ClearTabs
}{\param{bool
}{deleteTabs=TRUE
}}
300 Clears the tabs, deleting them if
{\it deleteTabs
} is TRUE.
302 \membersection{wxTabView::Draw
}
304 \func{void
}{Draw
}{\param{wxDC\&
}{dc
}}
306 Draws the tabs and (optionally) a box around the view area.
308 \membersection{wxTabView::FindTabControlForId
}
310 \func{wxTabControl *
}{FindTabControlForId
}{\param{int
}{ id
}}
312 Finds the wxTabControl corresponding to
{\it id
}.
314 \membersection{wxTabView::FindTabControlForPosition
}
316 \func{wxTabControl *
}{FindTabControlForPosition
}{\param{int
}{ layer
},
\param{int
}{ position
}}
318 Finds the wxTabControl at layer
{\it layer
}, position in layer
{\it position
}, both starting from
319 zero. Note that tabs change layer as they are selected or deselected.
321 \membersection{wxTabView::GetBackgroundBrush
}
323 \func{wxBrush *
}{GetBackgroundBrush
}{\void}
325 Returns the brush used to draw in the background colour. It is set when
326 SetBackgroundColour is called.
328 \membersection{wxTabView::GetBackgroundColour
}
330 \func{wxColour
}{GetBackgroundColour
}{\void}
332 Returns the colour used for each tab background. By default, this is
333 light grey. To ensure a match with the dialog or panel background, omit
334 the wxTAB
\_STYLE\_COLOUR\_INTERIOR flag from the wxTabView constructor.
336 \membersection{wxTabView::GetBackgroundPen
}
338 \func{wxPen *
}{GetBackgroundPen
}{\void}
340 Returns the pen used to draw in the background colour. It is set when
341 SetBackgroundColour is called.
343 \membersection{wxTabView::GetHighlightColour
}
345 \func{wxColour
}{GetHighlightColour
}{\void}
347 Returns the colour used for bright highlights on the left side of `
3D' surfaces. By default, this is white.
349 \membersection{wxTabView::GetHighlightPen
}
351 \func{wxPen *
}{GetHighlightPen
}{\void}
353 Returns the pen used to draw
3D effect highlights. This is set when
354 SetHighlightColour is called.
356 \membersection{wxTabView::GetHorizontalTabOffset
}
358 \func{int
}{GetHorizontalTabOffset
}{\void}
360 Returns the horizontal spacing by which each tab layer is offset from the one below.
362 \membersection{wxTabView::GetNumberOfLayers
}
364 \func{int
}{GetNumberOfLayers
}{\void}
366 Returns the number of layers (rows of tabs).
368 \membersection{wxTabView::GetSelectedTabFont
}
370 \func{wxFont *
}{GetSelectedTabFont
}{\void}
372 Returns the font to be used for the selected tab label.
374 \membersection{wxTabView::GetShadowColour
}
376 \func{wxColour
}{GetShadowColour
}{\void}
378 Returns the colour used for shadows on the right-hand side of `
3D' surfaces. By default, this is dark grey.
380 \membersection{wxTabView::GetTabHeight
}
382 \func{int
}{GetTabHeight
}{\void}
384 Returns the tab default height.
386 \membersection{wxTabView::GetTabFont
}
388 \func{wxFont *
}{GetTabFont
}{\void}
390 Returns the tab label font.
392 \membersection{wxTabView::GetTabSelectionHeight
}
394 \func{int
}{GetTabSelectionHeight
}{\void}
396 Returns the height to be used for the currently selected tab; normally a few pixels
397 higher than the other tabs.
399 \membersection{wxTabView::GetTabStyle
}
401 \func{long
}{GetTabStyle
}{\void}
403 Returns the tab style. See constructor documentation for details of valid styles.
405 \membersection{wxTabView::GetTabWidth
}
407 \func{int
}{GetTabWidth
}{\void}
409 Returns the tab default width.
411 \membersection{wxTabView::GetTextColour
}
413 \func{wxColour
}{GetTextColour
}{\void}
415 Returns the colour used to draw label text. By default, this is
418 \membersection{wxTabView::GetTopMargin
}
420 \func{int
}{GetTopMargin
}{\void}
422 Returns the height between the top of the view area and the bottom of the first
425 \membersection{wxTabView::GetShadowPen
}
427 \func{wxPen *
}{GetShadowPen
}{\void}
429 Returns the pen used to draw
3D effect shadows. This is set when
430 SetShadowColour is called.
432 \membersection{wxTabView::GetViewRect
}
434 \func{wxRectangle
}{GetViewRect
}{\void}
436 Returns the rectangle specifying the view area (above which tabs are
439 \membersection{wxTabView::GetVerticalTabTextSpacing
}
441 \func{int
}{GetVerticalTabTextSpacing
}{\void}
443 Returns the vertical spacing between the top of an unselected tab, and the tab label.
445 \membersection{wxTabView::GetWindow
}
447 \func{wwxWindow *
}{GetWindow
}{\void}
449 Returns the window for the view.
451 \membersection{wxTabView::OnCreateTabControl
}
453 \func{wxTabControl *
}{OnCreateTabControl
}{\void}
455 Creates a new tab control. By default, this returns a wxTabControl object, but the application may wish
456 to define a derived class, in which case the tab view should be subclassed and this function overridden.
458 \membersection{wxTabView::Layout
}
460 \func{void
}{Layout
}{\void}
462 Recalculates the positions of the tabs, and adjusts the layer of the selected tab if necessary.
464 You may want to call this function if the view width has changed (for example, from an OnSize handler).
466 \membersection{wxTabView::OnEvent
}
468 \func{bool
}{OnEvent
}{\param{wxMouseEvent\&
}{event
}}
470 Processes mouse events sent from the panel or dialog. Returns TRUE if the event was processed,
473 \membersection{wxTabView::OnTabActivate
}
475 \func{void
}{OnTabActivate
}{\param{int
}{ activateId
},
\param{int
}{ deactivateId
}}
477 Called when a tab is activated, with the new active tab id, and the former active tab id.
479 \membersection{wxTabView::OnTabPreActivate
}
481 \func{bool
}{OnTabPreActivate
}{\param{int
}{ activateId
},
\param{int
}{ deactivateId
}}
483 Called just before a tab is activated, with the new active tab id, and the former active tab id.
485 If the function returns FALSE, the tab is not activated.
487 \membersection{wxTabView::SetBackgroundColour
}
489 \func{void
}{SetBackgroundColour
}{\param{const wxColour\&
}{ col
}}
491 Sets the colour to be used for each tab background. By default, this is
492 light grey. To ensure a match with the dialog or panel background, omit
493 the wxTAB
\_STYLE\_COLOUR\_INTERIOR flag from the wxTabView constructor.
495 \membersection{wxTabView::SetHighlightColour
}
497 \func{void
}{SetHighlightColour
}{\param{const wxColour\&
}{ col
}}
499 Sets the colour to be used for bright highlights on the left side of `
3D' surfaces. By default, this is white.
501 \membersection{wxTabView::SetHorizontalTabOffset
}
503 \func{void
}{SetHorizontalTabOffset
}{\param{int
}{ offset
}}
505 Sets the horizontal spacing by which each tab layer is offset from the one below.
507 \membersection{wxTabView::SetSelectedTabFont
}
509 \func{void
}{SetSelectedTabFont
}{\param{wxFont *
}{font
}}
511 Sets the font to be used for the selected tab label.
513 \membersection{wxTabView::SetShadowColour
}
515 \func{void
}{SetShadowColour
}{\param{const wxColour\&
}{ col
}}
517 Sets the colour to be used for shadows on the right-hand side of `
3D' surfaces. By default, this is dark grey.
519 \membersection{wxTabView::SetTabFont
}
521 \func{void
}{SetTabFont
}{\param{wxFont *
}{font
}}
523 Sets the tab label font.
525 \membersection{wxTabView::SetTabStyle
}
527 \func{void
}{SetTabStyle
}{\param{long
}{ tabStyle
}}
529 Sets the tab style. See constructor documentation for details of valid styles.
531 \membersection{wxTabView::SetTabSize
}
533 \func{void
}{SetTabSize
}{\param{int
}{ width
},
\param{int
}{ height
}}
535 Sets the tab default width and height.
537 \membersection{wxTabView::SetTabSelectionHeight
}
539 \func{void
}{SetTabSelectionHeight
}{\param{int
}{ height
}}
541 Sets the height to be used for the currently selected tab; normally a few pixels
542 higher than the other tabs.
544 \membersection{wxTabView::SetTabSelection
}
546 \func{void
}{SetTabSelection
}{\param{int
}{ sel
},
\param{bool
}{ activateTool=TRUE
}}
548 Sets the selected tab, calling the application's OnTabActivate function.
550 If
{\it activateTool
} is FALSE, OnTabActivate will not be called.
552 \membersection{wxTabView::SetTextColour
}
554 \func{void
}{SetTextColour
}{\param{const wxColour\&
}{ col
}}
556 Sets the colour to be used to draw label text. By default, this is
559 \membersection{wxTabView::SetTopMargin
}
561 \func{void
}{SetTopMargin
}{\param{int
}{ margin
}}
563 Sets the height between the top of the view area and the bottom of the first
566 \membersection{wxTabView::SetVerticalTabTextSpacing
}
568 \func{void
}{SetVerticalTabTextSpacing
}{\param{int
}{ spacing
}}
570 Sets the vertical spacing between the top of an unselected tab, and the tab label.
572 \membersection{wxTabView::SetViewRect
}\label{wxtabviewsetviewrect
}
574 \func{void
}{SetViewRect
}{\param{const wxRectangle\&
}{rect
}}
576 Sets the rectangle specifying the view area (above which tabs are
577 placed). This must be set by the application.
579 \membersection{wxTabView::SetWindow
}
581 \func{void
}{SetWindow
}{\param{wxWindow *
}{window
}}
583 Set the window that the tab view will use for drawing onto.