euporie.notebook.tabs.new

Contain a placeholder tab.

Functions

get_cmd(name)

Get a command from the centralized command system by name.

Classes

BaseButton(body, on_click, ...)

A clickable button widget which contains another container.

Border(body, border, style, str] =, ...)

Draw a border around any container.

Box(body[, padding, padding_left, ...])

Add padding around a container.

Button(text, width, align, ...)

A clickable button widget which holds text.

Datum(data, *args, **kwargs)

Class for storing and converting display data.

DiBool([top, right, bottom, left])

A tuple of four bools with directions.

Dimension([min, max, weight, preferred])

Specified dimension (width/height) of a user control or window.

Display(datum[, height, width, focusable, ...])

Rich output displays.

FileBrowser([path, on_select, on_open, ...])

A file browser.

FocusedStyle(body[, style_focus, style_hover])

Apply a style to child containers when focused or hovered.

HSplit(children[, window_too_small, align, ...])

Several layouts, one stacked above/under the other.

MouseButton(*values)

MouseEventType(*values)

NewTab(app[, path])

Tab class for displaying files.

Pattern(char[, pattern, style])

Fill an area with a repeating background pattern.

StatusContainer(body, status)

A container which allows attaching a status function.

Tab(app[, path])

Base class for interface tabs.

VSplit(children[, window_too_small, align, ...])

Several layouts, one stacked left/right of the other.

Window(*args, **kwargs)

Container that holds a control.

class euporie.notebook.tabs.new.NewTab(app: BaseApp, path: Path | None = None)

Bases: Tab

Tab class for displaying files.

close(cb: Callable | None = None) None

Close a tab with a callback.

Parameters:

cb – A function to call after the tab is closed.

container: AnyContainer
file_extensions: ClassVar[dict[str, None]] = {}
focus() None

Focus the tab (or make it visible).

load_container() AnyContainer

Abstract method for loading the notebook’s main container.

mime_types: ClassVar[set[str]] = {}
name: str | None = 'New Tab'
reset() None

Reset the state of the tab.

save(path: Path | None = None, cb: Callable | None = None) None

Save the current file.

property title: str

Return the tab title.

weight: int = 0
write_file(path: Path) None

Write the tab’s data to a path.

Not implement in the base tab.

Parameters:

path – An path at which to save the file