#include <Tab.h>
This class doesn't controls pages automatically, it's useful when you want a special behaviour for the tabs (see Tabs
example). If you want to put one Panel in the each page, and swap them when the user change the pages, you should use the Tab widget.
Public Member Functions | |
TabBase (Widget *parent, Style style=TabBaseStyle) | |
Creates a new tab control. | |
virtual | ~TabBase () |
virtual Font | getFont () const |
Returns the current font used to paint the Widget. | |
virtual void | setFont (Font font) |
Sets the font of the widget. | |
virtual Rect | getLayoutBounds () |
Returns the area where the pages should be positioned. | |
Side | getSide () |
void | setSide (Side side) |
Sets the side of the pages. | |
bool | isMultiline () |
void | setMultiline (bool state) |
int | addPage (const String &text) |
int | insertPage (int pageIndex, const String &text) |
void | removePage (int pageIndex) |
int | getPageCount () |
int | getRowCount () |
int | getActivePage () |
void | setActivePage (int pageIndex) |
String | getPageText (int pageIndex) |
void | setPageText (int pageIndex, const String &text) |
Size | getNonClientSize () |
Public Attributes | |
Signal1< void, Event & > | PageChange |
Protected Member Functions | |
virtual void | onPreferredSize (Size &sz) |
Adds space for the non-client size. | |
virtual bool | onReflectedNotify (LPNMHDR lpnmhdr, LRESULT &lResult) |
This method can be used to handle notifications (WM_NOTIFY (W32)) reflected from the parent. | |
virtual void | onPageChange (Event &ev) |
TCN_SELCHANGING. | |
Private Member Functions | |
void | updateFont () |
Private Attributes | |
Font | m_userFont |
Font | m_tabFont |
Creates a new tab control.
A tab is a set of pages, each page has a group of widgets, so you can navigate through the pages.
TabBase::~TabBase | ( | ) | [virtual] |
Font TabBase::getFont | ( | ) | const [virtual] |
void TabBase::setFont | ( | Font | font | ) | [virtual] |
Rect TabBase::getLayoutBounds | ( | ) | [virtual] |
Returns the area where the pages should be positioned.
It's like Win32 TabCtrl_AdjustRect.
Reimplemented from Vaca::Widget.
Side TabBase::getSide | ( | ) |
void TabBase::setSide | ( | Side | side | ) |
Sets the side of the pages.
bool TabBase::isMultiline | ( | ) |
void TabBase::setMultiline | ( | bool | state | ) |
int TabBase::addPage | ( | const String & | text | ) |
int TabBase::insertPage | ( | int | pageIndex, | |
const String & | text | |||
) |
void TabBase::removePage | ( | int | pageIndex | ) |
int TabBase::getPageCount | ( | ) |
int TabBase::getRowCount | ( | ) |
int TabBase::getActivePage | ( | ) |
void TabBase::setActivePage | ( | int | pageIndex | ) |
String TabBase::getPageText | ( | int | pageIndex | ) |
void TabBase::setPageText | ( | int | pageIndex, | |
const String & | text | |||
) |
Size TabBase::getNonClientSize | ( | ) |
void TabBase::onPreferredSize | ( | Size & | sz | ) | [protected, virtual] |
bool TabBase::onReflectedNotify | ( | LPNMHDR | lpnmhdr, | |
LRESULT & | lResult | |||
) | [protected, virtual] |
This method can be used to handle notifications (WM_NOTIFY
(W32)) reflected from the parent.
lpnmhdr | Information about the notification message. | |
lResult | Result to return by the wndProc method. |
Reimplemented from Vaca::Widget.
void TabBase::onPageChange | ( | Event & | ev | ) | [protected, virtual] |
TCN_SELCHANGING.
Event generated when the user select a new page. Use getActivePage() to known which page was selected.
TCN_SELCHANGE
Reimplemented in Vaca::Tab.
void TabBase::updateFont | ( | ) | [private] |
Font Vaca::TabBase::m_userFont [private] |
Font Vaca::TabBase::m_tabFont [private] |
Signal1<void, Event&> Vaca::TabBase::PageChange |