Tab
Multipage view with tabs.
Header | #include "nativeui/tab.h" |
Namespace | namespace nu |
Type | class (RefCounted) |
Inherits | View |
Constructors
Tab()
Create a new Tab
view.
Class properties
const char*
kClassName
The class name of this view.
Methods
void AddPage(const std::string& title, scoped_refptr<View> view)
Add view
as a new page with title
.
Parameters
const std::string&
titlescoped_refptr<View>
view
void RemovePage(View* view)
Remove the page that shows view
.
Parameters
View*
view
int PageCount() const
Return the number of pages.
Return
int
View* PageAt(int index) const
Return the view of page at index
.
Parameters
int
index
Return
View*
void SelectPageAt(int index)
Select the page at index
.
Parameters
int
index
int GetSelectedPageIndex() const
Return the index of selected page.
Return
int
View* GetSelectedPage() const
Return the view of selected page.
Return
View*
Events
void on_selected_page_change(Tab* self)
Emitted when user has changed the selected page.
Programmatically changing the selected page will also emit the event.
Parameters
Tab*
self