euporie.core.tabs.base

Contain tab base class.

Functions

add_cmd(**kwargs)

Add a command to the centralized command system.

get_app()

Get the current active (running) Application.

parse_path(path[, resolve])

Parse and resolve a path.

register_bindings(bindings)

Update the key-binding registry.

Classes

ABCMeta(name, bases, namespace, /, **kwargs)

Metaclass for defining Abstract Base Classes (ABCs).

Event(sender[, handler])

Simple event to which event handlers can be attached. For instance::.

FormattedTextControl([text, style, ...])

Control that displays formatted text.

Tab(app[, path])

Base class for interface tabs.

UPath(*args[, protocol])

UntitledPath(*args[, protocol])

A path for untitled files, as needed for LSP servers.

Window(*args, **kwargs)

Container that holds a control.

WindowAlign(*values)

Alignment of the Window content.

class euporie.core.tabs.base.Tab(app: BaseApp, path: Path | None = None)

Bases: object

Base class for interface tabs.

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).

mime_types: ClassVar[set[str]] = {}
name: str | None = None
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