Tab

Multipage view with tabs.

Header#include "nativeui/tab.h"
Namespacenamespace nu
Typeclass (RefCounted)
InheritsView

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, View* view)

Add view as a new page with title.

Parameters

void RemovePage(View* view)

Remove the page that shows view.

Parameters

int PageCount() const

Return the number of pages.

Return

int

View* PageAt(int index) const

Return the view of page at index.

Parameters

Return

View*

void SelectPageAt(int index)

Select the page at index.

Parameters

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

Preventable

No.