Skip to contents

Tabbed content. See tabs().

Super class

Widget -> Tabs

Public fields

focusable

The tab bar can take focus (Left/Right switch tabs).

Active bindings

active

Index of the active tab (assign to switch).

active_tab

The active TabPane, or NULL.

tab_count

Number of tabs.

Methods

Inherited methods


Tabs$new()

Create tabs. See tabs().

Usage

Tabs$new(
  ...,
  active = 1L,
  id = NULL,
  classes = NULL,
  style = NULL,
  disabled = FALSE
)

Arguments

...

tab() panes.

active

Index or id of the initially active tab.

id, classes, style, disabled

See Widget.


Tabs$default_style()

The built-in style.

Usage

Tabs$default_style()


Tabs$default_bindings()

Left/Right switch tabs when the bar is focused; Ctrl+PageUp / Ctrl+PageDown switch from anywhere inside.

Usage

Tabs$default_bindings()


Tabs$add_tab()

Add a tab at the end.

Usage

Tabs$add_tab(pane, activate = FALSE)

Arguments

pane

A tab() (or any widget, wrapped in a tab named after its id).

activate

Make it the active tab?


Tabs$remove_tab()

Remove a tab.

Usage

Tabs$remove_tab(which)

Arguments

which

Index or id of the tab.


Tabs$activate()

Show a tab.

Usage

Tabs$activate(which)

Arguments

which

Index or id of the tab.


Tabs$action_next_tab()

Show the next tab.

Usage

Tabs$action_next_tab()


Tabs$action_previous_tab()

Show the previous tab.

Usage

Tabs$action_previous_tab()


Tabs$on_mouse_down()

Clicking a label shows its tab.

Usage

Tabs$on_mouse_down(event)

Arguments

event

A MouseEvent.


Tabs$arrange_children()

Panes go below the tab bar.

Usage

Tabs$arrange_children(children, inner, st)

Arguments

children

Visible children.

inner

Content rectangle.

st

Computed style.


Tabs$child_clip()

Panes are clipped below the tab bar.

Usage

Tabs$child_clip(st)

Arguments

st

Computed style.


Tabs$content_width()

Natural width: the widest of the bar and the panes.

Usage

Tabs$content_width()


Tabs$content_height()

Natural height: bar, rule and the active pane.

Usage

Tabs$content_height(width)

Arguments

width

Content width.


Tabs$paint()

Paint the tab bar.

Usage

Tabs$paint(buffer, area, st)

Arguments

buffer

A ScreenBuffer.

area

Visible part of the region.

st

Computed style.


Tabs$clone()

The objects of this class are cloneable with this method.

Usage

Tabs$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.