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
}
13 \helpref{Tab classes overview
}{wxtaboverview
}
15 \latexignore{\rtfignore{\wxheading{Members
}}}
17 \membersection{wxTabbedDialog::wxTabbedDialog
}
19 \func{}{wxTabbedDialog
}{\param{wxWindow *
}{parent
},
\param{wxWindowID
}{id
},
20 \param{const wxString\&
}{title
},
\param{const wxPoint\&
}{ pos
},
\param{const wxSize\&
}{ size
},
21 \param{long
}{ style=wxDEFAULT
\_DIALOG\_STYLE},
\param{const wxString\&
}{name="dialogBox"
}}
25 \membersection{wxTabbedDialog::
\destruct{wxTabbedDialog
}}
27 \func{}{\destruct{wxTabbedDialog
}}{\void}
29 Destructor. This destructor deletes the tab view associated with the dialog box.
30 If you do not wish this to happen, set the tab view to NULL before destruction (for example,
31 in the OnCloseWindow event handler).
33 \membersection{wxTabbedDialog::SetTabView
}
35 \func{void
}{SetTabView
}{\param{wxTabView *
}{view
}}
37 Sets the tab view associated with the dialog box.
39 \membersection{wxTabbedDialog::GetTabView
}
41 \func{wxTabView *
}{GetTabView
}{\void}
43 Returns the tab view associated with the dialog box.
45 \section{\class{wxTabbedPanel
}}\label{wxtabbedpanel
}
47 A panel suitable for handling tabs.
49 \wxheading{Derived from
}
51 \helpref{wxPanel
}{wxpanel
}\\
52 \helpref{wxEvtHandler
}{wxevthandler
}\\
53 \helpref{wxObject
}{wxobject
}
57 \helpref{Tab classes overview
}{wxtaboverview
}
59 \latexignore{\rtfignore{\wxheading{Members
}}}
61 \membersection{wxTabbedPanel::wxTabbedPanel
}
63 \func{}{wxTabbedPanel
}{\param{wxWindow *
}{parent
},
\param{wxWindowID
}{ id
},
64 \param{const wxPoint\&
}{ pos
},
\param{const wxSize\&
}{ size
},
65 \param{long
}{ style=
0},
\param{const wxString\&
}{name="panel"
}}
69 \membersection{wxTabbedPanel::SetTabView
}
71 \func{void
}{SetTabView
}{\param{wxTabView *
}{view
}}
73 Sets the tab view associated with the panel.
75 \membersection{wxTabbedPanel::GetTabView
}
77 \func{wxTabView *
}{GetTabView
}{\void}
79 Returns the tab view associated with the panel.
81 \section{\class{wxTabControl
}}\label{wxtabcontrol
}
83 You will rarely need to use this class directly.
85 \wxheading{Derived from
}
87 \helpref{wxObject
}{wxobject
}
91 \overview{Tab classes overview
}{wxtaboverview
}
93 \latexignore{\rtfignore{\wxheading{Members
}}}
95 \membersection{wxTabControl::wxTabControl
}
97 \func{void
}{wxTabControl
}{\param{wxTabView *
}{view = NULL
}}
101 \membersection{wxTabControl::GetColPosition
}
103 \func{int
}{GetColPosition
}{\void}
105 Returns the position of the tab in the tab column.
107 \membersection{wxTabControl::GetFont
}
109 \func{wxFont *
}{GetFont
}{\void}
111 Returns the font to be used for this tab.
113 \membersection{wxTabControl::GetHeight
}
115 \func{int
}{GetHeight
}{\void}
117 Returns the tab height.
119 \membersection{wxTabControl::GetId
}
121 \func{int
}{GetId
}{\void}
123 Returns the tab identifier.
125 \membersection{wxTabControl::GetLabel
}
127 \func{wxString
}{GetLabel
}{\void}
129 Returns the tab label.
131 \membersection{wxTabControl::GetRowPosition
}
133 \func{int
}{GetRowPosition
}{\void}
135 Returns the position of the tab in the layer or row.
137 \membersection{wxTabControl::GetSelected
}
139 \func{bool
}{GetSelected
}{\void}
141 Returns the selected flag.
143 \membersection{wxTabControl::GetWidth
}
145 \func{int
}{GetWidth
}{\void}
147 Returns the tab width.
149 \membersection{wxTabControl::GetX
}
151 \func{int
}{GetX
}{\void}
153 Returns the x offset from the top-left of the view area.
155 \membersection{wxTabControl::GetY
}
157 \func{int
}{GetY
}{\void}
159 Returns the y offset from the top-left of the view area.
161 \membersection{wxTabControl::HitTest
}
163 \func{bool
}{HitTest
}{\param{int
}{ x
},
\param{int
}{ y
}}
165 Returns TRUE if the point x, y is within the tab area.
167 \membersection{wxTabControl::OnDraw
}
169 \func{void
}{OnDraw
}{\param{wxDC\&
}{dc
},
\param{bool
}{ lastInRow
}}
171 Draws the tab control on the given device context.
173 \membersection{wxTabControl::SetColPosition
}
175 \func{void
}{SetColPosition
}{\param{int
}{ pos
}}
177 Sets the position in the column.
179 \membersection{wxTabControl::SetFont
}
181 \func{void
}{SetFont
}{\param{wxFont *
}{font
}}
183 Sets the font to be used for this tab.
185 \membersection{wxTabControl::SetId
}
187 \func{void
}{SetId
}{\param{int
}{ id
}}
189 Sets the tab identifier.
191 \membersection{wxTabControl::SetLabel
}
193 \func{void
}{SetLabel
}{\param{const wxString\&
}{str
}}
195 Sets the label for the tab.
197 \membersection{wxTabControl::SetPosition
}
199 \func{void
}{SetPosition
}{\param{int
}{ x
},
\param{int
}{ y
}}
201 Sets the x and y offsets for this tab, measured from the top-left of the view area.
203 \membersection{wxTabControl::SetRowPosition
}
205 \func{void
}{SetRowPosition
}{\param{int
}{ pos
}}
207 Sets the position on the layer (row).
209 \membersection{wxTabControl::SetSelected
}
211 \func{void
}{SetSelected
}{\param{bool
}{selected
}}
213 Sets the selection flag for this tab (does not set the current tab for the view;
214 use wxTabView::SetSelectedTab for that).
216 \membersection{wxTabControl::SetSize
}
218 \func{void
}{SetSize
}{\param{int
}{ width
},
\param{int
}{ height
}}
220 Sets the width and height for this tab.
222 \section{\class{wxTabView
}}\label{wxtabview
}
224 Responsible for drawing tabs onto a window, and dealing with input.
226 \wxheading{Derived from
}
228 \helpref{wxObject
}{wxobject
}
232 \helpref{wxTabView overview
}{wxtabviewoverview
},
\helpref{wxPanelTabView
}{wxpaneltabview
}
234 \latexignore{\rtfignore{\wxheading{Members
}}}
236 \membersection{wxTabView::wxTabView
}
238 \func{}{wxTabView
}{\param{long
}{style = wxTAB
\_STYLE\_DRAW\_BOX \pipe wxTAB
\_STYLE\_COLOUR\_INTERIOR}}
242 {\it style
} may be a bit list of the following:
244 \begin{twocollist
}\itemsep=
0pt
245 \twocolitem{wxTAB
\_STYLE\_DRAW\_BOX}{Draw a box around the view area. Most commonly used for dialogs.
}
246 \twocolitem{wxTAB
\_STYLE\_COLOUR\_INTERIOR}{Draw tab backgrounds in the specified colour. Omitting this style
247 will ensure that the tab background matches the dialog background.
}
250 \membersection{wxTabView::AddTab
}\label{wxtabviewaddtab
}
252 \func{wxTabControl *
}{AddTab
}{\param{int
}{ id
},
\param{const wxString\&
}{label
},
\param{wxTabControl *
}{existingTab=NULL
}}
254 Adds a tab to the view.
256 {\it id
} is the application-chosen identifier for the tab, which will be used in subsequent tab operations.
258 {\it label
} is the label to give the tab.
260 {\it existingTab
} maybe NULL to specify a new tab, or non-NULL to indicate that an existing tab should be used.
262 A new layer (row) is started when the current layer has been filled up with tabs.
264 \membersection{wxTabView::CalculateTabWidth
}\label{wxtabviewcalculatetabwidth
}
266 \func{int
}{CalculateTabWidth
}{\param{int
}{ noTabs
},
\param{bool
}{ adjustView = FALSE
}}
268 The application can specify the tab width using this function, in terms
269 of the number of tabs per layer (row) which will fit the view area, which
270 should have been set previously with SetViewRect.
272 {\it noTabs
} is the number of tabs which should take up the full width
275 {\it adjustView
} can be set to TRUE in order to readjust the view width
276 to exactly fit the given number of tabs.
278 The new tab width is returned.
280 \membersection{wxTabView::ClearTabs
}
282 \func{void
}{ClearTabs
}{\param{bool
}{deleteTabs=TRUE
}}
284 Clears the tabs, deleting them if
{\it deleteTabs
} is TRUE.
286 \membersection{wxTabView::Draw
}
288 \func{void
}{Draw
}{\param{wxDC\&
}{dc
}}
290 Draws the tabs and (optionally) a box around the view area.
292 \membersection{wxTabView::FindTabControlForId
}
294 \func{wxTabControl *
}{FindTabControlForId
}{\param{int
}{ id
}}
296 Finds the wxTabControl corresponding to
{\it id
}.
298 \membersection{wxTabView::FindTabControlForPosition
}
300 \func{wxTabControl *
}{FindTabControlForPosition
}{\param{int
}{ layer
},
\param{int
}{ position
}}
302 Finds the wxTabControl at layer
{\it layer
}, position in layer
{\it position
}, both starting from
303 zero. Note that tabs change layer as they are selected or deselected.
305 \membersection{wxTabView::GetBackgroundBrush
}
307 \func{wxBrush *
}{GetBackgroundBrush
}{\void}
309 Returns the brush used to draw in the background colour. It is set when
310 SetBackgroundColour is called.
312 \membersection{wxTabView::GetBackgroundColour
}
314 \func{wxColour
}{GetBackgroundColour
}{\void}
316 Returns the colour used for each tab background. By default, this is
317 light grey. To ensure a match with the dialog or panel background, omit
318 the wxTAB
\_STYLE\_COLOUR\_INTERIOR flag from the wxTabView constructor.
320 \membersection{wxTabView::GetBackgroundPen
}
322 \func{wxPen *
}{GetBackgroundPen
}{\void}
324 Returns the pen used to draw in the background colour. It is set when
325 SetBackgroundColour is called.
327 \membersection{wxTabView::GetHighlightColour
}
329 \func{wxColour
}{GetHighlightColour
}{\void}
331 Returns the colour used for bright highlights on the left side of `
3D' surfaces. By default, this is white.
333 \membersection{wxTabView::GetHighlightPen
}
335 \func{wxPen *
}{GetHighlightPen
}{\void}
337 Returns the pen used to draw
3D effect highlights. This is set when
338 SetHighlightColour is called.
340 \membersection{wxTabView::GetHorizontalTabOffset
}
342 \func{int
}{GetHorizontalTabOffset
}{\void}
344 Returns the horizontal spacing by which each tab layer is offset from the one below.
346 \membersection{wxTabView::GetNumberOfLayers
}
348 \func{int
}{GetNumberOfLayers
}{\void}
350 Returns the number of layers (rows of tabs).
352 \membersection{wxTabView::GetSelectedTabFont
}
354 \func{wxFont *
}{GetSelectedTabFont
}{\void}
356 Returns the font to be used for the selected tab label.
358 \membersection{wxTabView::GetShadowColour
}
360 \func{wxColour
}{GetShadowColour
}{\void}
362 Returns the colour used for shadows on the right-hand side of `
3D' surfaces. By default, this is dark grey.
364 \membersection{wxTabView::GetTabHeight
}
366 \func{int
}{GetTabHeight
}{\void}
368 Returns the tab default height.
370 \membersection{wxTabView::GetTabFont
}
372 \func{wxFont *
}{GetTabFont
}{\void}
374 Returns the tab label font.
376 \membersection{wxTabView::GetTabSelectionHeight
}
378 \func{int
}{GetTabSelectionHeight
}{\void}
380 Returns the height to be used for the currently selected tab; normally a few pixels
381 higher than the other tabs.
383 \membersection{wxTabView::GetTabStyle
}
385 \func{long
}{GetTabStyle
}{\void}
387 Returns the tab style. See constructor documentation for details of valid styles.
389 \membersection{wxTabView::GetTabWidth
}
391 \func{int
}{GetTabWidth
}{\void}
393 Returns the tab default width.
395 \membersection{wxTabView::GetTextColour
}
397 \func{wxColour
}{GetTextColour
}{\void}
399 Returns the colour used to draw label text. By default, this is
402 \membersection{wxTabView::GetTopMargin
}
404 \func{int
}{GetTopMargin
}{\void}
406 Returns the height between the top of the view area and the bottom of the first
409 \membersection{wxTabView::GetShadowPen
}
411 \func{wxPen *
}{GetShadowPen
}{\void}
413 Returns the pen used to draw
3D effect shadows. This is set when
414 SetShadowColour is called.
416 \membersection{wxTabView::GetViewRect
}
418 \func{wxRectangle
}{GetViewRect
}{\void}
420 Returns the rectangle specifying the view area (above which tabs are
423 \membersection{wxTabView::GetVerticalTabTextSpacing
}
425 \func{int
}{GetVerticalTabTextSpacing
}{\void}
427 Returns the vertical spacing between the top of an unselected tab, and the tab label.
429 \membersection{wxTabView::GetWindow
}
431 \func{wwxWindow *
}{GetWindow
}{\void}
433 Returns the window for the view.
435 \membersection{wxTabView::OnCreateTabControl
}
437 \func{wxTabControl *
}{OnCreateTabControl
}{\void}
439 Creates a new tab control. By default, this returns a wxTabControl object, but the application may wish
440 to define a derived class, in which case the tab view should be subclassed and this function overridden.
442 \membersection{wxTabView::Layout
}
444 \func{void
}{Layout
}{\void}
446 Recalculates the positions of the tabs, and adjusts the layer of the selected tab if necessary.
448 You may want to call this function if the view width has changed (for example, from an OnSize handler).
450 \membersection{wxTabView::OnEvent
}
452 \func{bool
}{OnEvent
}{\param{wxMouseEvent\&
}{event
}}
454 Processes mouse events sent from the panel or dialog. Returns TRUE if the event was processed,
457 \membersection{wxTabView::OnTabActivate
}
459 \func{void
}{OnTabActivate
}{\param{int
}{ activateId
},
\param{int
}{ deactivateId
}}
461 Called when a tab is activated, with the new active tab id, and the former active tab id.
463 \membersection{wxTabView::OnTabPreActivate
}
465 \func{bool
}{OnTabPreActivate
}{\param{int
}{ activateId
},
\param{int
}{ deactivateId
}}
467 Called just before a tab is activated, with the new active tab id, and the former active tab id.
469 If the function returns FALSE, the tab is not activated.
471 \membersection{wxTabView::SetBackgroundColour
}
473 \func{void
}{SetBackgroundColour
}{\param{const wxColour\&
}{ col
}}
475 Sets the colour to be used for each tab background. By default, this is
476 light grey. To ensure a match with the dialog or panel background, omit
477 the wxTAB
\_STYLE\_COLOUR\_INTERIOR flag from the wxTabView constructor.
479 \membersection{wxTabView::SetHighlightColour
}
481 \func{void
}{SetHighlightColour
}{\param{const wxColour\&
}{ col
}}
483 Sets the colour to be used for bright highlights on the left side of `
3D' surfaces. By default, this is white.
485 \membersection{wxTabView::SetHorizontalTabOffset
}
487 \func{void
}{SetHorizontalTabOffset
}{\param{int
}{ offset
}}
489 Sets the horizontal spacing by which each tab layer is offset from the one below.
491 \membersection{wxTabView::SetSelectedTabFont
}
493 \func{void
}{SetSelectedTabFont
}{\param{wxFont *
}{font
}}
495 Sets the font to be used for the selected tab label.
497 \membersection{wxTabView::SetShadowColour
}
499 \func{void
}{SetShadowColour
}{\param{const wxColour\&
}{ col
}}
501 Sets the colour to be used for shadows on the right-hand side of `
3D' surfaces. By default, this is dark grey.
503 \membersection{wxTabView::SetTabFont
}
505 \func{void
}{SetTabFont
}{\param{wxFont *
}{font
}}
507 Sets the tab label font.
509 \membersection{wxTabView::SetTabStyle
}
511 \func{void
}{SetTabStyle
}{\param{long
}{ tabStyle
}}
513 Sets the tab style. See constructor documentation for details of valid styles.
515 \membersection{wxTabView::SetTabSize
}
517 \func{void
}{SetTabSize
}{\param{int
}{ width
},
\param{int
}{ height
}}
519 Sets the tab default width and height.
521 \membersection{wxTabView::SetTabSelectionHeight
}
523 \func{void
}{SetTabSelectionHeight
}{\param{int
}{ height
}}
525 Sets the height to be used for the currently selected tab; normally a few pixels
526 higher than the other tabs.
528 \membersection{wxTabView::SetTabSelection
}
530 \func{void
}{SetTabSelection
}{\param{int
}{ sel
},
\param{bool
}{ activateTool=TRUE
}}
532 Sets the selected tab, calling the application's OnTabActivate function.
534 If
{\it activateTool
} is FALSE, OnTabActivate will not be called.
536 \membersection{wxTabView::SetTextColour
}
538 \func{void
}{SetTextColour
}{\param{const wxColour\&
}{ col
}}
540 Sets the colour to be used to draw label text. By default, this is
543 \membersection{wxTabView::SetTopMargin
}
545 \func{void
}{SetTopMargin
}{\param{int
}{ margin
}}
547 Sets the height between the top of the view area and the bottom of the first
550 \membersection{wxTabView::SetVerticalTabTextSpacing
}
552 \func{void
}{SetVerticalTabTextSpacing
}{\param{int
}{ spacing
}}
554 Sets the vertical spacing between the top of an unselected tab, and the tab label.
556 \membersection{wxTabView::SetViewRect
}\label{wxtabviewsetviewrect
}
558 \func{void
}{SetViewRect
}{\param{const wxRectangle\&
}{rect
}}
560 Sets the rectangle specifying the view area (above which tabs are
561 placed). This must be set by the application.
563 \membersection{wxTabView::SetWindow
}
565 \func{void
}{SetWindow
}{\param{wxWindow *
}{window
}}
567 Set the window that the tab view will use for drawing onto.